Contentstack MCP Server
Note: This document is provided for informational purposes only. While the Contentstack MCP Server is available for internal experimentation and review, it is not yet a recommended or officially supported tool. Please proceed accordingly and consult the relevant teams if needed.
The Contentstack’s Model Context Protocol (MCP) Server acts as a bridge between Contentstack’s APIs, i.e., Contentstack Delivery API, Contentstack Management API, Analytics API, Brand Kit API, Launch API, Lytics API, Personalize API, and AI systems. It implements the Model Context Protocol (MCP) to enable natural language-based content operations, making content workflows smarter and more conversational.
Key Capabilities
- Content operations: Create, update, delete, publish, or unpublish content via natural language commands.
- Analytics API Integration: Comprehensive usage analytics and monitoring capabilities including API usage, CDN usage, device statistics, URL tracking, status code monitoring, cache performance, and SDK usage insights.
- Analytics with Lytics: Classify content, manage audiences, and gain insights into engagement.
- Brand Kit integration: Use AI to generate brand-consistent content with your voice profiles.
- Launch Deployment: Complete deployment platform integration with environment management, deploy hooks, deployments, and CDN cache revalidation for hosting Contentstack-powered websites.
- Personalize API Integration: Advanced personalization capabilities with audience segmentation, A/B testing, experience management, and analytics for optimizing user engagement.
Setup Instructions (if needed)
1. Authenticate
If you need to explore or test the MCP Server, you need to connect it with an MCP client such as Claude:
npx @contentstack/mcp --auth
Select Authorization, and the preferred region as shown below:

Note: This step is mandatory for accessing Content Management API (CMA), Analytics API, Brand Kit API, Launch API, and Personalize API tools.

2. Configure MCP
To add the claude_desktop_config.json in Claude, follow these steps:
- Open Claude Desktop.
- Click the Claude icon in the top-left corner of the window.
- Select Settings from the dropdown menu.
- In the Settings pop-up, go to the Developer tab.
- Click Edit Config.
- Claude will redirect you to the claude_desktop_config.json file where you can add or update the Claude configuration.
Update your claude_desktop_config.json or similar file:
{
"mcpServers": {
"contentstack": {
"command": "npx",
"args": ["-y", "@contentstack/mcp"],
"env": {
"CONTENTSTACK_API_KEY": "<your_stack_api_key>",
"CONTENTSTACK_DELIVERY_TOKEN": "<your_delivery_token>",
"CONTENTSTACK_BRAND_KIT_ID": "<your_brand_kit_id>",
"CONTENTSTACK_LAUNCH_PROJECT_ID": "<your_launch_project_id>",
"CONTENTSTACK_PERSONALIZE_PROJECT_ID": "<your_personalize_project_id>",
"LYTICS_ACCESS_TOKEN": "<your_lytics_token>",
"GROUPS": "<comma_separated_groups>"
}
}
}
}
- CONTENTSTACK_DELIVERY_TOKEN: Only needed for delivery API tools (CDA).
- CONTENTSTACK_BRAND_KIT_ID: Required for Brand Kit related tools.
- LYTICS_ACCESS_TOKEN: Required for Lytics analytics tools.
- CONTENTSTACK_PERSONALIZE_PROJECT_ID: Required for Personalize tools.
- CONTENTSTACK_LAUNCH_PROJECT_ID: Required only for Launch tools.
- GROUPS:Specifies a comma-separated list of API groups to enable. Allowed values are cma (default), cda, analytics, brand kit, launch, lytics, personalize, and all.
3. Understand the Group Requirements
Group | Authentication | Required Inputs |
CMA | OAuth | Stack API Key |
CDA | Token | Stack API Key + Delivery Token |
Analytics | OAuth | Stack API Key |
Brand Kit | OAuth | Stack API Key + Brand Kit ID |
Launch | OAuth | Stack API Key + Launch Project ID |
Lytics | Token | Lytics Access Token |
Personalize | OAuth | Stack API Key + Personalize Project ID |
4. Start the Server
Once configured, launch your client (for example, Claude Desktop or any MCP-compatible app), and the server will begin operating in the background.
For Local Development:
- Start the MCP server in watch mode
Run the following command to enable auto-rebuilding of the MCP server with every change:
npm run dev
- Update claude_desktop_config.json
Modify the config file to point to your local MCP server.
Example:
{ "mcpServers": { "contentstack": { "command": "node", "args": ["/path/to/mcp/dist/index.js"], "env": { "CONTENTSTACK_API_KEY": "<your_stack_api_key>", "CONTENTSTACK_DELIVERY_TOKEN": "<your_delivery_token>", "CONTENTSTACK_BRAND_KIT_ID": "<your_brand_kit_id>", "CONTENTSTACK_LAUNCH_PROJECT_ID": "<your_launch_project_id>", "CONTENTSTACK_PERSONALIZE_PROJECT_ID": "<your_personalize_project_id>", "LYTICS_ACCESS_TOKEN": "<your_lytics_token>", "GROUPS": "<comma_separated_groups>" } } } }
This configuration allows you to test MCP server updates directly with Claude Desktop. However, if you add new tools or resources, you need to restart Claude Desktop for the changes to take effect.
Integration Scenarios
Some practical ways to use the MCP Server with various tools and environments.
- Claude Desktop: Configure it to route commands to the MCP server.
- Custom AI Agents: Connect to Claude, Cursor IDE, or custom LLMs.
Licensing
This tool is open-source under the MIT License. You are free to use and extend it as needed.