agentpages-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agentpages-mcp publish this portfolio site and give me the public URL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agentpages-mcp
A small MCP server that lets an AI assistant publish a static website through the AgentPages API.
AgentPages is the service: it stores and serves static sites behind an HTTP API
(POST /v1/sites). This repository is only a client for it. It gives an MCP client
(Claude Code, Claude Desktop, Gemini CLI, ...) one tool, create_website, which sends
the model's files to AgentPages and returns the public URL.
Transports: stdio (default; runs on the user's machine with their key in the environment) and Streamable HTTP (
--http; a hosted server where each caller sends their own key as anAuthorization: Bearerheader). See Hosted mode.One tool:
create_website(files), where each file is{path, content, encoding}andencodingis"utf8"(default) or"base64".The tool description tells the model the AgentPages limits and sandbox rules, so it writes a valid site on the first try.
No client-side validation beyond "files is a non-empty list": AgentPages is the single source of truth. Its errors come back to the model as
<code>: <message>tool errors (for exampleindex_missing: ...), so the model can fix the files and retry.
Install and run
Requires Python 3.12 and uv.
git clone https://github.com/mrprogrammingx/agentpages-mcp.git
cd agentpages-mcp
uv syncConfiguration is read from the environment only:
Variable | Example | Notes |
|
| Base URL, no trailing slash |
|
| Bearer key |
If either is missing, the tool returns a clear error (the server still starts). The key is never logged or returned.
Run the server (it speaks MCP over stdin/stdout, so you normally let your MCP client start it):
AGENTPAGES_API_URL=http://localhost:8000 AGENTPAGES_API_KEY=... uv run agentpages-mcpRun the tests (no network needed; the API is mocked with respx):
uv run pytest -qA local AgentPages to try it against
In a checkout of the agentpages repo:
docker compose up -ddocker compose exec -T api agentpages create-key --name mcpRelated MCP server: webserver-mcp
Client configuration
Replace /path/to/agentpages-mcp with the absolute path of this checkout, and the URL and
key with your own.
Claude Code
claude mcp add agentpages -e AGENTPAGES_API_URL=http://localhost:8000 -e AGENTPAGES_API_KEY=your-key -- uv run --directory /path/to/agentpages-mcp agentpages-mcpClaude Desktop
In claude_desktop_config.json (Settings > Developer > Edit Config):
{
"mcpServers": {
"agentpages": {
"command": "uv",
"args": ["run", "--directory", "/path/to/agentpages-mcp", "agentpages-mcp"],
"env": {
"AGENTPAGES_API_URL": "http://localhost:8000",
"AGENTPAGES_API_KEY": "your-key"
}
}
}
}Claude Desktop may not see your shell's PATH; if uv is not found, use its absolute
path (which uv) as command.
Gemini CLI
In ~/.gemini/settings.json (or .gemini/settings.json in a project):
{
"mcpServers": {
"agentpages": {
"command": "uv",
"args": ["run", "--directory", "/path/to/agentpages-mcp", "agentpages-mcp"],
"env": {
"AGENTPAGES_API_URL": "http://localhost:8000",
"AGENTPAGES_API_KEY": "your-key"
}
}
}
}Hosted mode (HTTP)
agentpages-mcp --http serves MCP over Streamable HTTP at /mcp (stateless, JSON
responses) and a health check at /healthz. It is meant to run next to AgentPages, so
users can add it by URL instead of installing anything.
Each caller's own key. The tool reads the key from the request's
Authorization: Bearer <AgentPages key>header and forwards it to the API. The server has no key of its own: it refuses to start in--httpmode ifAGENTPAGES_API_KEYis set, so nobody can ever publish with a shared key.Listing tools works without a key; calling
create_websitewithout one returnsunauthorized: ...as a tool error.MCP_ALLOWED_HOSTS(comma-separated) limits the acceptedHostheaders, for example to the public hostname. Other hosts get421.Request bodies up to 6 MiB are accepted; the API enforces its own 5 MiB limit.
Keys are never logged or returned.
Run it locally:
AGENTPAGES_API_URL=http://localhost:8000 uv run agentpages-mcp --http --port 8080Deploying with Docker next to AgentPages (Cloudflare Tunnel, no host ports): docs/DEPLOY.md.
Connecting to a hosted server
Replace the URL with your server's and your-key with your own AgentPages key.
Claude Code:
claude mcp add --transport http agentpages https://agentpages-mcp.example.com/mcp --header "Authorization: Bearer your-key"Gemini CLI (~/.gemini/settings.json):
{
"mcpServers": {
"agentpages": {
"httpUrl": "https://agentpages-mcp.example.com/mcp",
"headers": { "Authorization": "Bearer ${AGENTPAGES_API_KEY}" }
}
}
}Cursor, VS Code and other clients that accept a URL plus headers work the same way. Chat apps that only offer OAuth sign-in (claude.ai, ChatGPT, the Gemini app) are not supported yet: see Out of scope.
Example prompt
Create a one-page website for a coffee shop and publish it.
The assistant writes index.html (and any CSS, JS or images), calls create_website,
and answers with the URL, for example:
Published: http://localhost:8001/s/k3j9x2/
id: ...
slug: k3j9x2
version: 1AgentPages rules the tool description passes on
index.htmlis required at the root.Allowed extensions: html, css, js, svg, png, jpg, jpeg, webp, ico, txt, json.
At most 100 files per site, 1 MiB per file after decoding, 5 MiB per request, 10 sites per key.
Sites run in a sandbox with an opaque origin: only classic
<script src>works; no ES modules, no fetching the site's own files, no localStorage, no cookies, and no external network resources.
Out of scope (for now)
Update, delete and list tools.
OAuth sign-in for hosted mode (needed by chat apps such as claude.ai, ChatGPT and the Gemini app).
Instagram import.
Note on the MCP SDK
This uses the official mcp Python SDK 2.x, where FastMCP was renamed MCPServer
(from mcp.server.mcpserver import MCPServer). It is the same decorator-based API.
License
MIT
Available Tools
1 toolcreate_websiteA
Publish a static website on AgentPages and return its public URL.
Pass every file of the site in files. Each file has a path (relative, e.g.
"index.html" or "css/style.css"), its content, and an encoding: "utf8" for text
files (the default) or "base64" for binary files such as images.
Limits (the API rejects anything else):
index.htmlis required at the root.Allowed extensions: html, css, js, svg, png, jpg, jpeg, webp, ico, txt, json.
At most 100 files per site, 1 MiB per file after decoding, 5 MiB per request.
At most 10 sites per API key.
Sandbox rules (sites are served in a sandbox with an opaque origin):
Only classic
<script src="...">works. No ES modules (type="module",import).No fetch/XHR of the site's own files: inline any data in a JS file or the HTML.
No localStorage, sessionStorage or cookies.
No external network resources: no CDNs, web fonts, remote images or APIs. Ship everything as files in the site, or inline it.
On an error the tool returns ": " from the API (for example index_missing, path_invalid, payload_too_large, validation_error). Fix the files and call the tool again.
Inputs: files (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool there is no possible overlap or misselection; the tool's purpose (publish a static site) is unmistakable from its name and description.
The single name `create_website` follows a clean verb_noun snake_case convention, so there is no inconsistency to speak of.
The surface is a single tool for a domain (hosted site management) that the description itself implies has more state, e.g. a 10-site-per-key quota. It is thin rather than wrong, and the one tool is heavyweight enough to justify its place.
Only create/publish is exposed: there is no list_sites, get_site, update/redeploy, or delete_site, so an agent that hits the 10-site limit or needs to fix a published site has no path forward. Coverage of the site lifecycle is significantly incomplete.
Maintenance
Related MCP Connectors
Publish static websites (HTML, CSS, JavaScript) to a sofast.website address from your AI assistant.
Publish static websites to a live HTTPS URL from your AI tool. Free tier, instant deploys.
Publish websites from your AI chat: pages, ZIPs, templates, versions, stats and your own domain.
Hosts AI-generated web content (HTML, images, SVG, JSON) at a public URL, with custom domains.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to deploy static files and get live HTTPS URLs instantly, with support for custom domains and data residency.16432 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to edit and serve a static website via natural language, providing file management tools over MCP and HTTP hosting.-
- AlicenseNot gradedqualityCmaintenancePublish the website you built with AI to a live public URL — straight from chat, no setup. Enables deploying static sites and updating them with edit tokens.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to self-host static websites by creating projects, editing files, previewing drafts, and publishing versioned releases with custom domains and a web dashboard.MIT