MCP Server
The ElmapiCMS MCP Server connects AI-powered editors and agents to your CMS instance through the Model Context Protocol. Install it in Cursor, Claude Code, or any MCP-compatible tool and manage collections, fields, content, assets, and webhooks through natural language.
Package: @elmapicms/mcp-server (1.2+).
What It Does
The MCP server gives AI agents direct access to the ElmapiCMS API:
- Collections & fields — Create, update, and reorder schema
- Content — List/filter, create, update, patch, publish/unpublish, discard draft, versions, link translations, bulk ops
- Assets — Upload, list, metadata, bulk ops
- Project locales — Add locale / set default (admin)
- Webhooks — CRUD and delivery logs (admin)
- Schema-aware resources — Built-in field types, collections guide, and query reference
Installation
npm install -g @elmapicms/mcp-serverOr locally:
npm install @elmapicms/mcp-serverYou need Node.js 18 or later.
Configuration
| Variable | Description |
|---|---|
ELMAPI_BASE_URL | Instance API root (e.g. https://your-domain.com/api). ELMAPI_API_URL is accepted as an alias. |
ELMAPI_API_KEY | Project Sanctum token from Project settings → API Access |
ELMAPI_PROJECT_ID | Project UUID |
Setting Up in Cursor
{
"mcpServers": {
"elmapicms": {
"command": "npx",
"args": ["-y", "@elmapicms/mcp-server"],
"env": {
"ELMAPI_BASE_URL": "https://your-domain.com/api",
"ELMAPI_API_KEY": "your-project-api-token",
"ELMAPI_PROJECT_ID": "your-project-uuid"
}
}
}
}After saving, refresh MCP in Cursor settings. The project detail page also shows copy-ready snippets with your project id and base URL.
Setting Up in Claude Code
claude mcp add elmapicms \
-e ELMAPI_BASE_URL=https://your-domain.com/api \
-e ELMAPI_API_KEY=your-project-api-token \
-e ELMAPI_PROJECT_ID=your-project-uuid \
-- npx -y @elmapicms/mcp-serverAvailable Tools (40)
Project
| Tool | Description |
|---|---|
get_project | Project info (locales, default_locale, …) |
add_project_locale | Add a locale (admin) |
set_default_project_locale | Set default locale (admin) |
Collections / Fields
| Tool | Description |
|---|---|
list_collections / get_collection | List or fetch schema |
create_collection / update_collection / reorder_collections | Schema mutations (admin) |
create_field / update_field / reorder_fields | Field mutations (admin) |
Content Entries
| Tool | Description |
|---|---|
list_entries / get_entry | Query and fetch |
create_entry / update_entry / patch_entry | Save draft (save ≠ publish) |
publish_entry / unpublish_entry / discard_entry_draft | Publication lifecycle (update) |
delete_entry | Soft-delete |
bulk_create_entries / bulk_update_entries / bulk_delete_entries | Atomic bulk |
link_entry_translation | Link locales (update) |
list_entry_versions / get_entry_version / revert_entry_version / update_entry_version_label | Version history |
Assets / Webhooks
| Tool | Description |
|---|---|
list_assets / get_asset / upload_asset / bulk_upload_assets / bulk_update_asset_metadata / delete_asset | Media |
list_webhooks / get_webhook / create_webhook / update_webhook / delete_webhook / list_webhook_logs | Webhooks (admin for mutate) |
Field names are kebab-case. Richtext writes are markdown strings. Relation writes send UUID/id only (not nested objects from get_entry).
Advanced Queries
list_entries supports where with operators: eq, lt, lte, gt, gte, not, like, in, not_in, null, not_null, between, not_between, plus OR groups and relation filtering.
{
"where": {
"price": { "lt": 50 },
"in-stock": true
},
"sort": "price:asc",
"paginate": 12
}Use state: "published" (not a custom status field) for live reads.
Built-in Resources
- Field Types Reference (
elmapicms://field-types) - Collections Guide (
elmapicms://collections-guide) - Query Reference (
elmapicms://query-reference)
Token Abilities
| Ability | Tools |
|---|---|
read | list/get collections, entries, assets, webhooks/logs |
create | create entries, upload assets, create webhooks |
update | update/publish/unpublish/discard, versions, link translation, asset metadata, update webhooks |
delete | delete entries, assets, webhooks |
admin | collections/fields; add/set default locales |
For agent setup work, grant read, create, update, delete, and admin on a dedicated project token.
Using Multiple Projects
{
"mcpServers": {
"elmapicms-blog": {
"command": "npx",
"args": ["-y", "@elmapicms/mcp-server"],
"env": {
"ELMAPI_BASE_URL": "https://your-domain.com/api",
"ELMAPI_API_KEY": "blog-project-api-token",
"ELMAPI_PROJECT_ID": "blog-project-uuid"
}
}
}
}Local Development
For Laravel Herd / .test with a self-signed cert:
"env": {
"ELMAPI_BASE_URL": "https://myproject.test/api",
"ELMAPI_API_KEY": "your-project-api-token",
"ELMAPI_PROJECT_ID": "your-project-uuid",
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
}Only disable TLS verification for local development.