home / mcp / contentful mcp server
MCP (Model Context Protocol) server for the Contentful Management API
Configuration
View docs{
"mcpServers": {
"contentful-contentful-mcp-server": {
"command": "npx",
"args": [
"-y",
"@contentful/mcp-server"
],
"env": {
"SPACE_ID": "YOUR_SPACE_ID",
"ENVIRONMENT_ID": "master",
"CONTENTFUL_HOST": "api.contentful.com",
"CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "YOUR CMA TOKEN"
}
}
}
}You can use this Contentful MCP Server to empower your AI assistants with direct access to Contentful APIs and a rich set of content management actions. It enables you to create, edit, organize, and publish content within Contentful spaces through your preferred MCP client, streamlining workflows and automating repetitive tasks.
Connect your MCP client to the Contentful MCP Server using the standard MCP connection flow for your tool (for example, Codex, Cursor, or Claude Desktop). Once connected, you can list, create, update, publish, and organize content types, entries, assets, spaces, environments, locales, and tags. You can also create and invoke AI actions to automate common Contentful workflows, such as translating content or applying bulk updates across entries.
Typical usage patterns include: creating new content types or entries, updating fields across multiple entries, uploading and tagging assets, and publishing content changes. You can also search and filter entries, manage locales, and organize assets by campaigns or other metadata. Use natural language prompts in your MCP client to trigger the available tools and workflows.
Prerequisites you need before installation: Node.js and npm, a Contentful account with a Space ID, and a Contentful Management API personal access token.
2. Install from source or prepare your environment for running the MCP server locally.
# Install from source
```
git clone https://github.com/contentful/contentful-mcp-server.git
cd contentful-mcp-server
npm install
npm run build3. Start the MCP server using the provided command with your Contentful credentials and configuration. Use the following runtime command and environment variables as shown.
command: npx
args: ["-y", "@contentful/mcp-server"]4. Set up the required environment variables for your Contentful connection. You can pass these through your shell or your MCP configuration as shown in the example configuration below.
Below is an example configuration snippet that shows how to wire up the MCP server in your environment. This configuration uses the standard runtime command and exposes the necessary environment variables.
{
"mcpServers": {
"contentful_mcp": {
"command": "npx",
"args": ["-y", "@contentful/mcp-server"],
"env": {
"CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "your-CMA-token",
"SPACE_ID": "your-space-id",
"ENVIRONMENT_ID": "master",
"CONTENTFUL_HOST": "api.contentful.com"
}
}
}
}The following environment variables are used to configure the MCP server for Contentful access.
CONTENTFUL_MANAGEMENT_ACCESS_TOKEN=your-CMA-token
SPACE_ID=your-space-id
ENVIRONMENT_ID=master
CONTENTFUL_HOST=api.contentful.comThe server exposes a comprehensive set of tools for managing Contentful resources. You can perform actions related to context setup, content types, entries, assets, spaces and environments, locales, tags, and AI-driven actions. Each tool is designed to help you interact with Contentful programmatically and efficiently.
- Ensure your Contentful CMA token has the required permissions for the actions you intend to perform. - Use descriptive environment names to keep spaces and environments organized. - Validate changes in a staging environment before publishing to production. - If you encounter authentication or permission errors, regenerate tokens and verify the associated Space ID and Environment ID.
Initialize connection and get usage instructions
List all content types
Get detailed content type information
Create new content types
Modify existing content types
Publish content type changes
Unpublish content types
Remove content types
Search and filter entries
Retrieve specific entries
Create new content entries
Modify existing entries
Publish entries (single or bulk)
Unpublish entries (single or bulk)
Remove entries
Upload new assets
List and browse assets
Retrieve specific assets
Modify asset metadata
Publish assets (single or bulk)
Unpublish assets (single or bulk)
Remove assets
List available spaces
Get space details
List environments
Create new environments
Remove environments
List all locales in your environment
Retrieve specific locale information
Create new locales for multi-language content
Modify existing locale settings
Remove locales from environment
List all tags
Create new tags
Create custom AI-powered workflows
Invoke an AI action with variables
Get AI action invocation details
Retrieve AI action details and configuration
List AI actions in a space
Update existing AI actions
Publish AI actions for use
Unpublish AI actions
Remove AI actions