# Nanopage Developer Resources

Canonical HTML: https://nanopage.site/developers/

Everything machine-readable and agent-facing that Nanopage (the AI website builder at nanopage.site) publishes.

## REST API

The Nanopage API lets an agent publish and manage hosted static websites over plain HTTPS + JSON — the same seven operations as the MCP server below, with the same tokens.

- **Base URL**: `https://api.nanopage.site/v1` (index at [`GET /v1`](https://api.nanopage.site/v1))
- **OpenAPI 3.1 spec**: [nanopage.site/openapi.json](https://nanopage.site/openapi.json) · [api.nanopage.site/openapi.json](https://api.nanopage.site/openapi.json) — every operation has a unique operationId, typed request/response schemas, and a description
- **Auth**: bearer personal access token (`Authorization: Bearer np_…`), minted at [nanopage.site/mcp](https://nanopage.site/mcp)
- **Operations**: `listWebsites` (GET /v1/websites) · `createWebsite` (POST /v1/websites) · `getWebsite` (GET /v1/websites/{id}) · `listWebsiteVersions` (GET /v1/websites/{id}/versions) · `createWebsiteVersion` (POST /v1/websites/{id}/versions) · `getJob` (GET /v1/jobs/{id}) · `suggestSlug` (GET /v1/slugs/suggest?value=…)

### Token scopes

Every personal access token carries the single scope `mcp`: it grants exactly the API operations above plus the MCP endpoint, and never the dashboard, billing, custom domains, or admin. The scope list is declared machine-readably as RFC 9728 protected-resource metadata:

- [api.nanopage.site/.well-known/oauth-protected-resource](https://api.nanopage.site/.well-known/oauth-protected-resource) (the API host)
- [api.nanopage.site/.well-known/oauth-protected-resource/mcp](https://api.nanopage.site/.well-known/oauth-protected-resource/mcp) (the MCP endpoint; 401 responses point here via `WWW-Authenticate: Bearer resource_metadata="…"`)
- [nanopage.site/.well-known/oauth-protected-resource/mcp](https://nanopage.site/.well-known/oauth-protected-resource/mcp) (the proxied apex MCP endpoint)

## MCP server

Nanopage exposes its publishing API as a Model Context Protocol server so AI agents can create and update hosted websites natively.

- **Endpoint**: `https://api.nanopage.site/mcp` — Streamable HTTP transport, JSON-RPC 2.0 over POST
- **Auth**: bearer personal access token (`Authorization: Bearer np_…`), minted at [nanopage.site/mcp](https://nanopage.site/mcp)
- **Tools**: `publish_website`, `publish_version`, `list_websites`, `get_website`, `list_versions`, `get_job_status`, `suggest_slug`
- **Docs**: [MCP interface](https://nanopage.site/mcp) · [markdown version](https://nanopage.site/mcp.md) · [announcement post](https://nanopage.site/blog/nanopage-mcp-server-ai-coding-agents/)

## Machine-readable site

- [openapi.json](https://nanopage.site/openapi.json) — OpenAPI 3.1 spec for the Nanopage REST API
- [llms.txt](https://nanopage.site/llms.txt) — compact navigation index of the product and site for LLMs (under 30k characters)
- [llms-full.txt](https://nanopage.site/llms-full.txt) — the complete annotated index: every use-case page, template, and blog post with descriptions
- [sitemap.xml](https://nanopage.site/sitemap.xml) — all indexable pages
- [robots.txt](https://nanopage.site/robots.txt) — AI crawlers (GPTBot, ClaudeBot, Google-Extended, PerplexityBot, and others) are explicitly allowed

## Markdown content negotiation

Core pages serve `text/markdown` via the `Accept` header (with `Vary: Accept`), and at explicit `.md` URLs:

```
curl -H "Accept: text/markdown" https://nanopage.site/
```

Available mirrors: [/index.md](https://nanopage.site/index.md), [/pricing.md](https://nanopage.site/pricing.md), [/how-it-works.md](https://nanopage.site/how-it-works.md), [/faq.md](https://nanopage.site/faq.md), [/about.md](https://nanopage.site/about.md), [/vs.md](https://nanopage.site/vs.md), [/use-cases.md](https://nanopage.site/use-cases.md), [/templates.md](https://nanopage.site/templates.md), [/blog.md](https://nanopage.site/blog.md), [/contact.md](https://nanopage.site/contact.md), [/developers.md](https://nanopage.site/developers.md), [/mcp.md](https://nanopage.site/mcp.md)

404s for unknown paths return a real HTTP 404 with a short markdown body pointing back to these resources.

## Support

Email hello@nanopage.site for API or MCP questions.
