Skip to content
On this pageWhat the MCP server provides
  1. What the MCP server provides
  2. Setting up MCP
  3. Using MCP with Claude
  4. Known limitations
  5. Why MCP matters
  6. Frequently asked questions

EmDash MCP Server: AI-Native Content Management

Written by Ben 4 min read Updated last month

EmDash is the first CMS with a built-in MCP (Model Context Protocol) server. This isn't a third-party integration or a bolt-on API wrapper — it's part of the core platform. Connect an AI assistant and it can create content, manage schema, query entries, handle taxonomies, and search your site.

I manage most of dashtro.com's content through MCP. Creating articles, assigning taxonomies, and querying the content library happens through natural language instead of clicking through admin forms. Here's how it works and how to set it up.

What the MCP server provides

EmDash's MCP server exposes 33 tools organized by domain:

Content15content_create, content_update, content_publish, content_list, content_get, content_delete, content_duplicate, content_compare, content_schedule, content_unpublish, content_discard_draft, content_restore, content_list_trashed, content_permanent_delete, content_translations
Schema6schema_list_collections, schema_get_collection, schema_create_collection, schema_delete_collection, schema_create_field, schema_delete_field
Media4media_list, media_get, media_update, media_delete
Taxonomies3taxonomy_list, taxonomy_list_terms, taxonomy_create_term
Menus2menu_list, menu_get
Search1search (full-text across all collections)
Revisions2revision_list, revision_restore

Setting up MCP

First, enable MCP in your astro.config.mjs by adding mcp: true to the emdash() configuration. The MCP server runs at /_emdash/api/mcp using Streamable HTTP transport.

Create a .mcp.json file in your project root with the server configuration. Set the type to "http" (not "url" or "sse" — Claude Code specifically requires "http"). Include a Bearer token for authentication, which you generate in the EmDash admin under Settings > API Tokens.

.mcp.json
{"mcpServers": {"emdash": {"type": "http", "url": "http://localhost:4321/_emdash/api/mcp", "headers": {"Authorization": "Bearer YOUR_TOKEN"}}}}

Important: there's a known workaround needed for EmDash v0.1. You must install @modelcontextprotocol/sdk as a direct dependency and add three subpath imports to vite.ssr.optimizeDeps.include in your Astro config. Without this, the workerd runtime loads the CJS build and throws 500 errors. This is documented in detail in the project setup guides.

Using MCP with Claude

Once configured, Claude Code (or any MCP-compatible client) discovers the 33 tools automatically. You can then manage content through conversation:

  • "Create a new article about EmDash pricing in the learn collection" — uses content_create
  • "List all published articles" — uses content_list with status filter
  • "Search for articles about Cloudflare" — uses the search tool
  • "Show me the schema for the learn collection" — uses schema_get_collection

The AI handles Portable Text formatting automatically. When you describe content in natural language, it structures it into proper PT blocks with headings, paragraphs, lists, and formatting. This is significantly faster than writing Portable Text JSON by hand.

Known limitations

Media upload isn't available through MCP. You can list, get, update metadata, and delete media, but uploading new files requires the admin panel. This means images for articles need to be uploaded separately.

The taxonomy_list_terms tool has a bug in v0.1 — it queries the wrong database table name. Taxonomy operations through the Astro content API work fine, but the MCP tool specifically fails. Taxonomy definitions and term creation work correctly.

Why MCP matters

MCP isn't just a convenience feature. It fundamentally changes how content management works.

MCP isn't just a convenience feature. It fundamentally changes how content management works. Instead of navigating admin forms, you describe what you want and the AI executes it. Bulk operations that would take hours in a traditional admin panel take minutes through MCP.

More importantly, it enables workflows that weren't possible before. An AI can read your existing content, understand your content strategy, and create properly structured entries that fit your site's taxonomy and internal linking patterns. This is the beginning of AI-native content management, and EmDash is the first CMS to build it into the core.

What MCP can do

  • Create, update, publish, and delete content entries in any collection
  • Query and search across the full content library
  • Create and modify schema — add collections and fields
  • Manage taxonomy terms
  • List and restore revision history

Known limitations

  • Media upload not available — use the admin panel for new image uploads
  • taxonomy_list_terms has a v0.1 bug querying the wrong table name
  • Requires a project-level @modelcontextprotocol/sdk workaround to avoid CJS 500 errors
  • Only works with Claude Code and MCP-compatible HTTP clients — not SSE-only tools

Frequently asked questions

Frequently asked questions

Do I need Claude Code specifically, or will other MCP clients work?

Any MCP-compatible client works — Cursor, Windsurf, and custom implementations all support the protocol. EmDash uses Streamable HTTP transport, so clients that only support SSE (older versions of some tools) won't work.

Can I generate API tokens for MCP programmatically?

Not in v0.1. Tokens are generated through the admin panel at Settings > API Tokens. Programmatic token creation is on the roadmap.

Why does MCP need the SDK workaround?

Workerd (Cloudflare Workers runtime) loads the CJS build of @modelcontextprotocol/sdk by default, which throws at import. Adding it as a direct dependency and including specific subpaths in vite.ssr.optimizeDeps.include forces the ESM build. It's a v0.1 bug, not a permanent requirement.

Can I restrict which MCP tools an AI assistant can use?

Token scoping is limited in v0.1 — you can create read-only or read/write tokens, but tool-level permissions aren't supported yet. Grant MCP tokens with the trust level you'd grant a human admin.

Build your first EmDash site →