Transform your content operations with AI-powered tools for Kontent.ai. Create, manage, and explore your structured content through natural language conversations in your favorite AI-enabled editor.
Kontent.ai MCP Server implements the Model Context Protocol to connect your Kontent.ai projects with AI tools like Claude, Cursor, and VS Code. It enables AI models to understand your content structure and perform operations through natural language instructions.
- π Rapid prototyping: Transform your diagrams into live content models in seconds
- π Data Visualisation: Visualise your content model in any format you want
- β¨ Key Features
- π Quickstart
- π οΈ Available Tools
- βοΈ Configuration
- π Transport Options
- π» Development
- License
Before you can use the MCP server, you need:
- A Kontent.ai account - Sign up if you don't have an account.
- A project - Create a project to work with.
- Management API key - Create a Management API key with appropriate permissions.
- Environment ID - Get your environment ID.
You can run the Kontent.ai MCP Server with npx:
npx @kontent-ai/mcp-server@latest stdio
npx @kontent-ai/mcp-server@latest sse
- get-initial-context β π¨ MANDATORY FIRST STEP: This tool MUST be called before using ANY other tools. It provides essential context, configuration, and operational guidelines for Kontent.ai
- get-type-mapi β Get Kontent.ai content type by internal ID from Management API
- list-content-types-mapi β Get all Kontent.ai content types from Management API
- add-content-type-mapi β Add new Kontent.ai content type via Management API
- patch-content-type-mapi β Update an existing Kontent.ai content type by codename using patch operations (move, addInto, remove, replace)
- delete-content-type-mapi β Delete a Kontent.ai content type by codename
- get-type-snippet-mapi β Get Kontent.ai content type snippet by internal ID from Management API
- list-content-type-snippets-mapi β Get all Kontent.ai content type snippets from Management API
- add-content-type-snippet-mapi β Add new Kontent.ai content type snippet via Management API
- get-taxonomy-group-mapi β Get Kontent.ai taxonomy group by internal ID from Management API
- list-taxonomy-groups-mapi β Get all Kontent.ai taxonomy groups from Management API
- add-taxonomy-group-mapi β Add new Kontent.ai taxonomy group via Management API
- get-item-mapi β Get Kontent.ai item by internal ID from Management API
- get-item-dapi β Get Kontent.ai item by codename from Delivery API
- get-variant-mapi β Get Kontent.ai language variant of content item from Management API
- add-content-item-mapi β Add new Kontent.ai content item via Management API. This creates the content item structure but does not add content to language variants. Use upsert-language-variant-mapi to add content to the item
- update-content-item-mapi β Update existing Kontent.ai content item by internal ID via Management API. The content item must already exist - this tool will not create new items
- delete-content-item-mapi β Delete Kontent.ai content item by internal ID from Management API
- upsert-language-variant-mapi β Create or update Kontent.ai language variant of a content item via Management API. This adds actual content to the content item elements. When updating an existing variant, only the provided elements will be modified
- create-variant-version-mapi β Create new version of Kontent.ai language variant via Management API. This operation creates a new version of an existing language variant, useful for content versioning and creating new drafts from published content
- delete-language-variant-mapi β Delete Kontent.ai language variant from Management API
- filter-variants-mapi β Search and filter Kontent.ai language variants of content items using Management API
- get-asset-mapi β Get a specific Kontent.ai asset by internal ID from Management API
- list-assets-mapi β Get all Kontent.ai assets from Management API
- list-languages-mapi β Get all Kontent.ai languages from Management API
- list-workflows-mapi β Get all Kontent.ai workflows from Management API. Workflows define the content lifecycle stages and transitions between them
- change-variant-workflow-step-mapi β Change the workflow step of a language variant in Kontent.ai. This operation moves a language variant to a different step in the workflow, enabling content lifecycle management such as moving content from draft to review, review to published, etc.
- publish-variant-mapi β Publish or schedule a language variant of a content item in Kontent.ai. This operation can either immediately publish the variant or schedule it for publication at a specific future date and time with optional timezone specification
- unpublish-variant-mapi β Unpublish or schedule unpublishing of a language variant of a content item in Kontent.ai. This operation can either immediately unpublish the variant (making it unavailable through the Delivery API) or schedule it for unpublishing at a specific future date and time with optional timezone specification
The server requires the following environment variables:
Variable | Description | Required |
---|---|---|
KONTENT_API_KEY | Your Kontent.ai Management API key | β |
KONTENT_ENVIRONMENT_ID | Your environment ID | β |
PORT | Port for SSE transport (defaults to 3001) | β |
To run the server with STDIO transport, configure your MCP client with:
{
"kontent-ai-stdio": {
"command": "npx",
"args": ["@kontent-ai/mcp-server@latest", "stdio"],
"env": {
"KONTENT_API_KEY": "<management-api-key>",
"KONTENT_ENVIRONMENT_ID": "<environment-id>"
}
}
}
For SSE transport, first start the server:
npx @kontent-ai/mcp-server@latest sse
With environment variables in a .env
file, or otherwise accessible to the process:
KONTENT_API_KEY=<management-api-key>
KONTENT_ENVIRONMENT_ID=<environment-id>
PORT=3001 # optional, defaults to 3001
Then configure your MCP client:
{
"kontent-ai-sse": {
"url": "http://localhost:3001/sse"
}
}
For Streamable HTTP transport, first start the server:
npx @kontent-ai/mcp-server@latest shttp
With environment variables in a .env
file, or otherwise accessible to the process:
KONTENT_API_KEY=<management-api-key>
KONTENT_ENVIRONMENT_ID=<environment-id>
PORT=3001 # optional, defaults to 3001
Then configure your MCP client:
{
"kontent-ai-http": {
"url": "http://localhost:3001/mcp"
}
}
# Clone the repository
git clone https://github.com/kontent-ai/mcp-server.git
cd mcp-server
# Install dependencies
npm ci
# Build the project
npm run build
# Start the server
npm run start:sse # For SSE transport
npm run start:stdio # For STDIO transport
npm run start:shttp # For Streamable HTTP transport
# Start the server with automatic reloading (no need to build first)
npm run dev:sse # For SSE transport
npm run dev:stdio # For STDIO transport
npm run dev:shttp # For Streamable HTTP transport
src/
- Source codetools/
- MCP tool implementationsclients/
- Kontent.ai API client setupschemas/
- Data validation schemasutils/
- Utility functionserrorHandler.ts
- Standardized error handling for MCP toolsthrowError.ts
- Generic error throwing utility
server.ts
- Main server setup and tool registrationbin.ts
- Single entry point that handles both transport types
For debugging, you can use the MCP inspector:
npx @modelcontextprotocol/inspector -e KONTENT_API_KEY=<key> -e KONTENT_ENVIRONMENT_ID=<env-id> node path/to/build/bin.js
Or use the MCP inspector on a running sse server:
npx @modelcontextprotocol/inspector
This provides a web interface for inspecting and testing the available tools.
MIT