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
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 |
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
master and Master are 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_action is also unguarded — invocation generates content but doesn't write to the environment; any follow-up write the agent performs is still blocked.
🛠️ 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 |
🤝 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.