dot CMS

How the MCP Server Gives dotCMS Devs the Context AI Always Needed

How the MCP Server Gives dotCMS Devs the Context AI Always Needed

Share this article on:

Most AI tools give developers generic code suggestions. But when your AI agent knows your real content structure, your sites, your content types and fields, your workflows, it will build something that actually works.

That’s exactly what the dotCMS MCP Server does for your dev workflows. It gives your agents the context they need to generate real components, automate migrations, and even pair with design tools.

What Is an MCP Server?

An MCP, short for Model Context Protocol, is a secure connector that lets AI agents and system to interact with any system the same way a human user would.

It gives your AI tools the context they need, for example:

  • What data exists

  • How that data is structured

  • What actions they can perform

  • What rules and permissions they must follow

So instead of hallucinating APIs or guessing props, your agent works with your real dotCMS data.

How to Set Up the MCP Server

Here’s how to get started.

  1. Get a dotCMS environment Cloud, on-prem, or our demo site — they all work.

  2. Create an AI User and API Token

    1. In your dotCMS admin, create a user just for your AI agent.

    2. Give it only the permissions it needs.

    3. Generate a secure API token.

  3. Configure the MCP Server in your AI IDE (like Cursor, VSCode, Claude Code or Windsurf), add the server following this configuration:

{

    "mcpServers": {

        "dotcms": {

            "command": "npx",

            "args": ["-y", "@dotcms/mcp-server"],

            "env": {

                "DOTCMS_URL": "https://your-dotcms-instance.com",

                "AUTH_TOKEN": "your-auth-token"

            }

        }

    }

}
  1. Check the MCP server is running and start prompting.

What You Can Do Right Now

Here’s what developers can do with the dotCMS MCP Server today, and why it’s better than generic AI code completions.

1. Generate UI Components That Actually Work

Need a card, list, or a banner component? Your agent already knows your Product, Banner, or Blog content type structure. Ask it to generate a React or Angular component that:

  • Uses the right props and types.

  • Pulls in real fields

  • Includes prop validation or TypeScript interfaces.

Example prompt: “Generate a React component for our Event content type. Use Tailwind CSS. Include prop types and an example of how to pass props.”

2. Migrate Faster

Moving your frontend from JavaScript to TypeScript? Your agent can:

  • Use your dotCMS schemas to create accurate interfaces.

  • Rewrite components with strict type checks.

  • Flag mismatches between old props and your schema.

3. Connect Design + Content

Pair the dotCMS MCP Server with other MCP Servers, like Figma or Storybook, to tie your content structure to your design system.

  • Your content agent knows the schema.

  • Your design agent knows the layout.

  • Your code agent builds a component that does both.

This cuts back-and-forth between dev and design teams — and keeps everything consistent.

4. Automate Checks and Audits

Use your AI agent to:

  • Audit your component library for missing accessibility props, alt text, or ARIA labels — mapped to real schema fields.

  • Flag props you’re not using anymore.

  • Suggest test cases for common content variations.

Ready to Build?

Connect your dotCMS MCP Server. Let your agent learn your schemas. Start with one real task — like generating a component or rewriting a page in TypeScript. See how real context beats generic snippets every time.

Learn how to set up your MCP Server for developers and get started.


Recommended Reading
  • AI Content Governance for Content Teams: A Practical Framework
    9 Mar 26
    AI in CMS

    AI Content Governance for Content Teams: A Practical Framework

    Learn why AI content governance is essential for content teams. Discover how to protect brand consistency, reduce legal risk, and manage AI across dozens of sites with dotCMS’s built-in governance tools.

    Fatima

    Fatima Nasir Tareen

    Marketing Specialist

  • 7 Business Benefits of Content Governance Done Right
    9 Mar 26
    Content Management

    7 Business Benefits of Content Governance Done Right

    Discover how strong content governance drives faster time to market, reduces compliance risk, and ensures brand consistency for compliance-led organizations managing content across dozens of sites.

    Fatima

    Fatima Nasir Tareen

    Marketing Specialist

  • AI Search Made Easy
    8 Mar 26
    Technical Guides

    AI Search Made Easy

    dotAI Search is now built into the @dotcms/client SDK. One method call gives your headless app semantic AI-powered search in under 15 minutes.

    Marc

    Marc Boutillette

    Director Outbound Product

  • Java 25 is Here — Try It Today
    4 Mar 26
    Innovation

    Java 25 is Here — Try It Today

    Give your dotCMS a test drive on modern Java. Our new Java 25-based containers are live, easy to spin up with a single Docker command, and already showing faster startup, leaner memory use, and a stronger security footing. In this post, I’ll walk you through how to try the ‎`java-25` images locally, what to expect from the upgrade, how to rebuild your plugins in a few minutes, and why we’re asking you to kick the tires now, long before Java 11 support sunsets.

    Stephen

    Stephen Freudenthaler

    Director of Engineering

Explore dotCMS for your organization

image

dotCMS Named a Major Player

In the IDC MarketScape: Worldwide AI-Enabled Headless CMS 2025 Vendor Assessment

image

Explore an interactive tour

See how dotCMS empowers technical and content teams at compliance-led organizations.

image

Schedule a custom demo

Schedule a custom demo with one of our experts and discover the capabilities of dotCMS for your business.