# Contentstack MCP for AI Agents MCP

> Contentstack lets you manage your headless CMS directly through any AI client connection. You can create, update, and delete content entries using structured JSON payloads, audit schemas, retrieve media metadata, and push live data to development or production environments—all without leaving the chat window.

## Overview
- **Category:** content-management
- **Price:** Free
- **Tags:** digital-experience, content-orchestration, asset-management, workflow-automation, headless-cms

## Description

Need full control over a headless CMS? This MCP connects your Contentstack account so you can manage complex digital experiences using natural conversation. Instead of logging into a dashboard, you just tell your AI agent what needs doing. You can get structured data by listing and retrieving document rows based on specific content types, or draft new entries with precise JSON attributes. If existing content needs changes, you don't have to click through forms; you can safely update whole entries by overwriting schema blocks. Need to make it live? The MCP triggers the exact publication sequence needed to push CMS data to staging or production environments. It also lets you inspect global schemas and decode field validation rules so developers know exactly what the database expects. When your agent needs media links, you get explicit metadata for assets instead of having to scrape a CDN manually. All this functionality is hosted on Vinkius, giving you one place to connect all your content tools.

## Tools

### create_cms_entry
Generates new Contentstack drafts using structured JSON payloads.

### wipe_cms_entry
Permanently deletes specific app nodes and live document rows from the CMS.

### get_media_asset
Retrieves detailed structural matching for explicit media IDs.

### get_schema_details
Performs a deep extraction of properties that define active content fields.

### get_single_entry
Retrieves specific content entries by their unique UUIDs for tracing or viewing.

### list_media_assets
Scans deep arrays to list all available media assets, mitigating picture limits.

### list_global_schemas
Lists and enumerates every structured content rule attached across the platform.

### list_type_entries
Identifies all bounded document spaces within your CMS schemas for review.

### publish_to_environment
Sends an automated validation check, pushing content data live to a designated environment (dev, prod, staging).

### update_cms_entry
Safely modifies global web CRM boundaries by substituting new draft values into existing entries.

## Prompt Examples

**Prompt:** 
```
I need to update the 'About Us' page entry. I changed the main text and added a new team photo; can you update it?
```

**Response:** 
```
**Content Update Status:** 

*   **Entry ID:** `entry-9001` (Type: AboutUs)
*   **Status:** Processing...
*   **Changes Applied:** Main Text Block overwritten. New Asset (`asset_782`) linked to 'Team Photo' field.
*   **Next Step:** Publishing the changes now... ✅

The update is complete and pushed live to the staging environment.
```

**Prompt:** 
```
What are all the current available content types in my system? I need to know what fields exist.
```

**Response:** 
```
I found 4 global schemas: 

1.  **Homepage:** Requires Text (Hero Title), File Reference (Main Image), and List (Feature Blocks).
2.  **Blog Post:** Needs Text (Body), Symbol (SKU), and Date.
3.  **Product Schema:** Includes Number (Price) and Boolean (Is Available).
4.  **Contact Page:** Simple text fields only.

You can use these schema details to build your components.
```

**Prompt:** 
```
List the media assets I have for the 'product' category so I can get their IDs.
```

**Response:** 
```
Here are 5 high-priority media assets available in your global library:

| Media ID | Asset Name | Original URL Excerpt | Size |
| :---: | :--- | :--- | :---: |
| `media_123` | Hero Banner V3 | /assets/banner.jpg | 4MB |
| `media_900` | Product Shot A | /assets/shotA.png | 1.2MB |
| `media_782` | Team Portrait | /assets/team.webp | 850KB |
| ... | (3 more assets listed) | | |
```

## Capabilities

### Create and Draft Content Entries
Generates new CMS draft entries using highly structured JSON payloads.

### Update Existing Content Records
Modifies content by safely overwriting schema blocks or substituting draft values in current entries.

### Publish to Environments
Triggers automated validation checks, pushing CMS data live to specific deployment environments like development or production.

### Inspect Content Schemas
Extracts the structural details of content types and properties used across your entire site.

### Manage Media Assets
Retrieves detailed metadata for global files, including original URLs, preventing manual asset scraping.

### View Content Listings
Identifies and retrieves all document rows associated with specific content types within the CMS.

## Use Cases

### Publishing a Site Update
A Digital Ops specialist needs to move a new homepage design from staging to production. Instead of manually verifying the status in three different UIs, they ask their agent to 'Publish entry X to Production'. The MCP executes this via `publish_to_environment`, and they get immediate confirmation.

### Developing with Schema Confidence
A front-end developer starts a new product page. They use the agent to run schema inspection, calling `get_schema_details`. The system confirms required fields like SKU type and price format, so they don't build anything that will fail validation later.

### Bulk Content Revision
A content manager realizes 50 blog posts need a minor text update. Instead of opening 50 drafts, they use the agent to `update_cms_entry`, passing the new values and targeting all relevant entries with high precision.

### Cleaning Up Old Content
A product team needs to clear out old draft content before a migration. They ask the agent to 'Permanently delete app node Y'. The MCP uses `wipe_cms_entry` to ensure the data is gone and quotas are managed.

## Benefits

- Stop jumping between the CMS UI, your code editor, and deployment dashboards. You manage creation, updates, and publishing status entirely through natural conversation.
- When you need to audit content type fields or validate rules for a new feature, use `get_schema_details` to pull exact property information without manual database queries.
- Need to ensure the latest version of content is live? Use `publish_to_environment` to trigger an automated validation check and push data instantly to production.
- Asset management gets easier. Instead of guessing URLs, use `list_media_assets` or `get_media_asset` to retrieve explicit metadata for every file.
- The MCP allows you to create draft entries using complex JSON structures with the `create_cms_entry` tool, making content drafting repeatable and precise.

## How It Works

The bottom line is you control complex content workflows using simple natural language commands through one connection point.

1. Subscribe to this MCP on Vinkius, then provide your Contentstack Stack API Key and Management Token.
2. Directly use your AI client to ask for a content action, like 'List all blog entries for the last quarter' or 'Publish entry XYZ to production'.
3. The MCP executes the necessary calls against your CMS, returning structured data, confirmation status, or the requested metadata.

## Frequently Asked Questions

**How can I use Contentstack MCP to publish content changes without going into the CMS?**
You tell your agent exactly which entry and environment you want updated. The MCP handles the necessary validation checks and pushes the data live, confirming when it's done across development or production.

**I need to know what fields I can use for a new content type; how does Contentstack MCP help?**
The MCP lets you inspect global schemas. You run schema inspection to decode the exact field types and validation rules available, so your development is precise from day one.

**Can I use Contentstack MCP to draft content entries with specific data formats?**
Yes. You can generate new drafts using purely formatted JSON attributes via the `create_cms_entry` tool, which guarantees your data payload matches what the CMS expects.

**How do I get media assets and URLs from Contentstack MCP?**
You use the agent to retrieve explicit media metadata. It provides the original Contentstack URLs for every asset ID you specify, eliminating manual CDN scraping.

**Does Contentstack MCP help me audit old or unused content in my CMS?**
Yes. You can use the `list_type_entries` tool to identify all existing document spaces and review which entries exist for a given schema, helping you clean up quotas.