emDash ships with a Model Context Protocol (MCP) server built in. Connect Claude, ChatGPT, Codex or another MCP client to it, and the assistant can read your content, draft new entries, stage edits and, if you let it, publish. Nothing to install: every emDash site has the endpoint at /_emdash/api/mcp, switched on and closed to anyone without a token.

A good share of the editing on this publication goes through that server, with Claude Code as the client. This guide is what we learned doing it: how to connect, which permissions to grant, the workflow that keeps a person in charge, and three limits that the documentation mentions only in passing or not at all.

What the server can do

The server offers 73 tools in emDash 1.4. They cover content (create, read, update, publish, schedule, compare, discard drafts, trash and restore), bylines, media, taxonomies, menus, revisions, site settings, search, the content model, and whole-site export and import. Plugins can add their own tools, but only after an administrator switches on each plugin's MCP access.

You don't need to know the tool names. You ask in plain language, such as "find the drafts in the Build category" or "add a paragraph about the new conflict handling to the 1.4 article", and the client picks the tools.

73MCP tools in emDash 1.4, from content and media to schema and site export
0things to install: the server is part of every emDash site
3ways to get a token: sign-in from the client, a personal access token, or emdash login

Connecting a client

The server address is your site's address followed by /_emdash/api/mcp. For a site in development it is http://localhost:4321/_emdash/api/mcp. Every request needs a token, and there are three ways to get one:

  • Sign in from the client. Claude's custom connectors, ChatGPT's developer mode and the Codex CLI all support it. You add the address, the client opens emDash's sign-in page, and you approve the permissions it asks for. This is the right choice for most people.
  • A personal access token. An administrator creates one in the admin. Tokens start with ec_pat_ and suit automation and clients without a sign-in flow. Treat one like a password: anyone holding it acts as that user.
  • The command line. npx emdash login shows a code to approve in the browser. It is meant for emDash's own CLI, which uses the same API.

One detail catches people out: being signed in to the admin in the same browser does nothing for the MCP endpoint. It accepts tokens only.

Decide what the agent may do

Two things limit an agent, and both apply to every call. The first is the role of the user the token belongs to. The second is the set of permissions approved for the token. The token can only narrow the role, never widen it.

On the sign-in page, every permission the client asks for is ticked by default. Untick what the agent doesn't need before approving. A writing assistant needs content reading and writing, and perhaps media. It doesn't need the content model, settings, menus or plugin tools.

There is no separate permission for publishing. Whether the agent can publish depends on the role alone:

What the agent should doLowest roleCan it publish?
Draft new entries for someone to reviewContributorNo
Write and publish its own entriesAuthorIts own entries only
Edit anyone's entries, media, menus and taxonomiesEditorYes, any entry
Change the content model or site settingsAdminYes, and everything else

So an agent that should only ever propose content belongs in a Contributor account. One that improves existing articles needs Editor, because only Editors can change entries they don't own. At that level it could also publish, which is why the workflow below matters.

Give the agent its own account rather than your own. emDash records who made each revision, so a separate account makes the agent's changes easy to find and easy to undo. It also lets you revoke the agent without touching anyone else's access.

A workflow that keeps a person in charge

emDash's own guide recommends the same pattern we use: the agent writes, a person publishes.

  1. The agent reads first. Every change starts with reading the entry, which returns a revision token. emDash refuses MCP edits without one.
  2. The agent writes a draft or stages an edit. A new entry starts as a draft. An edit to a published entry creates a draft beside the live version, so readers keep seeing the old one.
  3. A person compares. In the admin, or by asking the agent to compare the live and draft versions, you see exactly what would change.
  4. A person publishes. Or tells the agent to, entry by entry, once the change has been reviewed.

This is how we staged edits to six published articles in one session after the emDash 1.4 release. Nothing reached readers until a person had read it, and a draft that wasn't right could simply be discarded.

Three things to know before you rely on it

Markdown is convenient, and lossy

The content tools can return rich text as Markdown and accept Markdown back, which is the easiest format for an AI to read and write. For new text it works well. For editing existing articles, we found three ways it changes content in emDash 1.4:

  • Images lose their details. An image block comes back as plain Markdown, an alt text and an address. Writing it back drops the link to the media library, the caption and the dimensions.
  • Combined formatting turns into stray characters. Code inside a link, code in italics, or code inside bold text comes back with literal backticks or underscores in the text.
  • Custom blocks need care. Blocks Markdown can't express, such as tables or callouts, travel as JSON inside HTML comments. A block written that way without its own _key values is stored without them.

The fix is simple: for any article with images, tables or custom blocks, have the agent read and write Portable Text, emDash's native format, instead of Markdown. An open emDash pull request improves the Markdown conversion for paragraphs and italics, but not for the cases above.

Every write returns the whole entry

After each create, update or publish, the server sends back the complete entry, with every field, both the draft and live versions, the bylines, and the JSON indented for reading. For a long article that is tens of kilobytes. Asking for all 30 of this site's posts at once returned almost 874,000 characters.

AI clients have limits on how much of a tool's result they will read. Claude Code, for example, saves an oversized result to a file and tells the agent to search it. The write still worked, but an agent that doesn't expect this may report a failure or lose track of the new revision token. Ask for one entry at a time, keep list limits small, and don't ask for rich text as Markdown when you only need titles and statuses.

Agents share the site with people

Two protections stop an agent and a person overwriting each other. The revision token makes emDash refuse a change based on an outdated read. The edit lock refuses an agent's change while someone has the entry open in the admin, and names that person.

Both are good news, and both mean an agent will sometimes be told no. It needs to re-read and try again, or wait. Our companion article tests exactly what happens in each case, including the one way an agent's work can still be overwritten.

What we keep away from agents

Some of the 73 tools are not for an assistant on a production site:

  • The content model. Creating or deleting collections and fields changes the database. Do it in the admin, on a copy of the site first.
  • Site import and permanent deletion. Import is meant for an empty site, and permanent deletion can't be undone. Only Admins can do either, which is one more reason to keep agents below Admin.
  • Overriding an edit lock. The tools accept an override. An agent should never use it unless a person asks for that specific entry.
Before you connect an agent to your site0/7 done

Where an agent fits in your editorial workflow

  • Running an emDash site yourself. Connect your assistant with a Contributor or Editor account and let it draft and tidy. Keep the publish button, at least until you trust what it stages.
  • Evaluating emDash. A built-in MCP server with a role model and revision history is a real advantage over CMSs where AI access means a plugin with full rights. Check that your AI client supports remote MCP servers with sign-in.
  • Running an agency. Agents can do the repetitive editing on client sites, from metadata to updates after a release. Give them their own accounts per site, and write the conflict and lock rules into the instructions you hand them.