MCP interface
Connect your AI coding agent (Claude Code, Claude Desktop, Cursor) to nanopage. Your agent generates the site using its own tokens — nanopage validates, stores, and hosts it on a nanopage.site subdomain.
Mint a token
Create a personal access token below. You'll paste it into your MCP client.
Connect your agent
Add the endpoint + token to Claude Code, Claude Desktop, or Cursor using the snippets below.
Publish sites
Ask your agent to build and publish. Your site goes live at {slug}.nanopage.site in seconds.
https://api.nanopage.site/mcpLoading your tokens…
Heads up — skip the "add MCP server" UI
Claude Code, Codex, and several other clients default to OAuth for HTTP MCP servers. Their "Add server" dialog asks for authorization / token URLs, a client ID, and scopes — with nowhere to paste a bearer token. Cancel that dialog. Nanopage v1 uses a simpler bearer-token scheme (the token you copied above); OAuth is on the roadmap but not shipped yet. Use one of the config snippets below — they wire auth as a static Authorization header and never trigger OAuth discovery.
Drop this file at .mcp.json in your project root (or ~/.claude.json globally). This is the most reliable path — it skips the "Add MCP Server" UI, which tries OAuth by default and doesn't know about bearer tokens.
{
"mcpServers": {
"nanopage": {
"type": "http",
"url": "https://api.nanopage.site/mcp",
"headers": {
"Authorization": "Bearer np_YOUR_TOKEN"
}
}
}
} Replace np_YOUR_TOKEN with a token from above. Restart the client after adding it. Verify with /mcp inside Claude Code — you should see nanopage listed as connected.
Tools
publish_websitewriteCreate a new nanopage site from a file bundle (index.html + assets + images).
publish_versionwriteAdd a new version to an existing site. Auto-promotes to current unless promote:false.
list_websitesreadList every website in your account.
get_websitereadFull details for one website: current version, past versions, files.
list_versionsreadAll versions of a website, newest first.
get_job_statusreadLook up a job. Publish jobs land ready immediately.
suggest_slugreadCheck slug validity + availability and get a fallback suggestion.
Resources
nanopage://spec/authoring-guide.mdThe authoring spec: file layout, hard rules, size limits. Your agent should read this before generating.
nanopage://websites/{websiteId}/versions/{versionId}/{path}Read a specific file from a stored version.
Prompts
nanopage_publish_siteBootstraps a nanopage-publishable site from a topic. Inlines the spec so the model sees the constraints before it generates.
Rules your agent must follow
Nanopage hosts static sites. The following are rejected at publish time:
- • External
<script src>,<link href>, or fonts (no CDNs — bundle everything inline). - •
<iframe>,<object>, or<embed>. - •
javascript:URLs, service workers, off-site meta-refresh redirects. - • Forms submitting to external hosts.
- • Anything expecting a backend (no server APIs, WebSockets, or databases).
Allowed layout: index.html + up to 14 more {slug}.html, assets/site.css, assets/{slug}.js, images/, files/, videos/. Limits: 40 files, 2 MB per file, 8 MB total.
