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
3.0K downloads
48 stars

Contentful MCP Server is a powerful integration that allows Claude and other AI tools to manage Contentful content through the Model Context Protocol. It provides comprehensive content management capabilities by connecting to Contentful's Content Management API.

Installation Options

Using Claude Desktop

The simplest way to use this MCP server is through Claude Desktop without cloning the repository:

  1. Edit or create your Claude Desktop configuration file at ~/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>"
      }
    }
  }
}

Alternatively, you can provide the token as an argument:

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

Installing via Smithery

For an automated installation via Smithery:

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

Manual Installation via NPX

To run the server directly without installation:

# For stdio transport (default)
npx -y @ivotoby/contentful-management-mcp-server --management-token YOUR_TOKEN

# For HTTP transport
npx -y @ivotoby/contentful-management-mcp-server --management-token YOUR_TOKEN --http --port 3000

Configuration

Required Environment Variables or Arguments

  • CONTENTFUL_MANAGEMENT_ACCESS_TOKEN or --management-token: Your Content Management API token

Optional Configuration

  • CONTENTFUL_HOST or --host: Contentful API endpoint (default: https://api.contentful.com)
  • ENABLE_HTTP_SERVER or --http: Enable HTTP/SSE mode
  • HTTP_PORT or --port: Port for HTTP server (default: 3000)
  • HTTP_HOST or --http-host: Host for HTTP server (default: localhost)

Space and Environment Scoping

To restrict operations to specific spaces and environments:

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

App Identity Authentication

Instead of 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 YOUR_SPACE_ID \
  --environment-id YOUR_ENVIRONMENT_ID

Available Features

Entry Management

  • Search, create, retrieve, update, delete, publish and unpublish entries

Asset Management

  • List, upload, retrieve, update, delete, publish and unpublish assets

Space & Environment Management

  • List spaces, get space details, list environments, create and delete environments

Content Type Management

  • List, get, create, update, delete and publish content types

Bulk Operations

  • Bulk publish multiple entries and assets simultaneously
  • Bulk unpublish content
  • Bulk validate entries for consistency and required fields

Smart Pagination

To prevent context window overflow, list operations are limited to 3 items per request with:

  • Total item count
  • Current page (max 3 items)
  • Number of remaining items
  • Skip value for the next page
  • Prompts for retrieving more items

Transport Modes

stdio Transport (Default)

Ideal for integration with Claude Desktop and other MCP clients:

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

StreamableHTTP Transport

For web-based integrations or standalone service:

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

Security Note

This MCP Server enables Claude (or other agents) to update and delete content, spaces, and content models. Be careful about what permissions you grant to your AI tools when working 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