Connect to Kontent.ai to manage content, types, taxonomies, and workflows via natural language
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.
Before you can use the MCP server, you need:
You can run the Kontent.ai MCP Server with npx:
npx @kontent-ai/mcp-server@latest stdio
npx @kontent-ai/mcp-server@latest shttp
The server supports two modes, each tied to its transport:
| Transport | Mode | Authentication | Use Case |
|---|---|---|---|
| STDIO | Single-tenant | Environment variables | Local communication with a single Kontent.ai environment |
| Streamable HTTP | Multi-tenant | Bearer token per request | Remote/shared server handling multiple environments |
Configure credentials via environment variables:
| Variable | Description | Required |
|---|---|---|
| KONTENT_API_KEY | Your Kontent.ai key | ✅ |
| KONTENT_ENVIRONMENT_ID | Your environment ID | ✅ |
| appInsightsConnectionString | Application Insights connection string for telemetry | ❌ |
| projectLocation | Project location identifier for telemetry tracking | ❌ |
| manageApiUrl | Custom base URL (for preview environments) | ❌ |
For the Streamable HTTP transport, credentials are provided per request:
/{environmentId}/mcpAuthorization: Bearer <api-key>This allows a single server instance to handle requests for multiple Kontent.ai environments without requiring credential environment variables.
KONTENT_API_KEY and KONTENT_ENVIRONMENT_ID are ignored on this transport, even if they happen to be set in the server's environment. Every request must carry its own credentials; one that doesn't is rejected rather than served with the server's.
| Variable | Description | Required |
|---|---|---|
| PORT | Port for HTTP transport (defaults to 3001) | ❌ |
| appInsightsConnectionString | Application Insights connection string for telemetry | ❌ |
| projectLocation | Project location identifier for telemetry tracking | ❌ |
| manageApiUrl | Custom base URL (for preview environments) | ❌ |
Content returned by this server (for example, an element written by an editor) can contain text that a connected LLM interprets as instructions — indirect prompt injection. A hijacked agent could be steered into destructive tool calls (delete / unpublish / overwrite) or into leaking unpublished drafts. This is an industry-wide, unsolved problem that the server cannot reliably fix by transforming the content it returns, so defense is layered:
readOnlyHint, create-only tools are additive, and tools that overwrite or remove data are destructiveHint — which compliant clients use to auto-approve reads and prompt before destructive calls. Run the server with such a client and avoid headless auto-approve setups against a write-capable key.These are hints, not guarantees. Report security issues privately to security@kontent.ai.
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>"
}
}
}
Streamable HTTP transport serves multiple Kontent.ai environments from a single server instance. Each request provides credentials via URL path parameters and Bearer authentication.
First start the server:
npx @kontent-ai/mcp-server@latest shttp
Create a .vscode/mcp.json file in your workspace:
{
"servers": {
"kontent-ai-multi": {
"uri": "http://localhost:3001/<environment-id>/mcp",
"headers": {
"Authorization": "Bearer <management-api-key>"
}
}
}
}
For secure configuration with input prompts:
{
"inputs": [
{
"id": "apiKey",
"type": "password",
"description": "Kontent.ai API Key"
},
{
"id": "environmentId",
"type": "text",
"description": "Environment ID"
}
],
"servers": {
"kontent-ai-multi": {
"uri": "http://localhost:3001/${inputs.environmentId}/mcp",
"headers": {
"Authorization": "Bearer ${inputs.apiKey}"
}
}
}
}
Update your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonUse mcp-remote as a proxy to add authentication headers:
{
"mcpServers": {
"kontent-ai-multi": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:3001/<environment-id>/mcp",
"--header",
"Authorization: Bearer <management-api-key>"
]
}
}
}
Add the server using the CLI:
claude mcp add --transport http kontent-ai-multi \
"http://localhost:3001/<environment-id>/mcp" \
--header "Authorization: Bearer <management-api-key>"
Note: You can also configure this in your Claude Code settings JSON with the
urlandheadersproperties.
[!IMPORTANT] Replace
<environment-id>with your Kontent.ai environment ID (GUID) and<management-api-key>with your key.
# 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: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:stdio # For STDIO transport
npm run dev:shttp # For Streamable HTTP transport
src/ - Source code
tools/ - MCP tool implementationsclients/ - Kontent.ai API client setupschemas/ - Data validation schemasutils/ - Utility functions
errorHandler.ts - Standardized error handling for MCP toolsthrowError.ts - Generic error throwing utilityapp.ts - Express app factory for the Streamable HTTP transportserver.ts - Main server setup and tool registrationbin.ts - Single entry point that handles both transport typesFor 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 streamable HTTP server:
npx @modelcontextprotocol/inspector
This provides a web interface for inspecting and testing the available tools.
To release a new version:
npm version [patch|minor|major] - this updates package.json, package-lock.json, and syncs to server.jsonMIT
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @kontent-ai/mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-kontent-ai-mcp-server": {
"command": "npx",
"args": [
"-y",
"@kontent-ai/mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.kontent-ai/mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.