Contentful Management MCP server

Integrate with Contentful's Content Management API for CMS management.
Back to servers
Setup instructions
Provider
Ivo Toby
Release date
Dec 04, 2024
Language
TypeScript
Package
Stats
7.6K downloads
60 stars

The Contentful MCP Server is an implementation that integrates with Contentful's Content Management API, allowing AI assistants like Claude to manage content through a standardized Model Context Protocol (MCP) interface. It provides powerful content management capabilities without requiring you to write code.

Installation Options

Claude Desktop Setup

The easiest way to use this MCP server with Claude Desktop is by adding it to your Claude Desktop configuration:

  1. Edit or create your Claude Desktop config file:

    ~/Library/Application Support/Claude/claude_desktop_config.json
    
  2. Add the following configuration:

    {
      "mcpServers": {
        "contentful": {
          "command": "npx",
          "args": ["-y", "@ivotoby/contentful-management-mcp-server"],
          "env": {
            "CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "<Your CMA token>"
          }
        }
      }
    }
    

Alternative Configuration with Arguments

If your MCP client doesn't support environment variables, you can pass parameters as arguments:

{
  "mcpServers": {
    "contentful": {
      "command": "npx",
      "args": [
        "-y",
        "@ivotoby/contentful-management-mcp-server",
        "--management-token",
        "<your token>",
        "--host",
        "http://api.contentful.com"
      ]
    }
  }
}

Installation via Smithery

You can automatically install the Contentful Management Server for Claude Desktop using Smithery:

npx -y @smithery/cli install @ivotoby/contentful-management-mcp-server --client claude

Configuration Options

Environment Variables

The server can be configured using environment variables or command-line arguments:

  • CONTENTFUL_HOST / --host: Contentful Management API endpoint (default: https://api.contentful.com)
  • CONTENTFUL_MANAGEMENT_ACCESS_TOKEN / --management-token: Your Content Management API token
  • ENABLE_HTTP_SERVER / --http: Enable HTTP/SSE mode (set to "true")
  • HTTP_PORT / --port: Port for HTTP server (default: 3000)
  • HTTP_HOST / --http-host: Host for HTTP server (default: localhost)

Space and Environment Scoping

You can restrict operations to specific spaces and environments:

  • SPACE_ID / --space-id: Limit operations to a specific Contentful space
  • ENVIRONMENT_ID / --environment-id: Limit operations to a specific environment

App Identity Authentication

Instead of using a management token, you can use Contentful App Identity:

npx -y @ivotoby/contentful-management-mcp-server \
  --app-id "<your-app-id>" \
  --private-key "<your-private-key>" \
  --space-id "<space-id>" \
  --environment-id "<environment-id>"

Transport Modes

Standard Input/Output (Default)

The default mode uses standard input/output streams for communication, ideal for integration with MCP clients like Claude Desktop:

npx -y @ivotoby/contentful-management-mcp-server --management-token YOUR_TOKEN

HTTP Server Mode

For web-based integrations or running as a standalone service:

npx -y @ivotoby/contentful-management-mcp-server --management-token YOUR_TOKEN --http --port 3000

Features and Capabilities

Content Management

  • Entry Operations: Search, create, update, delete, publish, and unpublish entries
  • Asset Management: List, upload, update, delete, publish, and unpublish assets
  • Space & Environment: List spaces and environments, create or delete environments
  • Content Types: List, get, create, update, delete, and publish content types

Comment Management

Claude can work with Contentful comments, including:

  • Retrieving comments with filtering by status
  • Creating new comments with plain-text or rich-text formats
  • Threaded conversations by replying to existing comments
  • Updating and deleting comments

Bulk Operations

The server supports efficient batch processing:

  • Bulk Publish: Publish multiple entries and assets in one operation
  • Bulk Unpublish: Remove multiple entries/assets from the delivery API
  • Bulk Validate: Check multiple entries for consistency without modifying content

Smart Pagination

List operations return maximum 3 items per request to prevent context window overflow, with built-in pagination support. This allows Claude to efficiently handle large datasets while maintaining context.

Important Note

This MCP Server enables Claude to update and delete content, spaces, and content models. Be mindful of what permissions you grant when using this integration with your Contentful spaces.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "contentful" '{"command":"npx","args":["-y","@ivotoby/contentful-management-mcp-server"],"env":{"CONTENTFUL_MANAGEMENT_ACCESS_TOKEN":"<Your CMA token>"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "contentful": {
            "command": "npx",
            "args": [
                "-y",
                "@ivotoby/contentful-management-mcp-server"
            ],
            "env": {
                "CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "<Your CMA token>"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "contentful": {
            "command": "npx",
            "args": [
                "-y",
                "@ivotoby/contentful-management-mcp-server"
            ],
            "env": {
                "CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "<Your CMA token>"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later