npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@datocms/mcp

v2.0.4

Published

Model Context Protocol server for DatoCMS

Readme

👉 Visit the DatoCMS homepage or see What is DatoCMS?


DatoCMS MCP Server

⚠️ Alpha Release: This server is in early development. Features may change and stability is not guaranteed.

A local Model Context Protocol (MCP) server that provides AI assistants with tools to interact with the DatoCMS Content Management API. This server enables LLMs to explore and execute DatoCMS API operations through structured documentation and safe execution capabilities.

Key Features

  • Comprehensive API exploration. Browse all DatoCMS resources, actions, and methods with live documentation.
  • Schema introspection. Access detailed information about your project's content models, fields, and relationships.
  • Safe execution environment. Built-in usage rules and guardrails prevent API misuse.
  • Script management. Create, store, and execute TypeScript scripts for complex operations and automation.
  • Optional project access. Use with or without API token for documentation vs. execution capabilities.

Requirements

  • Node.js 18 or newer
  • VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client

Getting started

First, install the DatoCMS MCP server with your client.

Standard config works in most of the tools:

{
  "mcpServers": {
    "datocms": {
      "command": "npx",
      "args": [
        "-y",
        "@datocms/mcp@latest"
      ],
      "env": {
        "DATOCMS_API_TOKEN": "your-project-api-token-here"
      }
    }
  }
}

Use the Claude Code CLI to add the DatoCMS MCP server:

claude mcp add datocms npx @datocms/mcp@latest -e DATOCMS_API_TOKEN=your-project-api-token-here

Follow the MCP install guide, use the standard config above.

Click the button to install:

Install MCP Server

Or install manually:

Go to Cursor Settings -> Tools & Integrations -> New MCP Server, then paste the following:

{
  "mcpServers": {
    "DatoCMS": {
      "command": "npx -y @datocms/mcp@latest",
      "env": {
        "DATOCMS_API_TOKEN": ""
      },
      "args": []
    }
  }
}

Follow the MCP install guide, use the standard config above.

Click the button to install:

Or install manually:

Follow the MCP install guide, use the standard config above. You can also install the DatoCMS MCP server using the VS Code CLI:

# For VS Code
code --add-mcp '{"name":"datocms","command":"npx","args":["-y", "@datocms/mcp@latest"], "env": {"DATOCMS_API_TOKEN": ""}}'

After installation, the DatoCMS MCP server will be available for use with your GitHub Copilot agent in VS Code.

Follow Windsurf MCP documentation. Use the standard config above.

Configuration

The DatoCMS MCP server supports the following environment variables:

  • DATOCMS_API_TOKEN: Your DatoCMS API token for a specific project. When provided, enables full access including schema introspection, API execution, and script execution. Without this token, only API documentation and exploration tools are available, along with the ability to create and validate scripts (but not execute them).
  • DATOCMS_ENVIRONMENT: Specifies which DatoCMS environment the MCP server should interact with. If not set, the server automatically uses the project’s primary environment.
  • EXECUTION_TIMEOUT_SECONDS (optional): Script execution timeout in seconds. Defaults to 60 seconds.
  • MAX_OUTPUT_BYTES (optional): Maximum output size in bytes for all executions. Defaults to 2048 bytes (2 KB).

With API token (full project access):

{
  "mcpServers": {
    "datocms": {
      "command": "npx",
      "args": ["-y", "@datocms/mcp@latest"],
      "env": {
        "DATOCMS_API_TOKEN": ""
      }
    }
  }
}

Without API token (documentation only):

{
  "mcpServers": {
    "datocms": {
      "command": "npx",
      "args": ["-y", "@datocms/mcp@latest"]
    }
  }
}

Tools

The DatoCMS MCP server provides the following tools:

Documentation & Exploration Tools

  • resources: List all available DatoCMS API resources
  • resource: Get details about a specific resource (e.g., items, assets)
  • resource_action: Show available actions for a resource
  • resource_action_method: Get detailed method documentation with examples

Schema Tools (require an API token)

  • schema_info: Get detailed information about DatoCMS models and modular blocks, including fields, fieldsets, nested blocks, and relationships

API Execution Tools (require an API token)

  • resource_action_readonly_method_execute: Execute read-only operations (e.g., list, find, raw queries)
  • resource_action_destructive_method_execute: Execute write operations (e.g., create, update, destroy)

Script Management Tools

  • create_script: Create and store TypeScript scripts that can interact with the DatoCMS API
  • view_script: View the content of a previously created script
  • update_script: Update an existing script
  • execute_script: Run a script against your DatoCMS project (requires an API token)

Security

The DatoCMS MCP server implements multiple layers of security to prevent prompt injection and malicious code execution:

Script Validation

All scripts created through the create_script and update_script tools undergo strict structural validation before being stored or executed:

  1. Package Whitelist: Scripts can only import from explicitly allowed packages:

    • @datocms/* - DatoCMS official packages
    • datocms-* - DatoCMS-prefixed packages
    • ./schema - Local schema definitions

    Any attempt to import from other packages (e.g., fs, child_process, net) will be rejected.

  2. Enforced Function Signature: Scripts must export a default async function with exactly one parameter of type Client:

    export default async function(client: Client): Promise<void> {
      // Script code here
    }

    This ensures scripts can only interact with the DatoCMS API through the provided client, with no access to Node.js system APIs.

  3. Type Safety: Scripts cannot use any or unknown types. This prevents type-unsafe operations and encourages developers to use proper type definitions from the schema.

  4. AST-Level Validation: The server uses TypeScript's compiler API to parse and validate the script's Abstract Syntax Tree (AST), ensuring structural requirements are met before any code execution.

These validations are performed at script creation/update time, preventing malicious code from ever being stored or executed. For implementation details, see src/lib/scripts/validation.ts.

License

The package is available as open source under the terms of the MIT License.


What is DatoCMS?

DatoCMS is the REST & GraphQL Headless CMS for the modern web.

Trusted by over 25,000 enterprise businesses, agencies, and individuals across the world, DatoCMS users create online content at scale from a central hub and distribute it via API. We ❤️ our developers, content editors and marketers!

Why DatoCMS?

  • API-First Architecture: Built for both REST and GraphQL, enabling flexible content delivery
  • Just Enough Features: We believe in keeping things simple, and giving you the right feature-set tools to get the job done
  • Developer Experience: First-class TypeScript support with powerful developer tools

Getting Started:

Official Libraries:

Official Framework Integrations

Helpers to manage SEO, images, video and Structured Text coming from your DatoCMS projects:

Additional Resources: