AI Tools
EmDash has a built-in Model Context Protocol (MCP) server that lets AI assistants work directly with your site’s content. You can ask Claude, ChatGPT, or other tools to draft posts, update pages, manage media, search your content, and more — all through natural conversation.
Your site’s MCP server
Section titled “Your site’s MCP server”The MCP server is enabled by default. EmDash mounts /_emdash/api/mcp unless you turn it off. The endpoint accepts OAuth or personal access bearer tokens; an admin browser session by itself does not authenticate an MCP request. OAuth lets the person connecting the client choose scopes before EmDash issues the token.
To disable it, set mcp: false in your Astro configuration:
emdash({ mcp: false,});Connect an AI client
Section titled “Connect an AI client”Your site’s MCP server URL is:
https://example.com/_emdash/api/mcpReplace example.com with your domain. For local development, use http://localhost:4321/_emdash/api/mcp.
Add the URL as a remote custom connector. Claude opens the EmDash OAuth flow so you can sign in and choose permissions. Anthropic changes the connector screens independently of EmDash, so follow its current custom connector instructions for the exact controls and plan requirements.
ChatGPT developer mode can connect a remote MCP server and supports OAuth-authenticated tools. Eligibility and the settings screens can change, so follow the official ChatGPT developer mode guide and use your site’s MCP URL when creating the app. Review each write call before approving it.
Add the remote server from the Codex CLI, then start its OAuth login:
codex mcp add emdash-site --url https://example.com/_emdash/api/mcpcodex mcp login emdash-siteThe ChatGPT desktop app, Codex CLI, and IDE extension share MCP configuration for the same Codex host. See the official Codex MCP documentation for configuration files, OAuth, and supported transports.
Work with site content
Section titled “Work with site content”Once connected, you can ask the AI assistant to perform any of these operations in natural language. You don’t need to know the tool names — just describe what you want.
Content
Section titled “Content”- Browse content — “Show me the latest 10 blog posts” or “Find all draft pages”
- Read content — “Get the post called ‘hello-world’ and summarize it”
- Create content — “Write a new blog post about our summer sale” or “Create a draft page for the About section”
- Edit content — “Update the pricing page to mention the new plan” or “Fix the typo in the FAQ post”
- Publish and schedule — “Publish the summer sale post”, “Schedule the announcement for June 1st at 9am”, or “Cancel the schedule on the launch post”
- Compare versions — “Show me what changed in the homepage since it was last published”
- Manage drafts — “Discard the draft changes on the about page” or “Duplicate the newsletter template”
- Translations — “What translations exist for the welcome post?” or “Create a French draft linked to this English post” (when i18n is enabled)
Bylines
Section titled “Bylines”- Browse bylines — “List the guest contributors whose names contain ‘Lee’”
- Credit content — “Add Priya Shah as the primary byline on this post”
- Manage bylines — “Create a guest byline for Sam Rivera” or “Update this contributor’s bio”
- Translate bylines — “Show the locale variants of this byline”
Creating, updating, deleting, and translating bylines requires the Editor role. Content write tools accept existing byline IDs when the caller has permission to create or edit that content.
- Browse media — “List all uploaded images” or “Show me PDFs in the media library”
- Check details — “Get the details for this media item”
- Upload files — “Upload this base64 image as
banner.png” or “Import the image at this public URL” - Register existing storage objects — “Register
media/2026/banner.pngas a media item” - Update metadata — “Set the alt text on the hero image to ‘Mountain sunset’”
- Remove files — “Delete the old banner image”
media_upload accepts either base64-encoded bytes or a public HTTP(S) URL. It stores the file, registers the media item, and returns the ID and URL. media_create only registers metadata for a file that is already in storage. URL imports reject private network targets and re-check redirects; both paths enforce the site’s MIME-type and upload-size limits.
Contributors can use media_upload. Registering an existing storage object with media_create requires Author or a higher role.
Search
Section titled “Search”- Find content — “Search for posts mentioning ‘accessibility’” or “Find anything about TypeScript across all collections”
Taxonomies
Section titled “Taxonomies”- Browse — “List all categories” or “Show me the tags”
- Create terms — “Add a ‘tutorials’ tag” or “Create a ‘Frontend’ subcategory under ‘Engineering’”
- Rename terms — “Rename the ‘frontend’ category to ‘Web Frontend’”
- Move terms — “Move the ‘tutorials’ tag under the ‘guides’ category” or “Detach ‘react’ from its parent”
- Delete terms — “Delete the unused ‘archive’ tag”
- View menus — “Show me the main navigation menu” or “What’s in the footer menu?”
- Create menus — “Create a new ‘sidebar’ menu”
- Edit menus — “Rename the ‘main’ menu to ‘Primary navigation’”
- Set items — “Replace the items in the main menu with Home, Blog, About, and Contact”
- Delete menus — “Delete the unused ‘mobile’ menu”
Site settings
Section titled “Site settings”- Inspect — “What’s the current site title?” or “Show me the social links”
- Update identity — “Set the site title to ‘Acme Blog’ and tagline to ‘Stories from the team’”
- Set logo / favicon — “Use this image as the site logo” (after uploading it with
media_upload) - SEO defaults — “Set the default OG image to the new banner” or “Update the title separator to a vertical bar”
- Social handles — “Add our GitHub and YouTube links to the social settings”
Schema (Admin only)
Section titled “Schema (Admin only)”- Inspect — “What collections exist?” or “Show me the fields on the posts collection”
- Create collections — “Create a new ‘testimonials’ collection with name and quote fields”
- Modify schema — “Add a ‘featured’ boolean field to posts”
Revisions
Section titled “Revisions”- View history — “Show the revision history for this post”
- Restore — “Restore the post to its previous version”
Permissions
Section titled “Permissions”When an MCP client opens the OAuth consent page, every permission it requested is selected by default. Clear any permission the client does not need before approving access. The resulting token is limited to the permissions you keep selected and the permissions allowed by your EmDash role, so granting fewer permissions never increases what the client can do.
| Role | What the AI can do |
|---|---|
| Admin | Everything, including schema changes and updating site settings |
| Editor | Manage all content, media, bylines, taxonomies, and menus. View schema and read settings. |
| Author | Create content; edit and publish owned content; upload media and manage owned media. |
| Contributor | Create draft content and upload media, without publishing. |
EmDash rejects a tool call when either the token scope or the user’s role is insufficient. A client may explain that error, but EmDash remains the authority that enforces it.
- Be specific about collections. Say “create a blog post” rather than “create a post” if you have multiple collections.
- Ask for the schema first. If you’re unsure what fields a collection has, ask “What fields does the posts collection have?” before creating or editing content.
- Review before publishing. Ask the AI to create content as a draft, review it in the admin panel, then ask the AI to publish it — or publish it yourself.
- Use compare for review. Before publishing, ask “Compare the live and draft versions of this post” to see exactly what will change.
- Rich text fields use Portable Text. The AI can write content for rich text fields, but complex formatting is best done in the admin editor.
For developers
Section titled “For developers”The MCP server endpoint, authentication methods, OAuth discovery, tool parameters, and error handling are documented in the MCP Server Reference.