Official Contentful CMS MCP server
## Contentful MCP Server: Enterprise Content Platform The **Contentful MCP Server** integrates Contentful into Google Antigravity, enabling enterprise content management with structured content, rich text, and multi-environment support directly from your development environment. ### Why Contentful MCP? - **Structured Content**: Content modeling with relationships and validations - **Rich Text**: Powerful rich text editor with embedded entries - **Environments**: Sandbox environments for safe development - **Localization**: Built-in multi-language support - **Enterprise Ready**: SSO, audit logs, and compliance features ### Key Features #### 1. Content Queries ```python # Get entries entries = await mcp.get_entries( content_type="blogPost", query={ "fields.status": "published", "order": "-fields.publishedAt", "limit": 10, "include": 2 # Include linked entries } ) for entry in entries["items"]: print(f"Title: {entry['fields']['title']}") # Get single entry entry = await mcp.get_entry( entry_id="entry123", include=2 ) ``` #### 2. Entry Management ```python # Create entry entry = await mcp.create_entry( content_type="blogPost", fields={ "title": {"en-US": "New Post"}, "body": {"en-US": {...}}, # Rich text "author": {"en-US": {"sys": {"type": "Link", "linkType": "Entry", "id": "author123"}}} } ) # Update entry await mcp.update_entry( entry_id=entry["sys"]["id"], version=entry["sys"]["version"], fields={"title": {"en-US": "Updated Title"}} ) # Publish entry await mcp.publish_entry( entry_id=entry["sys"]["id"], version=2 ) ``` #### 3. Asset Operations ```python # Upload asset asset = await mcp.create_asset( title={"en-US": "Cover Image"}, file={"en-US": {"fileName": "cover.jpg", "contentType": "image/jpeg"}}, file_path="./images/cover.jpg" ) # Process and publish asset await mcp.process_asset(asset_id=asset["sys"]["id"]) await mcp.publish_asset(asset_id=asset["sys"]["id"]) ``` #### 4. Environment Operations ```python # List environments envs = await mcp.get_environments() for env in envs["items"]: print(f"Environment: {env['name']}") # Create environment new_env = await mcp.create_environment( name="staging", source_environment_id="master" ) ``` ### Configuration ```json { "mcpServers": { "contentful": { "command": "npx", "args": ["-y", "@anthropic/mcp-contentful"], "env": { "CONTENTFUL_SPACE_ID": "your-space-id", "CONTENTFUL_MANAGEMENT_TOKEN": "your-management-token", "CONTENTFUL_ENVIRONMENT": "master" } } } } ``` ### Use Cases **Enterprise Websites**: Power global enterprise sites with localized content. **Multi-Channel Publishing**: Deliver content to web, mobile, IoT devices. **Content Operations**: Manage complex editorial workflows and approvals. **Microservices**: Provide content layer for microservices architectures. The Contentful MCP enables enterprise content management within your development environment.
{
"mcpServers": {
"contentful": {
"mcpServers": {
"contentful": {
"env": {
"CONTENTFUL_SPACE_ID": "YOUR_SPACE_ID",
"CONTENTFUL_ACCESS_TOKEN": "YOUR_CONTENTFUL_TOKEN"
},
"args": [
"-y",
"@contentful/mcp-server"
],
"command": "npx"
}
}
}
}
}