@contentstack/mcp
v0.3.0
Published
A Model Context Protocol (MCP) server that connects with Contentstack's Content Management API, Content Delivery API, BrandKit AI, Personalize API, Analytics API, Launch API, Developer Hub, and Lytics, delivering extensive content administration, manipula
Readme
Contentstack MCP Server
A Model Context Protocol (MCP) server that connects with Contentstack's Content Management API, Content Delivery API, BrandKit AI, Personalize API, Analytics API, Launch API, Developer Hub, and Lytics, delivering extensive content administration, manipulation, delivery, personalization, analytics, deployment, marketplace App management, and insights functionality.
Features
- Content Management: Full CRUD operations for entries and assets across multiple content types, with comprehensive operations for creating, retrieving, updating, and deleting content.
- Content Delivery: Access to published content through CDN-delivered assets and entries with support for environments, locales, and fallback options.
- Taxonomy and Term Management: Create and manage taxonomies and their associated terms, supporting hierarchical structures with ancestor and descendant relationships.
- Localization: Support for multiple locales with capabilities to localize and unlocalize entries, allowing content to be managed across different languages and regions.
- Publishing Workflow: Complete publishing pipeline with functionality to publish, unpublish, and schedule content releases across multiple environments.
- Branch and Environment Management: Robust tools for managing different branches, environments, and aliases, with features for merging and deploying content between branches.
- Variant Management: Support for content variants with dedicated tools for retrieving and managing different variants of entries.
- Release Management: Comprehensive release functionality allowing creation, cloning, deployment, and management of content releases.
- Asset Management: Complete asset lifecycle management with support for references, publishing, and unpublishing across environments.
- Global Field Management: Tools for retrieving and managing global fields that can be reused across content types.
- Analytics: Comprehensive usage analytics and monitoring capabilities including API usage, CDN usage, device statistics, URL tracking, status code monitoring, cache performance, and SDK usage insights.
- BrandKit AI Integration: Voice profile management, knowledge vault operations, and AI-powered content generation with brand consistency.
- Launch Deployment: Complete deployment platform integration with environment management, deploy hooks, deployments, and CDN cache revalidation for hosting Contentstack-powered websites.
- Lytics Analytics: Audience management, content classification, user profiling, and advanced analytics capabilities.
- Personalization: Advanced personalization capabilities with audience segmentation, A/B testing, experience management, and analytics for optimizing user engagement.
- Developer Hub: Complete Marketplace App lifecycle management with capabilities to create, update, delete, and retrieve Marketplace Apps, manage app installations across stacks and organizations.
- Flexible Query Options: Advanced query capabilities with support for pagination, filtering, sorting, and including associated data.
API Groups
The MCP server supports multiple API groups that can be used independently or together:
- CMA (Content Management API): Core content management functionality
- CDA (Content Delivery API): Published content delivery via CDN
- Analytics: Usage analytics, performance monitoring, and operational insights
- BrandKit: AI-powered brand management and content generation
- Launch: Deployment platform for hosting and managing Contentstack-powered websites
- DeveloperHub: Marketplace app lifecycle management and installations
- Lytics: Advanced analytics and audience insights
- Personalize: Advanced personalization and A/B testing capabilities
- All: Enable all API groups
Tools
Content Management API (CMA)
Entry Management
- publish_an_entry: This tool publishes a specified entry from a selected content type to one or more environments and locales within a designated branch of the stack.
- unpublish_an_entry: This tool unpublishes a specified entry from selected environments and locales within a Contentstack stack branch, removing the entry from the CDN and making it inaccessible via delivery APIs.
- publish_variants_of_an_entry: This tool publishes specified entry variants to selected environments and locales within a defined branch, supporting variant group targeting for content type entries.
- create_an_entry: This tool creates a new entry in the specified Contentstack stack, targeting a defined content type and branch, with support for locale selection and structured entry data.
- delete_an_entry: This tool deletes a specified entry from a Contentstack stack, targeting the provided content type and entry ID, with optional parameters for branch, locale, and deletion of all localized variants.
- get_all_entries: This tool retrieves entry details for a specified content type within a Contentstack stack, supporting branch selection, pagination, versioning, locale filtering, advanced query parameters, and optional inclusion of metadata, workflow, branch, and publish details.
- get_single_entry: This tool retrieves metadata and field values for a specified entry within a given content type, supporting branch, version, and locale selection, with optional inclusion of workflow, branch, and publish details.
- update_an_entry: This tool updates an existing entry in a specified Contentstack stack, branch, and locale by modifying its field data according to the provided content type and entry identifier.
- localize_an_entry: This tool localizes a specified entry within a stack by creating or updating its content for the target locale, ensuring the entry becomes independent from the fallback locale.
- unlocalize_an_entry: This tool unlocalizes a specified entry in a given locale, restoring the entry to its original non-localized state within the selected branch and content type.
Content Type Management
- get_all_content_types: This tool retrieves the schema and metadata of a specified content type from a Contentstack stack, supporting branch selection, query filtering, pagination, and optional inclusion of global field schema and branch metadata.
- get_a_single_content_type: This tool retrieves the schema and configuration details of a specified content type within a stack, supporting optional inclusion of global field definitions and branch metadata for developer reference.
- get_all_global_fields: This tool retrieves metadata for all global fields configured within the specified stack, supporting optional branch selection and branch metadata inclusion.
- get_a_single_global_field: This tool retrieves metadata and configuration details for a specified global field within a Contentstack stack, supporting branch selection and optional inclusion of branch context.
Variant Management
- get_all_variants_of_an_entry: This tool retrieves all locale variants of a specified entry within the selected content type, enabling access to localized entry data for further processing or analysis.
- get_single_entry_variant: This tool retrieves a specific variant of a content entry from a designated content type, branch, and locale, using the provided entry and variant identifiers.
- get_all_variants_of_a_content_type: This tool retrieves all variant definitions linked to the specified content type, enabling programmatic access to variant metadata for content modeling and management.
- get_a_single_variant: This tool retrieves detailed information for a specified variant within a designated Variant Group using the provided variant_id and variant_group_uid parameters.
Taxonomy Management
- get_all_taxonomies: This tool retrieves metadata for all taxonomies within a specified stack, supporting pagination via limit and skip parameters, and enabling filtered search by UID or name.
- get_a_single_taxonomy: This tool retrieves metadata and configuration details for a specified taxonomy, with optional inclusion of term, referenced term, and referenced entry counts for advanced content modeling and reporting.
- export_a_taxonomy: This tool exports a taxonomy and all its associated terms from the specified stack in the selected format, supporting structured data extraction for taxonomy management.
- create_a_taxonomy: This tool creates a new taxonomy object within the specified stack, assigning the provided UID, name, and optional description for structured content classification.
- update_a_taxonomy: This tool updates the name and description fields of a specified taxonomy entity using its unique identifier.
- delete_a_taxonomy: This tool deletes the specified taxonomy and all associated terms from the stack.
Term Management
- get_all_terms: This tool retrieves all term details for a specified taxonomy from the stack, supporting pagination via limit and skip parameters.
- get_all_terms_across_all_taxonomies: This tool retrieves term details from all taxonomies within the stack, supporting typeahead search, pagination via limit and skip, and optional total count inclusion.
- get_all_ancestors_of_a_term: This tool retrieves the complete ancestor hierarchy for a specified term within a taxonomy, supporting pagination via limit and skip parameters.
- get_all_descendants_of_a_term: This tool retrieves all descendant terms of a specified taxonomy term, supporting pagination via limit and skip parameters.
- get_a_single_term: This tool retrieves detailed metadata for a specified taxonomy term, supporting optional inclusion of child term and referenced entry counts.
- create_a_term: This tool creates a new term within a specified taxonomy by assigning a unique identifier, name, order, and optional parent term.
- update_a_term: This tool updates the name property of a specified term within a taxonomy using the provided taxonomy_uid and term_uid identifiers.
- delete_a_term: This tool deletes a specified term from a taxonomy using the provided taxonomy_uid and term_uid parameters; supports forced deletion via the force flag.
Asset Management
- get_all_assets: This tool retrieves metadata for all assets within a specified stack, supporting environment and branch filters, with pagination via limit and skip parameters.
- get_a_single_asset: This tool retrieves metadata and properties for a specified asset within a Contentstack stack, supporting branch, environment, and version parameters for precise asset identification and retrieval.
- get_asset_reference: This tool retrieves all entries referencing the specified asset within the selected branch, enabling asset dependency analysis and content relationship management.
- delete_an_asset: This tool permanently deletes the specified asset from the selected branch within the stack.
- publish_an_asset: This tool publishes a specified asset from a selected branch to one or more environments and locales within a stack, with optional scheduling for future deployment.
- unpublish_an_asset: This tool unpublishes a specified asset from selected environments and locales within a given branch, with optional scheduling for deferred execution.
Language Management
- get_all_languages: This tool retrieves metadata for all languages configured within a specified stack branch, supporting pagination via limit and skip parameters.
Environment Management
- get_all_environments: This tool fetches the list of environments in a stack with optional total-count reporting and ascending/descending sorting by any environment field.
- create_an_environment: This tool creates a new environment in the stack by specifying its name and one or more locale-specific base URLs.
- get_an_environment: This tool retrieves full details for a single environment, identified by its name.
- update_an_environment: This tool updates an existing environment, identified by its name in the URL path. You can change the environment's name and/or its locale-to-URL mappings.
- delete_an_environment: This tool permanently deletes an environment, identified by its name.
Branch Management
- get_all_branches: This tool retrieves metadata for all branches within a specified stack, supporting pagination via limit and skip parameters.
- get_a_single_branch: This tool retrieves metadata and configuration details for a specified branch within a Contentstack stack, enabling branch-level inspection and management.
- merge_branch: This tool merges content types and global fields from a compare branch into a base branch, with optional per item strategy overrides.
- get_all_branch_aliases: This tool retrieves metadata for all branch aliases within a specified stack, supporting pagination via limit and skip parameters.
- get_a_single_branch_alias: This tool retrieves metadata and configuration details for a specified branch alias within a Contentstack stack, enabling branch management and validation operations.
- get_a_single_merge_job: This tool retrieves detailed information for a specified merge job within a stack, using the provided merge_job_uid parameter.
Release Management
- get_all_releases: This tool retrieves metadata for all releases within a specified stack, supporting branch selection, pagination via limit and skip parameters, and optional inclusion of total and item counts.
- get_a_single_release: This tool retrieves metadata and configuration details for a specified release within a given branch, supporting optional inclusion of branch information for developer reference and audit purposes.
- get_all_items_in_a_release: This tool retrieves metadata and content details for all items associated with the specified release_id, optionally including branch information if include_branch is true.
- create_a_release: This tool creates a new empty release object within the specified stack branch, initializing it with a required name and optional description; supports branch selection and inclusion parameters for release management.
- clone_a_release: This tool creates a duplicate of an existing release in the specified branch, assigning a new name and optional description to the cloned release.
- add_items_to_a_release: This tool programmatically adds specified content items to a designated release within a Contentstack stack branch by accepting structured item data in JSON format, enabling automated release management and deployment workflows.
- delete_items_from_a_release: This tool programmatically removes specified content items from a designated release within a Contentstack stack branch, requiring the release identifier and item data in JSON format for precise targeting and execution.
- deploy_a_release: This tool deploys a specified release to one or more target environments within a Contentstack stack, supporting branch selection and optional scheduling for automated release publishing.
Publishing Management
- get_publish_queue: This tool retrieves metadata and content for all entries, both published and unpublished, within a specified stack branch, supporting query filtering, pagination, and branch selection.
Content Delivery API (CDA)
- get_all_entries_cdn: This tool retrieves CDN-delivered, published entries for the specified content type with optional environment, pagination, and localization support.
- get_a_single_entry_cdn: This tool returns CDN-delivered data for a published entry UID of a content type with options for environment and locale.
- get_all_assets_cdn: This tool returns CDN metadata for all publicly published assets in the specified environment (with optional branch/locale filtering), supporting version, publish-details, and metadata filters.
- get_a_single_asset_cdn: This tool retrieves CDN metadata for a published asset UID in the specified environment, enabling deterministic delivery.
Analytics API
Usage Analytics
- get_subscription_usage: This tool provides a summary of Launch resource usage within your organization, returning the total number of Launch projects, environments, and configured domains for resource utilization overview.
- get_usage_analytics: This tool provides a comprehensive overview of your organization's API and CDN usage over a specified period, including bandwidth metrics, request counts, and usage patterns for resource management optimization.
Performance Monitoring
- get_device_usage: This tool tracks device usage by providing insights into the servers and environments your customers use to access your website or services, supporting performance monitoring and user experience optimization.
- get_top_urls: This tool provides a summary of the number of requests made to your URLs for specified services over a given period, helping monitor traffic patterns and identify high-traffic URLs.
- get_status_code: This tool provides detailed statistics on API requests by HTTP status code over a specified period, helping monitor API performance, identify errors, and ensure reliability.
- get_cache_usage: This tool provides insights into cache usage by showing the number of HIT and MISS instances for specified services, helping analyze cache efficiency and optimize caching strategies.
- get_sdk_usage: This tool provides insights into SDK usage by showing the number of requests made using specific SDKs across different services, helping track SDK adoption and assess effectiveness.
Job Management
- get_job_data: This tool retrieves the actual response data for a given jobId generated from previous Analytics API requests, serving as a follow-up step to fetch completed results from asynchronous operations.
BrandKit AI
Knowledge Vault Management
- create_an_content_in_knowledge_vault: This tool creates a new content in the Knowledge Vault for the specified Brand Kit, accepting structured content as input.
- get_all_contents_in_knowledge_vault: This tool retrieves metadata and content details for all contents associated with the specified brandkit_id from the Knowledge Vault.
- get_a_single_content_in_knowledge_vault: This tool retrieves metadata and content details for a specified Knowledge Vault content using the provided brandkit_id and knowledge_vault_content_id parameters.
- update_a_content_in_knowledge_vault: This tool updates the content of a specified content in the Knowledge Vault by referencing the associated brand kit and content UID.
- delete_a_content_from_knowledge_vault: This tool permanently deletes a specified content from the Knowledge Vault for the specified Brand Kit.
- get_data_chunks_from_knowledge_vault: This tool retrieves metadata and content details of data chunks from the Knowledge Vault by executing a search query against the specified Brand Kit using the provided content string.
Voice Profile Management
- create_a_voice_profile: This tool creates a new Voice Profile within a specified Brand Kit by accepting parameters such as brandkit_id, name, description, and formality_level.
- get_all_voice_profiles: This tool retrieves metadata for all voice profiles associated with the specified Brand Kit. Voice profile, Brand Kit.
- get_a_single_voice_profile: This tool retrieves detailed information for a specified voice profile within a designated Brand Kit using the provided brandkit_id and profile_id parameters.
- update_a_voice_profile: This tool updates an existing voice profile within a specified Brand Kit by modifying attributes such as name, description, and formality level. Voice profile management, Brand Kit
- delete_a_voice_profile: This tool deletes a specified voice profile from a designated Brand Kit by referencing the provided brandkit_id and profile_id parameters.
AI Content Generation
- generative_ai: This tool retrieves AI-generated content based on the specified prompt, utilizing the selected Brand Kit, optional Voice Profile, and Knowledge Vault integration for enhanced contextual relevance.
Launch API
Environment Management
- get_environments: Retrieves environment configurations with comprehensive details including build settings, deployment information, password protection, and recent commits using cursor-based pagination. Returns empty commits if the project was created by file upload and not connected to GitHub.
Deploy Hook Management
- get_deploy_hooks: Retrieves deploy hooks configurations with filtering capabilities using cursor-based pagination. Deploy hooks are automated triggers that initiate deployments when specific conditions are met, such as webhook calls or repository changes.
- create_deploy_hook: Creates a new deploy hook for an environment. Deploy hooks are automated triggers that initiate deployments when called via webhook URL, enabling integration with CI/CD pipelines and external automation systems.
- update_deploy_hook: Updates an existing deploy hook configuration. Allows modification of the deploy hook name and environment association while preserving the webhook URL and other metadata.
- delete_deploy_hook: Deletes an existing deploy hook from an environment. This action permanently removes the deploy hook and disables its webhook URL, preventing future automated deployments through this hook.
- trigger_deploy_hook: Triggers an existing deploy hook for an environment. This allows for manual or automated re-deployments using the webhook URL associated with the hook.
Deployment Management
- get_latest_live_deployment: Retrieves the most recent live deployment for a specified environment or project. Returns comprehensive deployment details including build configuration, Git information, deployment status, and performance metrics.
- create_deployment: Creates a new deployment for the specified environment. Initiates the build and deployment process using the latest commit from the environment's configured Git branch.
Cache Management
- revalidate_cdn_cache: Revalidates the CDN cache for an environment when content or configuration is modified. Prompts the CDN to fetch the latest content from the origin server, ensuring visitors see the most up-to-date version across all domains in the environment.
Developer Hub
Marketplace App Management
- create_an_app: Creates a Marketplace App in an Organization.
- update_an_app: Updates a specified Marketplace App in an Organization.
- delete_an_app: Deletes a specified Marketplace App from an Organization.
- get_an_app: Retrieves detailed information for a specified Marketplace App from an Organization.
- get_all_apps: Retrieves all Marketplace Apps with pagination support, search capabilities, and filtering options for target type, enabling efficient Marketplace App discovery and management.
Marketplace App OAuth Management
- get_app_oauth: Retrieves the OAuth configuration details for a specified Marketplace App.
- get_oauth_scopes: Retrieves available OAuth scopes for Marketplace Apps, with optional filtering by app type (stack or organization).
- update_app_oauth: Updates the OAuth configuration for a specified Marketplace App, including redirect URIs, user token configuration, and app token configuration for secure API access.
Marketplace App Installation Management
- install_an_app: Installs a specified Marketplace App in a target stack or organization, enabling Marketplace App functionality within the designated scope based on app configuration.
- update_an_app_installation: Updates a specified Marketplace App installation in a stack or organization.
- get_app_installations: Retrieves all installations for a specified Marketplace App, providing visibility into where and how the Marketplace App is deployed across stacks and organizations.
- uninstall_an_app: Uninstalls a specified Marketplace App from a stack or organization, removing Marketplace App functionality and cleaning up Marketplace App-related configurations.
Lytics Analytics
Audience Management
- lytics_get_all_audiences: This tool retrieves the details of all audiences from a connected Lytics account for review or further processing. Audience management, data retrieval
- lytics_get_a_single_audience: This tool retrieves the details of a specific audience from a connected Lytics account for inspection or targeted operations. Audience management, data lookup
- get_field_information: This tool retrieves field details from a selected audience within a connected Lytics account for analysis or integration. Audience insights, field metadata
Content Analysis
- classify_content: This tool scrapes a specified website to extract and store key content in Lytics for further analysis and activation. Website scraping, content extraction
- enrich_content: This tool sends specified content—either a website URL or text data—to Lytics to fetch inferred topics based on content analysis and audience insights. Content enrichment, topic inference
- get_content_topics: This tool retrieves all available content topics from a connected Lytics account for categorization or content analysis. Content taxonomy, topic retrieval
User Insights
- get_a_user_profile: This tool retrieves the details of a specific user from a connected Lytics account for profiling or personalization. User insights, data lookup
Data Management
- get_accounts: This tool fetches all accounts associated with a connected Lytics instance for management or integration purposes. Account management, data retrieval
- get_fields: This tool fetches all fields for use in data mapping or configuration. Field retrieval, data management
- get_tables: This tool retrieves all tables for use in data access or management. Table retrieval, database overview
Personalize API
Attribute Management
- create_attribute: This tool creates a new custom attribute in a Personalize project, defining user characteristics for audience segmentation and content personalization targeting.
- get_all_attributes: This tool retrieves all custom and preset attributes available in a Personalize project for user segmentation and targeting analysis.
- update_attribute: This tool modifies an existing attribute's properties in a Personalize project, allowing updates to name, key, or description fields.
- delete_attribute: This tool permanently removes an attribute from a Personalize project, ensuring cleanup of unused user characteristics from segmentation.
Audience Management
- get_all_audiences: This tool retrieves all audience segments from a Personalize project, with optional filtering by referenced attributes for targeted analysis.
- delete_audience: This tool permanently removes an audience segment from a Personalize project, cleaning up unused targeting definitions.
Experience Management
- create_experience: This tool creates a new personalization experience (Segmented or A/B Test) in a Personalize project, automatically generating a draft version for configuration.
- get_all_experiences: This tool retrieves all personalization experiences from a Personalize project, with optional filtering by referenced audiences or events for analysis.
- get_single_experience: This tool retrieves detailed information about a specific personalization experience from a Personalize project, including its current configuration and status.
- update_experience: This tool modifies an existing experience's metadata in a Personalize project, allowing updates to name and description but not type conversion.
- delete_experience: This tool permanently removes a personalization experience from a Personalize project, including all associated versions and configurations.
- get_experience_versions: This tool retrieves all versions of a specific experience from a Personalize project, sorted by creation date for version history analysis.
- delete_experience_version: This tool discards a draft version of an experience in a Personalize project, deletion of active, paused, or archived versions is not allowed.
Experience Priority Management
- get_experiences_priority: This tool retrieves the priority order configuration for all experiences in a Personalize project, determining content display precedence.
- update_experiences_priority: This tool modifies the priority order of experiences in a Personalize project, controlling which experience displays when multiple target the same content area.
Event Management
- create_event: This tool creates a new event definition in a Personalize project for tracking user interactions and measuring experience performance metrics.
- get_all_events: This tool retrieves all event definitions from a Personalize project for tracking and analytics configuration review.
- update_event: This tool modifies an existing event definition in a Personalize project, allowing updates to the key identifier and description.
- delete_event: This tool permanently removes an event definition from a Personalize project, cleaning up unused tracking configurations.
Analytics
- get_analytics_summary: This tool retrieves performance analytics summary for a specific experience version, including impressions, conversions, and probability-to-be-best calculations for optimization insights.
- get_analytics_timeseries: This tool retrieves hourly time-series analytics data for a specific experience version, providing detailed performance trends over time for optimization analysis.
Geolocation Support
- get_countries: This tool retrieves country information based on ISO 3166-1 standard for geographic targeting in Personalize audience definitions and segmentation.
- get_regions: This tool retrieves region information based on ISO 3166-2 standard for geographic targeting in Personalize audience definitions and state-level segmentation.
- get_cities: This tool retrieves city information for geographic targeting in Personalize audience definitions and local-level content personalization.
Configuration
Prerequisites
- Create a Contentstack account at Contentstack
OAuth Setup (Required for CMA, Analytics, BrandKit, Launch, DeveloperHub, and Personalize)
Important: Before using Content Management API (CMA), Analytics, BrandKit, Launch, DeveloperHub, or Personalize tools, you must authenticate using OAuth:
npx @contentstack/mcp --authThis will guide you through the OAuth setup process and store your authentication tokens securely.
Additional Token Requirements
- For Content Delivery API access, generate a Delivery token for the appropriate environment
- For BrandKit access, obtain your Brand Kit Project ID from your Contentstack account
- For Launch access, obtain your Launch Project ID from your Contentstack Launch dashboard
- For Lytics access, generate a Lytics Access token from your Lytics account
- For Personalize access, obtain your Personalize Project ID from your Contentstack account
Environment Variables
These variables can also be set as arguments
CONTENTSTACK_API_KEY/--stack-api-key: Your Stack API KeyCONTENTSTACK_DELIVERY_TOKEN/--delivery-token: Your Stack Delivery token (required only if using CDN/Delivery API tools)CONTENTSTACK_BRAND_KIT_ID/--brand-kit-id: Your Brand Kit ID (required for BrandKit tools)CONTENTSTACK_LAUNCH_PROJECT_ID/--launch-project-id: Your Launch Project ID (required for Launch tools)LYTICS_ACCESS_TOKEN/--lytics-access-token: Your Lytics access token (required for Lytics tools)CONTENTSTACK_PERSONALIZE_PROJECT_ID/--personalize-project-id: Your Personalize Project ID (required for Personalize tools)GROUPS/--groups: Comma-separated list of API groups to enable (options:cma,cda,analytics,brandkit,launch,developerhub,lytics,personalize,all. Default:cma)
Group Requirements Summary
| Group | Authentication | Required Tokens/Configuration | | ---------------- | -------------- | -------------------------------------- | | CMA | OAuth | Stack API Key | | CDA | Token-based | Stack API Key + Delivery Token | | Analytics | OAuth | Stack API Key | | BrandKit | OAuth | Stack API Key + Brand Kit ID | | Launch | OAuth | Stack API Key + Launch Project ID | | DeveloperHub | OAuth | Stack API Key | | Lytics | Token-based | Lytics Access Token | | Personalize | OAuth | Stack API Key + Personalize Project ID |
Usage with Claude Desktop
You can use this MCP without cloning the repository by simply modifying your Claude Desktop configuration file. Just edit ~/Library/Application Support/Claude/claude_desktop_config.json to include the necessary configuration.
{
"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>"
}
}
}
}Notes:
- The
CONTENTSTACK_DELIVERY_TOKENis optional and only required if you plan to use the Content Delivery API (CDA) tools. - The
CONTENTSTACK_BRAND_KIT_IDis required only for BrandKit tools. - The
CONTENTSTACK_LAUNCH_PROJECT_IDis required only for Launch tools. - The
CONTENTSTACK_PERSONALIZE_PROJECT_IDis required only for Personalize tools. - The
LYTICS_ACCESS_TOKENis required only for Lytics tools. - Before using CMA, Analytics, BrandKit, Launch, DeveloperHub, or Personalize groups, you must first run OAuth authentication:
npx @contentstack/mcp --auth
If your MCPClient doesn't support environment variables, you can alternatively provide the required authentication parameters as command-line arguments:
{
"mcpServers": {
"contentstack": {
"command": "npx",
"args": [
"-y",
"@contentstack/mcp",
"--stack-api-key",
"<YOUR_STACK_API_KEY>",
"--delivery-token",
"<YOUR_DELIVERY_TOKEN>",
"--brand-kit-id",
"<YOUR_BRAND_KIT_ID>",
"--launch-project-id",
"<YOUR_LAUNCH_PROJECT_ID>",
"--lytics-access-token",
"<YOUR_LYTICS_TOKEN>",
"--personalize-project-id",
"<YOUR_PERSONALIZE_PROJECT_ID>",
"--groups",
"<COMMA_SEPARATED_GROUPS>"
]
}
}
}Developing and using Claude desktop
If you want to contribute and test what Claude does with your contributions;
- run
npm run dev, this will start the watcher that rebuilds the MCP server on every change - update
claude_desktop_config.jsonto reference the project directly, ie;
{
"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 setup enables direct testing of MCP server modifications with Claude, though adding new tools or resources will necessitate restarting Claude Desktop.
The MIT License (MIT)
Copyright © 2025 Contentstack. All Rights Reserved
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
