Authoring with MCP

Nanoesis speaks MCP, the Model Context Protocol, so an AI assistant like Claude can read, write, and publish your site through the same authenticated API the editor uses, with the same per-role permissions.

The editor exposes a Model Context Protocol (MCP) endpoint. Point an AI tool at it and the model can browse, edit, and publish your site, going through the very same content API and role gate as the editor. It can never do more than the person whose token it carries.

What it can do

Through MCP an assistant can navigate your content tree, read and write pages and templates, check the validation gate, and publish, all as ordinary tool calls. It also reads a generated reference, so it writes correct nanoesis syntax rather than guessing.

The endpoint

Your editor serves MCP over Streamable HTTP at <your-editor-url>/mcp. This site runs the same endpoint. For a local, single-user setup over a folder, a stdio server runs instead, with no network or token needed.

Authentication

Every call carries a personal access token as a Bearer header. Mint one in the editor: open the account menu and choose MCP access token (it is shown once, so copy it then). The token carries your roles, so an author token can write content/ and a developer token also reaches templates/. Keep it secret, and revoke it from the same menu at any time.

The tools

  • list_dir — browse the files and folders of your site.
  • read_file — read a content, template, or asset file.
  • describe_template — list the fields a template defines.
  • write_file — create or overwrite a file (gated by path and role).
  • delete_path — delete a file or a whole folder.
  • rename_path — move or rename a file or folder.
  • validate — run the validation gate without publishing.
  • publish — compile and publish the whole site (it validates first).
  • list_pending_migrations — find content that no longer matches its template.
  • preview_migration — see how one item differs, to plan a fix.
  • apply_migration — resolve an item's drift (drop, rename, keep, or fill fields).

Plus a read-only resource, nanoesis://reference: the generated guide to tokens, field types, and components that the model reads before authoring, so it never works from stale syntax.

Connect your tool

See Connect your AI tool for Claude, Cursor, and VS Code setup.