publish_site
Deploy files to a live URL. No slug → create a NEW site (works without auth; anonymous sites expire in 24h — always show the user the claimUrl). With slug → UPDATE that site (complete snapshot: send ALL files). A Dockerfile in the files makes it a server-side app (auth required; listen on process...
This record as markdown: /tools/ai-dataecho-mcp/publish-site.md
What publish_site does on Mcp
AI agents use publish_site to create or update resources in Mcp, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
spa | boolean | — | Enable SPA fallback routing (serve index.html for unknown paths) |
slug | string | — | Existing site slug to update (omit to create a new site) |
files | array | Yes | Files to publish. Each file: { path, content (utf-8 text) OR contentBase64 (binary), contentType? }. The publish is a COMPLETE snapshot — omitted files are remo |
title | string | — | Viewer page title (used when there's no index.html) |
claimToken | string | — | Claim token — required to update an anonymous site without auth |
ttlSeconds | number | — | Expiry for authenticated sites, in seconds |
description | string | — | Viewer page description |
Parameters from the server's own tool schema.
Why publish_site is rated Medium
publish_site creates or updates a publicly accessible website by deploying files to a live URL. This is a Write operation (reversible via re-deployment or deletion), but carries high severity because it publishes content to the public internet, can run server-side applications via Dockerfile, and could be misused to deploy malicious content or expose sensitive files publicly.
From the tool's definition Deploy files to a live URL... create a NEW site... UPDATE that site (complete snapshot: send ALL files)
Risk signalsAccepts file system path (files[].path) · Accepts raw HTML/template content (files[].content) · High parameter count (11 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs publish_site safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For publish_site, this is the rule to start with:
publish_site stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp, apply this rule, and every publish_site call is checked against it from then on.
Questions about publish_site
Deploy files to a live URL. No slug → create a NEW site (works without auth; anonymous sites expire in 24h — always show the user the claimUrl). With slug → UPDATE that site (complete snapshot: send ALL files). A Dockerfile in the files makes it a server-side app (auth required; listen on process.env.PORT; persist under /data; poll app_status). Total payload ≤ 8 MB — for bigger sites use the dataecho skill scripts. It is categorised as a Write tool in the Mcp MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
publish_site accepts 7 parameters: spa, slug, files, title, claimToken, ttlSeconds, description. Required: files. The full parameter table on this page comes from the server's own tool schema.
Register the MCP server in PolicyLayer and add a rule for publish_site: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp. Nothing to install.
publish_site is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the publish_site rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for publish_site. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
publish_site is provided by the MCP server (https://dataecho.ai/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on , and thousands of servers like it.
This server
Across the catalogue