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
  • Migrating Your OSGi Plugins to dotEvergreen: Adapting to the New Index API
    24 Mar 26
    Technical Guides

    Migrating Your OSGi Plugins to dotEvergreen: Adapting to the New Index API

    An update on infrastructural changes, information on a breaking change introduced that may affect some plugins, and a migration guide for those affected.

    Fabrizzio

    Fabrizzio Araya

    Staff Software Engineer

  • What Is Rich Text? How It Works in a Headless CMS
    23 Mar 26
    Content Management

    What Is Rich Text? How It Works in a Headless CMS

    What is rich text, and how does it differ from Rich Text Format (.rtf)? Learn how rich text works in content management systems, how headless CMS platforms store it as structured data, and why the format matters for omnichannel delivery.

    Fatima

    Fatima Nasir Tareen

    Growth Marketing Specialist

  • Structured Content for GEO: How dotCMS Powers AI-Ready Digital Experiences
    21 Mar 26
    AI in CMS

    Structured Content for GEO: How dotCMS Powers AI-Ready Digital Experiences

    Discover how dotCMS revolutionizes AI-driven digital experiences with structured content for Generative Engine Optimization (GEO). Learn how our enterprise solution enhances AI visibility, enabling large language models to accurately process and cite machine-readable data. Dive into best practices for creating AI-ready content and explore the benefits of a headless CMS model. Optimize your content for AI discovery and experience seamless omnichannel delivery. Contact us to leverage dotCMS for your AI-powered search needs.

    Fatima

    Fatima Nasir Tareen

    Growth Marketing Specialist

  • 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

    Growth Marketing Specialist

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.