Contentful Management MCP server

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

This MCP server provides integration with Contentful's Content Management API, allowing you to manage content, assets, spaces, environments, and content types through an AI assistant like Claude.

Installation Options

Using with Claude Desktop

The simplest way to use this MCP server is to add it to your Claude Desktop configuration:

  1. Create or edit ~/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 set the token using command 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 also install the server automatically using Smithery:

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

Configuration

Prerequisites

  1. Create a Contentful account at Contentful
  2. Generate a Content Management API token from your account settings

Environment Variables and Arguments

Configuration can be set through environment variables or command-line arguments:

  • CONTENTFUL_HOST / --host: Contentful Management API Endpoint (defaults to https://api.contentful.com)
  • CONTENTFUL_MANAGEMENT_ACCESS_TOKEN / --management-token: Your Content Management API token

Space and Environment Scoping (Experimental)

You can scope operations to specific space and environment IDs:

  • SPACE_ID / --space-id: Contentful space ID
  • ENVIRONMENT_ID / --environment-id: Contentful environment ID

When both are set, tools will only operate within that specific space/environment.

Using App Identity

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

--app-id            # App ID providing the token
--private-key       # Private key created for your app
--space-id          # Space ID where the app is installed
--environment-id    # Environment ID where the app is installed

This approach generates temporary app tokens for operations.

Available Tools

Entry Management

  • search_entries: Search for entries with query parameters
  • create_entry: Create new entries
  • get_entry: Retrieve existing entries
  • update_entry: Update entry fields
  • delete_entry: Remove entries
  • publish_entry: Publish entries
  • unpublish_entry: Unpublish entries

Asset Management

  • list_assets: List assets with pagination
  • upload_asset: Upload new assets with metadata
  • get_asset: Retrieve asset details
  • update_asset: Update asset metadata and files
  • delete_asset: Remove assets
  • publish_asset: Publish assets
  • unpublish_asset: Unpublish assets

Space & Environment Management

  • list_spaces: List available spaces
  • get_space: Get space details
  • list_environments: List environments in a space
  • create_environment: Create new environment
  • delete_environment: Remove environment

Content Type Management

  • list_content_types: List content types
  • get_content_type: Get content type details
  • create_content_type: Create new content type
  • update_content_type: Update content type
  • delete_content_type: Remove content type
  • publish_content_type: Publish a content type

Bulk Operations

  • bulk_publish: Publish multiple entries and assets at once
  • bulk_unpublish: Unpublish multiple entries and assets
  • bulk_validate: Validate multiple entries without modifying content

Smart Pagination

List operations return a maximum of 3 items per request to prevent context window overflow. Responses include:

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

Important Note

This MCP server grants the AI assistant capabilities to update and delete content, spaces, and content models in your Contentful account. Use with appropriate caution.

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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