
Contentful MCP Server
MCPContentful 官方 MCP,内容运营和市场团队可以用自然语言批量创建、修改、发布文章和图片素材,管理多语言内容与定时发布。需要 Space ID、管理 API 令牌和 Node.js;可设受保护环境防止误改线上内容。
Contentful MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with comprehensive tools to interact with Contentful APIs.
🚀 Example Use Cases
This MCP server provides a comprehensive set of tools for content management, allowing AI to help you create, edit, organize, and publish content directly within Contentful. Once configured, you can use natural language in your AI assistant of choice to manage and interact with your Contentful spaces, including:
- Content Creation: "Create a new blog post for our fall product launch"
- Content Management: "Update all product entries to include the new pricing structure"
- Asset Organization: "Upload and organize these marketing images by campaign"
- Workflow Automation: "Create an AI action that translates content to Spanish"
- Content Modeling: "Add a new field to the product content type for customer ratings"
📓 Table of Contents
- ⚙️ Getting Started
- 🛠️ Available Tools
- 🔍 Development
- 📦 Releases
- 🤝 Contributing and development
- 📚 Documentation
- ❓ Help & Support
- 📄 License and Notices
- 🛡️ Code of Conduct
⚙️ Getting started
Prerequisites
- Node.js
- npm
- A Contentful account with a Space ID
- Contentful Management API personal access token
Installation
One-Click install
Note: This requires Cursor to be installed. If the link doesn't work, try the manual installation below.
Claude Desktop:
Download the .dxt configuration file here from the latest release and import it into Claude Desktop to automatically configure the MCP server with your environment variables.
Codex:
codex mcp add contentful --env CONTENTFUL_MANAGEMENT_ACCESS_TOKEN="your-CMA-token" --env SPACE_ID="your-space-id" --env ENVIRONMENT_ID="master" --env CONTENTFUL_HOST="api.contentful.com" -- npx -y @contentful/mcp-server
Install from source
git clone https://github.com/contentful/contentful-mcp-server.git
cd contentful-mcp-server
npm install
npm run build
Environment Variables
| Environment Variable | Required | Default Value | Description |
|---|---|---|---|
CONTENTFUL_MANAGEMENT_ACCESS_TOKEN | ✅ Yes | - | Your Contentful Management API personal access token |
SPACE_ID | ✅ Yes | - | Your Contentful Space ID |
ENVIRONMENT_ID | ❌ No | master | Target environment within your space |
PROTECTED_ENVIRONMENTS | ❌ No | - | Comma-separated environment IDs blocked from write/delete operations (e.g. master,staging). See Protected environments. |
CONTENTFUL_HOST | ❌ No | api.contentful.com | Contentful API host |
EXPORT_BASE_DIR | ❌ No | process.cwd() | Server-controlled root directory for export_space output |
NODE_ENV | ❌ No | production | Node Environment to run in |
Protected environments
Set PROTECTED_ENVIRONMENTS to a comma-separated list of environment IDs (e.g. master,staging) to block write and delete tool calls targeting those environments. Reads (get_*, list_*, search_entries) are unaffected.
PROTECTED_ENVIRONMENTS=master,staging
When the guard fires, the tool returns a clear error and never reaches the Contentful API:
Environment 'master' is protected. Write and delete operations are not allowed.
Notes:
- Opt-in. Unset (or only commas/whitespace) means no environments are protected — existing behavior is unchanged.
- Case-sensitive. Environment IDs in Contentful are case-sensitive, so
masterandMasterare different. Match the exact ID you want to protect. - MCP boundary only. The guard runs inside this server. Direct CMA SDK calls, the Contentful web app, and other clients are not affected — use this alongside, not instead of, role-based permissions.
- Covers env-scoped writes. Org-scoped resources (concepts, concept schemes) and read-only tools have no environment to check, so the guard does not apply.
invoke_ai_actionis also unguarded — invocation generates content but doesn't write to the environment; any follow-up write the agent performs is still blocked.
Configuration
Refer to the documentation for your AI tool of choice for how to configure MCP servers. For example, see the documentation for Codex, Cursor, VS Code, or Claude Desktop.
Below is a sample configuration:
{
"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"
}
}
}
}
🛠️ Available Tools
| Category | Tool Name | Description |
|---|---|---|
| Context & Setup | get_initial_context | Initialize connection and get usage instructions |
| Content Types | list_content_types | List all content types |
get_content_type | Get detailed content type information | |
create_content_type | Create new content types | |
update_content_type | Modify existing content types | |
publish_content_type | Publish content type changes | |
unpublish_content_type | Unpublish content types | |
delete_content_type | Remove content types | |
| Entries | search_entries | Search and filter entries |
semantic_search | Find entries by meaning (vector search) | |
get_entry | Retrieve specific entries | |
get_entry_snapshot | Retrieve entry version history (snapshots) | |
create_entry | Create new content entries | |
update_entry | Modify existing entries | |
patch_entry | Change specific field locales using JSON Patch | |
publish_entry | Publish entries (single or bulk) | |
unpublish_entry | Unpublish entries (single or bulk) | |
delete_entry | Remove entries | |
| Assets | upload_asset | Upload new assets |
list_assets | List and browse assets | |
get_asset | Retrieve specific assets | |
update_asset | Modify asset metadata | |
publish_asset | Publish assets (single or bulk) | |
unpublish_asset | Unpublish assets (single or bulk) | |
delete_asset | Remove assets | |
| Spaces & Environments | list_spaces | List available spaces |
get_space | Get space details | |
list_environments | List environments | |
create_environment | Create new environments | |
delete_environment | Remove environments | |
| Content Preview | list_content_previews | List content previews and their URL templates |
get_entry_preview_url | Resolve the draft-preview URL for an entry | |
| Locales | list_locales | List all locales in your environment |
get_locale | Retrieve specific locale information | |
create_locale | Create new locales for multi-language content | |
update_locale | Modify existing locale settings | |
delete_locale | Remove locales from environment | |
| Releases | list_releases | List releases (max 10 per request) |
get_release | Retrieve a release | |
create_release | Create a release with Entries/Assets | |
update_release | Modify a release's title and/or contents | |
delete_release | Remove a release (and its linked release actions) | |
publish_release | Publish a release (async; check via get_release_action) | |
unpublish_release | Unpublish a release (async; check via get_release_action) | |
validate_release | Validate a release, optionally against publish/unpublish | |
get_release_action | Check the status of a queued release action | |
list_release_actions | List release actions (max 10 per request) | |
schedule_publish_release | Schedule a release to publish at a future datetime (or reschedule) | |
schedule_unpublish_release | Schedule a release to unpublish at a future datetime (or reschedule) | |
cancel_scheduled_release | Cancel a scheduled release action (two-phase confirm) | |
list_scheduled_actions | List scheduled actions (max 10 per request) | |
| Tags | list_tags | List all tags |
create_tag | Create new tags | |
| AI Actions | create_ai_action | Create custom AI-powered workflows |
invoke_ai_action | Invoke an AI action with variables | |
get_ai_action_invocation | Get AI action invocation details | |
get_ai_action | Retrieve AI action details and configuration | |
list_ai_actions | List AI actions in a space | |
update_ai_action | Update existing AI actions | |
publish_ai_action | Publish AI actions for use | |
unpublish_ai_action | Unpublish AI actions | |
delete_ai_action | Remove AI actions | |
| Usage | get_usages | Get aggregated usage metrics for an organization, optionally filtered or grouped by space |
🤝 Contributing and Development
We welcome contributions! Please see our Contributing Guide for local development setup and contribution guidelines.
📦 Releases
This project uses Nx Release for automated versioning and publishing. Releases are automatically generated based on Conventional Commits. See Contributing Guide for more information on release process.
See github releases and npm
📚 Documentation
❓ Help & Support
📄 License and Notices
This project is licensed under the MIT License. See LICENSE for details.
It also includes open-source components licensed under MIT, BSD-2-Clause, and Apache-2.0. For details, see the NOTICE file.
This project includes an automated license management system that keeps track of all dependencies and their licenses. See the AUTOMATION-FOR-LICENSES file for more information.
🛡️ Code of Conduct
We want to provide a safe, inclusive, welcoming, and harassment-free space and experience for all participants, regardless of gender identity and expression, sexual orientation, disability, physical appearance, socioeconomic status, body size, ethnicity, nationality, level of experience, age, religion (or lack thereof), or other identity markers.
Read our full Code of Conduct.
For AI Agents
If you are an AI coding agent working in this repository, read AGENTS.md first. It tells you where to find architectural context, development setup, decision records, and repo-specific rules.
相關資源

