# Contentstack MCP for AI Agents MCP

> Contentstack gives your AI agent instant read access to published digital content and schemas from a headless CMS. Your agent can search for live articles by title, pull specific asset URLs (like images or PDFs), and audit the underlying data structure of any content type in real time.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** api-delivery, content-retrieval, omnichannel, schema-management, content-delivery-network

## Description

This MCP connects your AI client directly to Contentstack's Delivery API, letting your agent read your published digital assets securely. Instead of relying on outdated documentation, your agent can pull live information from your entire stack—whether that’s a specific blog post entry or the schema definition for a new content type. You can ask it to find the exact URL for an image used in a campaign, or search through thousands of entries looking only for those tagged 'Q3 2024 Marketing'. It's like giving your agent real-time eyes into your entire publishing environment. If you use Vinkius, this MCP adds Contentstack functionality alongside hundreds of others, keeping all your critical data sources in one place.

It handles everything from high-level metadata checks to detailed structural inspections, making it useful for developers who need live payload structures or content managers needing quick audits of 'staging' versus 'production' copies.

## Tools

### get_asset_details
Retrieves specific details about a single media asset by its ID.

### get_content_type_details
Reads the structural schema definition for any given content type.

### get_entry
Fetches all detailed, published content for a specific entry ID.

### get_stack_summary
Retrieves high-level metadata about the entire Contentstack environment.

### list_assets
Lists all available published media assets in your library.

### list_content_types
Provides a list of every content structure defined within the stack.

### list_entries
Lists all published entries belonging to one specific content type.

### search_entries
Searches for and retrieves multiple entries using a complex, customizable JSON query.

### sync_content
Checks for and pulls only the changes that have occurred in the content since your last successful sync.

## Prompt Examples

**Prompt:** 
```
Pull the full text and featured image URL for the blog post titled 'Future Trends in AI' from the production site.
```

**Response:** 
```
**Content Found:**
*   **Title:** Future Trends in AI
*   **Author:** Jane Smith
*   **Published:** 2024-10-01
*   **Summary:** The main text emphasizes LLM advancements mapped over the next five years.
*   **Featured Asset URL:** `https://cdn.contentstack.com/assets/banner-ai-v3.jpg`
```

**Prompt:** 
```
What are the required fields for a 'Team Member' profile entry?
```

**Response:** 
```
**Content Type Schema: Team Member**
*   **heading:** Short text (Mandatory)
*   **bio_text:** Long text (Optional)
*   **avatar:** File reference (Mandatory)
*   **department:** Text field (Optional)
```

**Prompt:** 
```
Show me the three most recently uploaded assets.
```

**Response:** 
```
Here are the latest items from your library:

1.  `Product-Logo-v2.svg` (Type: SVG, Size: 15KB)
2.  `Banner-Spring-2024.png` (Type: PNG, Size: 890KB)
3.  `AnnualReport_Q2.pdf` (Type: PDF, Size: 4MB)
```

## Capabilities

### Query published articles by title or filter
Your agent reads specific blog posts or entries based on provided titles or search criteria.

### Retrieve media asset URLs and details
The MCP finds the direct, usable links for images, PDFs, or other files stored in your content library.

### Inspect content type schemas
Your agent reads the blueprint (schema) of any content type so you know exactly what data fields are available to use.

### List all published assets and types
You can ask the MCP to list every asset or every defined content structure within your stack.

### Search through massive entry sets
The agent performs deep searches across multiple entries using complex JSON queries for highly specific data points.

## Use Cases

### Debugging frontend rendering
A developer needs to know if the 'Author Bio' field exists and what its data type is. They use `get_content_type_details` so they can verify payload structures without leaving their IDE.

### Pre-launch content audit
A Content Manager needs to check if all 'Product Page' entries have a featured image and a body text. They use `search_entries` with filters, getting a clean list of missing data points.

### Finding campaign assets for social media
A marketing team member needs the direct URL for the 'Spring Sale' banner image. They ask to `get_asset_details`, and the agent provides the exact, usable CDN link immediately.

### Migrating content data
An integrator needs a baseline of all available structured content types before building an automated pipeline. They use `list_content_types` to map out every field they need to handle.

## Benefits

- Need to verify the structure of a new 'Hero Banner' model? Use `get_content_type_details` to read the schema blueprint before writing any front-end code.
- Instead of manually checking multiple tabs, ask for all content variants in a specific environment using `list_entries`. It pulls the data instantly into your chat context.
- Find that perfect image URL across thousands of assets. The MCP allows you to `get_asset_details` and pull direct CDN links without guessing file paths.
- Don't waste time re-fetching everything. Use `sync_content` to tell your agent only what has changed since the last check, making queries faster.
- Need a specific article? The MCP lets you search using `search_entries`, running complex JSON filters that go way beyond simple title searches.

## How It Works

The bottom line is, you talk naturally to your AI agent and get structured data pulled directly from your live publishing environment.

1. Link your Contentstack workspace to the MCP using a read-only Delivery Token and your Stack API Key.
2. Your agent sends natural language requests, specifying what content or assets it needs (e.g., 'Find the hero banner text').
3. The MCP executes the necessary query against Contentstack, returning validated data payloads like article bodies or asset URLs to your client.

## Frequently Asked Questions

**How do I use the Contentstack MCP to find content schemas?**
You simply ask your agent what structure a specific content type needs. The MCP reads the underlying schema definition, so you know exactly which fields—like 'headline' or 'main_body'—you can expect when retrieving data.

**Can Contentstack help me find asset URLs for my website?**
Yes. You ask your agent to list assets, and it retrieves the direct CDN links for images, PDFs, or any other file stored in your content library so you can use them immediately.

**What if I need content from a specific environment like 'staging'?**
You guide your agent to target the correct environment name. This ensures that when you pull entries, you get the version of the content meant for review or testing, not what's live.

**Is Contentstack MCP good for large-scale data migration?**
Yes. It offers tools like `sync_content` and `list_entries`, letting you check only the delta of changes since your last sync, which makes migrating or auditing massive amounts of content much faster.

**Does Contentstack MCP help me search for specific articles?**
Absolutely. You don't have to rely on titles; you can use the agent to run complex JSON queries against entries, allowing you to filter results by author ID, date range, or custom tags.