# DatoCMS MCP for AI Agents MCP

> DatoCMS gives your AI client direct access to your headless CMS data. You can talk to it naturally to discover content schemas via GraphQL queries, create new records, patch existing content blocks, and manage media assets—all without writing boilerplate code.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** graphql, digital-experience, content-modeling, api-first, media-optimization, web-development

## Description

This MCP lets you treat your entire digital experience platform like a natural language interface. Instead of jumping between the DatoCMS dashboard, running complex API calls in Postman, or remembering specific GraphQL query syntax, you just ask your agent what you need.

You can list every content model available, retrieve specific records by structure, and even update fields using simple commands. Need to delete a document node? It's handled. Want to check if an uploaded image is correctly linked through Imgix? Your agent handles the media oversight for you. Everything runs against your live DatoCMS environment, giving you full control over content creation, versioning, and structure definition. Because all of this is centralized on Vinkius, you connect once from any compatible client and immediately gain access to deep CMS management tools.

## Tools

### create_cms_record
Generates a new, fully structured JSON payload to provision fresh content items into the CMS.

### wipe_cms_record
Deletes an explicit content record and all associated live data rows from the database permanently.

### wipe_media_upload
Runs a validation check that automatically removes specific, unused disk assets.

### get_single_record
Extracts the full set of properties for one specific content node based on its unique identifier.

### get_media_upload
Retrieves detailed structural information about a specific uploaded media file block.

### execute_graphql_cda
Runs targeted GraphQL queries to identify bounded routing spaces within the DatoCMS content graph.

### list_global_models
Provides a list of all explicitly registered and attached structured rules that define item types in the CMS.

### list_cma_records
Retrieves explicit cloud logging data, showing entire JSON:API arrays for audit purposes.

### list_media_uploads
Inspects all internal media arrays to check on specific image assets and their metadata.

### patch_cms_record
Safely updates a record by modifying or substituting specific item parameters within an existing content block.

## Prompt Examples

**Prompt:** 
```
I need a list of all content model types available for this site.
```

**Response:** 
```
Sure thing. I found 6 content models: 

*   **Blog Post**: Defines article structure (Title, Body, Author).
*   **Product Page**: Requires SKU, main image, and description.
*   **Author Profile**: Needs name, bio, and social links.
*   **Category**: Simple listing model.
*   **Team Member**: Captures photos and roles.
*   **Page**: The generic container model. 

Which one should we check records for?
```

**Prompt:** 
```
Can you update the main hero image on the Product Page template?
```

**Response:** 
```
I've updated the featured product banner. I used `patch_cms_record` to replace the old asset with the new high-res photo, and confirmed that all associated meta tags are correctly mapped. The record ID for this was 456.

**Status:** ✅ Updated Successfully
**Details:** New Image URL: `https://cdn.datocms.com/new-hero.jpg`
```

**Prompt:** 
```
List all the media uploads that haven't been used in three months.
```

**Response:** 
```
I ran a check on your asset library and found 12 assets flagged as unused based on their last access date.

| Asset Name | ID | Last Used Date |
| :--- | :--- | :--- |
| old-logo-v1.png | 901 | 2023-01-15 |
| team-photo-backup.webp | 882 | 2023-04-20 |

Do you want me to run `wipe_media_upload` on these?

```

## Capabilities

### Querying Content Structure
Run complex GraphQL queries against your entire DatoCMS content graph to discover specific data arrays or schemas.

### Creating New Records
Generate and provision entirely new CMS records, ensuring the payload strictly adheres to established JSON:API rules.

### Updating Existing Content
Modify existing document nodes or patch specific attribute blocks within a record without overwriting the whole entry.

### Deleting Content Nodes
Irreversibly remove entire content records and associated data from the database.

### Managing Media Assets
List, retrieve details about, or validate uploaded media files to confirm their physical storage status.

### Auditing Content Models
Enumerate all explicitly defined content models and item types that structure your site's data.

## Use Cases

### A new blog post needs structured data
A content editor wants a draft posted immediately. They prompt the agent, and it uses `create_cms_record` to provision the new item, ensuring all required fields like author ID and category are populated correctly based on schema validation.

### Content is outdated or needs a field change
The product team finds an old article missing key data. They ask their agent to use `patch_cms_record` to update the title and add a new metadata block across fifty existing records, all in one prompt.

### Troubleshooting media links
A front-end developer encounters a broken image. They instruct their agent to use `get_media_upload` on the component ID, which returns the exact structural match and verifies if the asset is correctly linked through Imgix.

### Discovering content structure limitations
A digital ops engineer needs to know what fields are available for a new site section. They ask the agent to run `list_global_models` and immediately get an exhaustive list of all possible item types and their definitions.

## Benefits

- Avoid writing repetitive data fetching code. Need content details? Ask the agent to run `get_single_record` instead of building a new query every time.
- Handle complex versioning tasks easily. Use `list_global_models` to audit what structures exist before you try to patch or create anything.
- Save time on media management. Instead of manually checking file paths, the agent can run `list_media_uploads` and verify asset status immediately.
- Perform bulk content changes safely. You don't need multiple endpoints; use `patch_cms_record` to modify specific fields across many records in one go.
- Improve developer workflow by eliminating manual querying. Run `execute_graphql_cda` directly through chat to test routing spaces without leaving your IDE.

## How It Works

The bottom line is, you talk to your AI client, it talks to DatoCMS, and you get back structured data or confirmation of the change.

1. Subscribe to this MCP on Vinkius.
2. Paste your DatoCMS Full Access API Token into the connection settings.
3. Use any MCP-compatible client (like Cursor or Claude) to issue a natural language request, and the agent executes the necessary content operations.

## Frequently Asked Questions

**How does DatoCMS MCP help me update content without complex GraphQL queries?**
You simply tell your agent what you want changed, like 'Change the author of Blog Post 123.' The MCP handles all the underlying complexity, running the necessary patch commands and ensuring data integrity for you.

**Can I use DatoCMS MCP to see what content models my site supports?**
Yes. You can ask the agent to list all global models. This gives you an immediate inventory of every defined content type, which is essential when onboarding a new team member or architecting a new feature.

**What if I need to delete old records in DatoCMS?**
The MCP allows for irreversible deletion. You can specify the record you want gone, and the agent will execute the node vaporization process, clearing out unused data safely.

**Is this better than just using the DatoCMS web interface?**
It is faster and more repeatable. The MCP lets you run complex audits or batch updates in seconds via chat, whereas doing that manually in the dashboard takes hours of clicking through different screens.

**Does DatoCMS MCP handle media asset cleanup for me?**
Yes, it provides tools to inspect and manage your assets. You can list all uploads and even run automated checks to remove unused or obsolete files from the system.