Humanizer
Skill对照维基百科「AI 写作迹象」归纳的 25 类模式,标出并改写文本中的 AI 腔,保留原意、不编造事实,可提供样文让改写贴近个人文风。
blader/humanizer70.8k
Copywriting
Skill为首页、落地页、定价页等撰写或改写营销文案:先梳理页面目标、受众与卖点,再产出标题、价值主张与行动号召。出自 marketingskills 合集。
coreyhaines31/marketingskills61.7k
Copy Editing
Skill编辑和翻新已经写好的营销文案:按清晰、语气、价值、证据、具体、情绪、打消顾虑七轮逐项修改,保留原意和作者语气,也能盘点并更新过时的页面内容。与 copywriting 技能互补,出自 marketingskills 合集,示例以英文为主。
coreyhaines31/marketingskills61.3k
Brand Voice
Plugin从 Notion、Confluence、Google Drive、Gong 等已有资料里提炼品牌语调,生成可执行的品牌规范,再按规范撰写和校验 AI 文案。由 Tribe AI 开发,收录在 Anthropic 官方插件合集里;建议先连接至少一个资料源,也可以直接提供文档。
anthropics/knowledge-work-plugins36.5k
Humanizer-zh
Skill中文版 Humanizer:删改文章、评论和文档里的空话、重复与模板化表达,保留事实、确定程度和作者语气,不承诺通过 AI 检测。
op7418/Humanizer-zh23.2k
dbskill
Skill面向创业者与内容创作者的中文商业技能箱,33 个技能覆盖商业模式诊断、对标研究、选题、短视频开头与小红书标题、行动卡点与决策复盘,由 /dbs 自动编排。采用 CC BY-NC 4.0 许可。
dontbesilent2025/dbskill11.5k