Skip to main content
← Back to Articles
mcpcontentfulcmscursoridesetup2026

Contentful MCP Server Cursor IDE Setup 2026: CMA Token Config & Protected Environments

Contentful MCP server Cursor IDE setup 2026: generate a Management API token, add the mcp.json block with your space ID, then create, edit, and publish entries from Cursor chat.

By Web MCP GuideAugust 14, 20269 min read


Contentful MCP Server Cursor IDE Setup 2026

How do you set up the Contentful MCP server in Cursor IDE? Generate a Contentful Management API (CMA) personal access token, add a contentful-mcp block to ~/.cursor/mcp.json with your token and space ID, then restart Cursor. Once connected, Cursor can create, edit, publish, and search content entries directly from chat — useful when you're building a frontend against a content model and want the AI to see real entries instead of guessing field names from a schema you described in a prompt.

There's a real fork in the ecosystem worth knowing before you start: the official @contentful/mcp-server package (maintained at github.com/contentful/contentful-mcp-server) shipped after an earlier community server by the same original author, @ivotoby/contentful-management-mcp-server. Both work, and older tutorials often point at the community one — this guide covers the official package.

What the Contentful MCP Server Exposes

This is a large tool surface — 50+ tools — spanning:

  • Content management — create, edit, publish, and unpublish entries and assets

  • Content type management — create and modify schemas, including publishing content type changes

  • Search and discovery — standard field-based filtering plus semantic vector search across content

  • Multi-language support — locale-aware reads and writes for internationalized content

  • Environment management — create, list, and manage multiple Contentful environments

  • Version history — access entry snapshots for point-in-time comparison

  • AI Actions — build custom AI-powered content workflows on top of the base tool set
  • That's meaningfully broader than most CMS MCP servers on this site — treat the write tools with the same care you'd give direct API access, since that's effectively what they are.

    Prerequisites


  • A Contentful account with a Space ID

  • A Contentful Management API (CMA) personal access token

  • Node.js and npm installed

  • Cursor IDE with MCP support
  • Step 1: Generate a Management API Token

    1. Log into Contentful and go to your space's Settings → API keys → Content management tokens
    2. Generate a personal access token
    3. Copy it — this is your CONTENTFUL_MANAGEMENT_ACCESS_TOKEN

    Also note your Space ID, visible in the same API keys section or in your space's settings URL.

    Step 2: Install and Configure

    npx -y @contentful/mcp-server
    

    Then add the server to ~/.cursor/mcp.json:

    {
      "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"
          }
        }
      }
    }
    

    ENVIRONMENT_ID defaults to master if omitted; CONTENTFUL_HOST defaults to api.contentful.com and rarely needs changing unless you're on a region-specific or self-hosted setup.

    Step 3: Restart and Verify

    Restart Cursor, then in chat:

    List the content types in my Contentful space
    

    A real list of your content models confirms the connection.

    Locking Down Production: Protected Environments

    If your space has a master environment used for production content alongside staging or dev environments, set PROTECTED_ENVIRONMENTS to block write and delete operations against the ones you don't want an AI session touching:

    {
      "env": {
        "CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "your-CMA-token",
        "SPACE_ID": "your-space-id",
        "ENVIRONMENT_ID": "staging",
        "PROTECTED_ENVIRONMENTS": "master,production"
      }
    }
    

    The important caveat: this guard operates only at the MCP server boundary. It stops Cursor's MCP tool calls from writing to a protected environment, but it does nothing against direct API calls made outside this connection — it's not a Contentful-level permission, it's specific to this integration. Don't treat it as a substitute for actual role-based access control on the token itself if the stakes are high.

    Practical Workflows

    Populating content from a spec

    I have a new "Product" content type with fields for name, price, and 
    description. Create 5 sample entries using realistic data so I can 
    build and test the listing page against real content.
    

    Auditing before a schema change

    Show me every content type that references the "Author" content type, 
    and how many entries would be affected if I removed a field from it.
    

    Semantic search across a large content library

    Search my content for anything related to "return policy" or "refunds" — 
    I want to make sure our help center content is consistent before I 
    build a new FAQ page.
    

    Gotchas

    50+ tools means broad write access by default. Unlike a narrowly-scoped integration, this server can create content types, not just entries — meaning it can alter your schema, not just your content. Set PROTECTED_ENVIRONMENTS on any environment you don't want touched, and consider a token scoped to a single space if your account has access to several.

    Community package vs. official package are not interchangeable in config. @ivotoby/contentful-management-mcp-server (community) and @contentful/mcp-server (official) are different packages with potentially different environment variable names and tool sets. If you're following an older tutorial, confirm which package it's actually referencing before copying its config verbatim.

    Semantic vector search needs indexed content to be useful. On a very new or very small space, semantic search results can be thin simply because there isn't much to search yet — that's a data problem, not a broken connection.

    Troubleshooting

    "Access denied" or 401 errors
    Confirm the CMA token wasn't accidentally created as a read-only Delivery API token instead of a Management API token — they look similar in the Contentful UI but serve different APIs entirely, and only the Management token can write.

    Write operations fail specifically in one environment
    Check PROTECTED_ENVIRONMENTS first — if the target environment ID is listed there, the block is working as designed. Remove it from the list (or point ENVIRONMENT_ID elsewhere) if you actually intended to write there.

    Content type changes don't seem to take effect
    Contentful content types need to be explicitly published after modification, same as entries. If a schema change looks like it "didn't work," confirm the AI actually published the content type update rather than leaving it in a draft state.

    Server not appearing in Cursor
    Confirm Node.js and npm are installed and on your PATH, and that you restarted Cursor after editing mcp.json. See debugging MCP server issues in Cursor for the general checklist.

    Frequently Asked Questions

    Q: What's the difference between the official Contentful MCP server and the community one?
    A: The official @contentful/mcp-server package is maintained directly by Contentful at github.com/contentful/contentful-mcp-server. An earlier community package, @ivotoby/contentful-management-mcp-server, shipped first and many older tutorials still reference it. Both work, but they're separate packages — don't mix config from one with the package name of the other.

    Q: Can the Contentful MCP server change my content model, not just entries?
    A: Yes — content type creation and modification are part of the exposed tool set, not just entry-level content management. That's a meaningfully larger blast radius than most CMS integrations, so scope your token and use PROTECTED_ENVIRONMENTS deliberately.

    Q: How do I stop the AI from writing to my production environment?
    A: Set PROTECTED_ENVIRONMENTS to a comma-separated list including your production environment ID (e.g., master,production). This blocks write and delete operations against those environments at the MCP boundary — though it doesn't replace proper API token scoping for defense in depth.

    Q: Does the Management API token also let the AI read published, live content, or only drafts?
    A: The Management API token can read and write both — it's not limited to drafts. It's a broader credential than a read-only Delivery API token, which is exactly why scoping it (space-specific token, protected environments) matters more here than with a read-only integration.

    Q: What environment does the server target if I don't set ENVIRONMENT_ID?
    A: It defaults to master. If your space uses master for production, explicitly set ENVIRONMENT_ID to a non-production environment during development, and add master to PROTECTED_ENVIRONMENTS as a second layer of protection.

    Related Guides


  • Sanity MCP Server: Cursor IDE Setup (2026)

  • Webflow MCP Server: Cursor IDE Setup (2026)

  • WordPress MCP Server: Cursor IDE Setup (2026)

  • Figma MCP Server: Cursor IDE Setup (2026)

  • MCP Security Best Practices (2026)
  • ---


    Related guides