add_project_locale
Add a locale code (e.g. tr, es) to the project. Requires admin API ability. Codes are lowercased. Call when setting up a multilingual site before creating translated content.
Model collections and fields in ElmapiCMS, write entries that never publish themselves, and manage versions, locales, assets and webhooks — 40 tools over one project.
LABSCO SUMMARY
Both write paths state it outright: an update or a patch leaves the published snapshot serving the public API until a publish call mints a new immutable version. That makes the version list the real history, revertible and relabellable without the payload changing. Three sharp edges are named in the tools themselves, and each one costs an afternoon if you find it the hard way: a URL or permalink field has to be of type slug rather than text, a relation is written as the related entry's UUID and never as the nested object a read gave you, and a translation group can be linked through the API but only split in the dashboard.
A headless CMS client covering a project's schema, its content entries and their published versions, its assets and its webhooks. Everything is scoped to one ElmapiCMS project, addressed by its UUID.
Three values: ELMAPI_BASE_URL pointing at your instance's API root, a project Sanctum token from Project Settings, API Tokens in ELMAPI_API_KEY, and the project UUID in ELMAPI_PROJECT_ID. Launch with npx -y @elmapicms/mcp-server over stdio. Abilities on the token decide what works — adding or changing a locale needs admin, and publishing, unpublishing, discarding a draft, reverting a version and linking translations all need update. Against a local instance with a self-signed certificate, fix the CA trust rather than turning TLS verification off in a config you might ship.
One command plus a key — npx -y @elmapicms/mcp-server, then supply credentials
USE CASES
Declare the fields with the collection in one request, so there is no half-built content type in between.
A patch touches the draft only; the published snapshot keeps serving until you publish.
Read the version history, then restore the draft from an earlier snapshot and publish it as a new version.
Create them atomically so one malformed item does not leave the collection half-populated.
Add the locale, create the translated entry, then link it to its counterpart.
Point a webhook at it and read the delivery logs when something does not arrive.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
add_project_localeAdd a locale code (e.g. tr, es) to the project. Requires admin API ability. Codes are lowercased. Call when setting up a multilingual site before creating translated content.
bulk_create_entriesCreate multiple content entries atomically. If one item fails, the whole request is rolled back.
bulk_delete_entriesDelete multiple content entries atomically by UUID. If one delete fails, no entries are deleted.
bulk_update_asset_metadataUpdate metadata for multiple assets atomically by UUID. If one item fails, all updates are rolled back.
bulk_update_entriesUpdate multiple content entries atomically by UUID. If one item fails, all updates are rolled back. Saves never change publish state — call publish_entry per UUID to mint new versions after bulk updates.
bulk_upload_assetsUpload multiple local files as assets atomically. If one upload fails, all uploads are rolled back.
create_collectionCreate a new collection. Optionally include field definitions to create the collection with its full schema in a single request.
create_entryCreate a new content entry in a collection
create_fieldAdd a new field to a collection. URL/permalink fields MUST use type "slug" (never "text"). Attach with options.slug.field to the source text field name (e.g. "title"), and set required + unique validations. See elmapicms://field-types for options and patterns.
create_webhookCreate a webhook for content and auth events
delete_assetDelete an asset by UUID
delete_entrySoft-delete a content entry (moves to trash). Can be restored from the admin panel.
delete_webhookDelete a webhook by UUID
discard_entry_draftDiscard unpublished draft changes and restore the draft from the current published version (or clear draft when unpublished). Does not delete the entry or remove historical versions. Requires update ability.
get_assetGet an asset by its UUID or by filename.
get_collectionGet a single collection with its full field schema by slug
get_entryGet a single content entry by UUID. Response includes uuid, locale, published_at, and a fields object (custom field values — not a nested data key). Relation fields appear as nested entry objects (one-to-one) or arrays of entries (one-to-many), not as bare UUIDs. state='published' (default) returns the published snapshot; state='draft' returns live draft fields for draft entries. A published entry with unpublished draft edits still serves its last snapshot under state='published' until publish_entry.
get_entry_versionFetch a single version's metadata and raw snapshot payload. The snapshot contains the saved field values in restoration format; for API-rendered content use get_entry with state='published'.
get_projectGet information about the current Elmapi project (name, uuid, default_locale, locales, etc.)
get_webhookGet a webhook by UUID
link_entry_translationMerge two entries in the same collection into one translation group (same as dashboard “link translation”). Both entries must exist, belong to this collection, and have different locales. There is no unlink via API — use the dashboard if you need to split a group. Requires an API key with update ability.
list_assetsList assets in the project with optional pagination.
list_collectionsList all collections in the project
list_entriesList content entries for a collection with advanced filtering, sorting, and pagination. Use the 'where' parameter for powerful queries. Read the 'query-reference' resource for full documentation on operators and examples. state='published' (default) returns each entry's published snapshot fields (not live draft edits). state='draft' returns entries whose state is draft.
list_entry_versionsList all published versions for a content entry (newest first). Each version is an immutable snapshot taken at publish time. Response includes version_number, label, description, published_at, created_by, and is_current_published for each version.
list_webhook_logsList delivery logs for a webhook
list_webhooksList all webhooks configured for the current project
patch_entryPartially update a content entry (HTTP PATCH). Only include fields you want to change (e.g. relations, one field). Saves NEVER change the publish state — call publish_entry explicitly to mint a new version. Prefer this over update_entry when you are not replacing the entire entry.
publish_entryMint a new immutable version from the entry's current draft and make it the live published version. After this call, state=published reads from the public API will return the new snapshot and is_draft_dirty is reset to false.
reorder_collectionsUpdate the display order of collections
reorder_fieldsUpdate the display order of fields within a collection
revert_entry_versionRestore the draft to a previous version's snapshot and publish it as a new version. The current unpublished draft is replaced. Returns the new version number.
set_default_project_localeSet the project's default locale. Adds the locale to the list if it was missing. Requires admin API ability.
unpublish_entryClear the live published pointer for an entry. The entry becomes invisible under state=published in the public API, but all historical versions are retained and still accessible via list_entry_versions / get_entry_version.
update_collectionUpdate the name and slug of an existing collection
update_entryReplace an existing content entry (HTTP PUT). Sends the full data payload; required fields (e.g. title, slug) must be included. Saves NEVER change the publish state — if the entry has a published version, the public API keeps serving that snapshot under state=published until you explicitly call publish_entry. Use patch_entry for partial updates and publish_entry/unpublish_entry to control visibility.
update_entry_version_labelUpdate a version's editable label and/or description. The snapshot payload itself is immutable.
update_fieldUpdate an existing field on a collection
update_webhookUpdate a webhook by UUID
upload_assetUpload a local file as an asset. Provide the absolute file path.
BEFORE YOU INSTALL
40 tools when we connected. Token abilities decide what works: a read-only token leaves every tool listed but most failing, while create, update, delete and admin abilities unlock the rest. Removing a locale is intentionally not exposed.
Both documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 40 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y @elmapicms/mcp-server{
"mcpServers": {
"elmapicms": {
"command": "npx",
"args": [
"-y",
"@elmapicms/mcp-server"
],
"env": {
"ELMAPI_BASE_URL": "<YOUR_SERVER_URL>/api",
"ELMAPI_API_KEY": "<YOUR_ELMAPI_API_KEY>",
"ELMAPI_PROJECT_ID": "<YOUR_ELMAPI_PROJECT_ID>"
}
}
}
}claude mcp add elmapicms -e ELMAPI_BASE_URL=<YOUR_SERVER_URL>/api -e ELMAPI_API_KEY=<YOUR_ELMAPI_API_KEY> -e ELMAPI_PROJECT_ID=<YOUR_ELMAPI_PROJECT_ID> -- npx -y @elmapicms/mcp-server