@contentstack/mcp 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +267 -36
  2. package/dist/index.js +1058 -103
  3. package/package.json +6 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Contentstack MCP Server
2
2
 
3
- A Model Context Protocol (MCP) server that connects with Contentstack's Content Management API and Content Delivery API, delivering extensive content administration, manipulation, and delivery functionality.
3
+ 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.
4
4
 
5
5
  ## Features
6
6
 
@@ -14,11 +14,33 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
14
14
  - **Release Management**: Comprehensive release functionality allowing creation, cloning, deployment, and management of content releases.
15
15
  - **Asset Management**: Complete asset lifecycle management with support for references, publishing, and unpublishing across environments.
16
16
  - **Global Field Management**: Tools for retrieving and managing global fields that can be reused across content types.
17
+ - **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.
18
+ - **BrandKit AI Integration**: Voice profile management, knowledge vault operations, and AI-powered content generation with brand consistency.
19
+ - **Launch Deployment**: Complete deployment platform integration with environment management, deploy hooks, deployments, and CDN cache revalidation for hosting Contentstack-powered websites.
20
+ - **Lytics Analytics**: Audience management, content classification, user profiling, and advanced analytics capabilities.
21
+ - **Personalization**: Advanced personalization capabilities with audience segmentation, A/B testing, experience management, and analytics for optimizing user engagement.
22
+ - **Developer Hub**: Complete Marketplace App lifecycle management with capabilities to create, update, delete, and retrieve Marketplace Apps, manage app installations across stacks and organizations.
17
23
  - **Flexible Query Options**: Advanced query capabilities with support for pagination, filtering, sorting, and including associated data.
18
24
 
25
+ ## API Groups
26
+
27
+ The MCP server supports multiple API groups that can be used independently or together:
28
+
29
+ - **CMA** (Content Management API): Core content management functionality
30
+ - **CDA** (Content Delivery API): Published content delivery via CDN
31
+ - **Analytics**: Usage analytics, performance monitoring, and operational insights
32
+ - **BrandKit**: AI-powered brand management and content generation
33
+ - **Launch**: Deployment platform for hosting and managing Contentstack-powered websites
34
+ - **DeveloperHub**: Marketplace app lifecycle management and installations
35
+ - **Lytics**: Advanced analytics and audience insights
36
+ - **Personalize**: Advanced personalization and A/B testing capabilities
37
+ - **All**: Enable all API groups
38
+
19
39
  ## Tools
20
40
 
21
- ### Entry Management
41
+ ### Content Management API (CMA)
42
+
43
+ #### Entry Management
22
44
 
23
45
  - **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.
24
46
  - **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.
@@ -31,28 +53,21 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
31
53
  - **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.
32
54
  - **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.
33
55
 
34
- ### Content Type Management
56
+ #### Content Type Management
35
57
 
36
58
  - **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.
37
59
  - **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.
38
60
  - **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.
39
61
  - **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.
40
62
 
41
- ### Content Delivery (CDN)
42
-
43
- - **get_all_entries_cdn**: This tool retrieves CDN-delivered, published entries for the specified content type with optional environment, pagination, and localization support.
44
- - **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.
45
- - **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.
46
- - **get_a_single_asset_cdn**: This tool retrieves CDN metadata for a published asset UID in the specified environment, enabling deterministic delivery.
47
-
48
- ### Variant Management
63
+ #### Variant Management
49
64
 
50
65
  - **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.
51
66
  - **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.
52
67
  - **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.
53
68
  - **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.
54
69
 
55
- ### Taxonomy Management
70
+ #### Taxonomy Management
56
71
 
57
72
  - **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.
58
73
  - **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.
@@ -61,7 +76,7 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
61
76
  - **update_a_taxonomy**: This tool updates the name and description fields of a specified taxonomy entity using its unique identifier.
62
77
  - **delete_a_taxonomy**: This tool deletes the specified taxonomy and all associated terms from the stack.
63
78
 
64
- ### Term Management
79
+ #### Term Management
65
80
 
66
81
  - **get_all_terms**: This tool retrieves all term details for a specified taxonomy from the stack, supporting pagination via limit and skip parameters.
67
82
  - **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.
@@ -72,7 +87,7 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
72
87
  - **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.
73
88
  - **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.
74
89
 
75
- ### Asset Management
90
+ #### Asset Management
76
91
 
77
92
  - **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.
78
93
  - **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.
@@ -81,11 +96,11 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
81
96
  - **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.
82
97
  - **unpublish_an_asset**: This tool unpublishes a specified asset from selected environments and locales within a given branch, with optional scheduling for deferred execution.
83
98
 
84
- ### Language Management
99
+ #### Language Management
85
100
 
86
101
  - **get_all_languages**: This tool retrieves metadata for all languages configured within a specified stack branch, supporting pagination via limit and skip parameters.
87
102
 
88
- ### Environment Management
103
+ #### Environment Management
89
104
 
90
105
  - **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.
91
106
  - **create_an_environment**: This tool creates a new environment in the stack by specifying its name and one or more locale-specific base URLs.
@@ -93,7 +108,7 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
93
108
  - **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.
94
109
  - **delete_an_environment**: This tool permanently deletes an environment, identified by its name.
95
110
 
96
- ### Branch Management
111
+ #### Branch Management
97
112
 
98
113
  - **get_all_branches**: This tool retrieves metadata for all branches within a specified stack, supporting pagination via limit and skip parameters.
99
114
  - **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.
@@ -102,7 +117,7 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
102
117
  - **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.
103
118
  - **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.
104
119
 
105
- ### Release Management
120
+ #### Release Management
106
121
 
107
122
  - **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.
108
123
  - **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.
@@ -113,27 +128,224 @@ A Model Context Protocol (MCP) server that connects with Contentstack's Content
113
128
  - **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.
114
129
  - **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.
115
130
 
116
- ### Publishing Management
131
+ #### Publishing Management
117
132
 
118
133
  - **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.
119
134
 
135
+ ### Content Delivery API (CDA)
136
+
137
+ - **get_all_entries_cdn**: This tool retrieves CDN-delivered, published entries for the specified content type with optional environment, pagination, and localization support.
138
+ - **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.
139
+ - **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.
140
+ - **get_a_single_asset_cdn**: This tool retrieves CDN metadata for a published asset UID in the specified environment, enabling deterministic delivery.
141
+
142
+ ### Analytics API
143
+
144
+ #### Usage Analytics
145
+
146
+ - **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.
147
+ - **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.
148
+
149
+ #### Performance Monitoring
150
+
151
+ - **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.
152
+ - **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.
153
+ - **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.
154
+ - **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.
155
+ - **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.
156
+
157
+ #### Job Management
158
+
159
+ - **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.
160
+
161
+ ### BrandKit AI
162
+
163
+ #### Knowledge Vault Management
164
+
165
+ - **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.
166
+ - **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.
167
+ - **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.
168
+ - **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.
169
+ - **delete_a_content_from_knowledge_vault**: This tool permanently deletes a specified content from the Knowledge Vault for the specified Brand Kit.
170
+ - **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.
171
+
172
+ #### Voice Profile Management
173
+
174
+ - **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.
175
+ - **get_all_voice_profiles**: This tool retrieves metadata for all voice profiles associated with the specified Brand Kit. Voice profile, Brand Kit.
176
+ - **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.
177
+ - **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
178
+ - **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.
179
+
180
+ #### AI Content Generation
181
+
182
+ - **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.
183
+
184
+ ### Launch API
185
+
186
+ #### Environment Management
187
+
188
+ - **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.
189
+
190
+ #### Deploy Hook Management
191
+
192
+ - **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.
193
+ - **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.
194
+ - **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.
195
+ - **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.
196
+ - **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.
197
+
198
+ #### Deployment Management
199
+
200
+ - **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.
201
+ - **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.
202
+
203
+ #### Cache Management
204
+
205
+ - **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.
206
+
207
+ ### Developer Hub
208
+
209
+ #### Marketplace App Management
210
+
211
+ - **create_an_app**: Creates a Marketplace App in an Organization.
212
+ - **update_an_app**: Updates a specified Marketplace App in an Organization.
213
+ - **delete_an_app**: Deletes a specified Marketplace App from an Organization.
214
+ - **get_an_app**: Retrieves detailed information for a specified Marketplace App from an Organization.
215
+ - **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.
216
+
217
+ #### Marketplace App OAuth Management
218
+
219
+ - **get_app_oauth**: Retrieves the OAuth configuration details for a specified Marketplace App.
220
+ - **get_oauth_scopes**: Retrieves available OAuth scopes for Marketplace Apps, with optional filtering by app type (stack or organization).
221
+ - **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.
222
+
223
+ #### Marketplace App Installation Management
224
+
225
+ - **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.
226
+ - **update_an_app_installation**: Updates a specified Marketplace App installation in a stack or organization.
227
+ - **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.
228
+ - **uninstall_an_app**: Uninstalls a specified Marketplace App from a stack or organization, removing Marketplace App functionality and cleaning up Marketplace App-related configurations.
229
+
230
+ ### Lytics Analytics
231
+
232
+ #### Audience Management
233
+
234
+ - **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
235
+ - **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
236
+ - **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
237
+
238
+ #### Content Analysis
239
+
240
+ - **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
241
+ - **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
242
+ - **get_content_topics**: This tool retrieves all available content topics from a connected Lytics account for categorization or content analysis. Content taxonomy, topic retrieval
243
+
244
+ #### User Insights
245
+
246
+ - **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
247
+
248
+ #### Data Management
249
+
250
+ - **get_accounts**: This tool fetches all accounts associated with a connected Lytics instance for management or integration purposes. Account management, data retrieval
251
+ - **get_fields**: This tool fetches all fields for use in data mapping or configuration. Field retrieval, data management
252
+ - **get_tables**: This tool retrieves all tables for use in data access or management. Table retrieval, database overview
253
+
254
+ ### Personalize API
255
+
256
+ #### Attribute Management
257
+
258
+ - **create_attribute**: This tool creates a new custom attribute in a Personalize project, defining user characteristics for audience segmentation and content personalization targeting.
259
+ - **get_all_attributes**: This tool retrieves all custom and preset attributes available in a Personalize project for user segmentation and targeting analysis.
260
+ - **update_attribute**: This tool modifies an existing attribute's properties in a Personalize project, allowing updates to name, key, or description fields.
261
+ - **delete_attribute**: This tool permanently removes an attribute from a Personalize project, ensuring cleanup of unused user characteristics from segmentation.
262
+
263
+ #### Audience Management
264
+
265
+ - **get_all_audiences**: This tool retrieves all audience segments from a Personalize project, with optional filtering by referenced attributes for targeted analysis.
266
+ - **delete_audience**: This tool permanently removes an audience segment from a Personalize project, cleaning up unused targeting definitions.
267
+
268
+ #### Experience Management
269
+
270
+ - **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.
271
+ - **get_all_experiences**: This tool retrieves all personalization experiences from a Personalize project, with optional filtering by referenced audiences or events for analysis.
272
+ - **get_single_experience**: This tool retrieves detailed information about a specific personalization experience from a Personalize project, including its current configuration and status.
273
+ - **update_experience**: This tool modifies an existing experience's metadata in a Personalize project, allowing updates to name and description but not type conversion.
274
+ - **delete_experience**: This tool permanently removes a personalization experience from a Personalize project, including all associated versions and configurations.
275
+ - **get_experience_versions**: This tool retrieves all versions of a specific experience from a Personalize project, sorted by creation date for version history analysis.
276
+ - **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.
277
+
278
+ #### Experience Priority Management
279
+
280
+ - **get_experiences_priority**: This tool retrieves the priority order configuration for all experiences in a Personalize project, determining content display precedence.
281
+ - **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.
282
+
283
+ #### Event Management
284
+
285
+ - **create_event**: This tool creates a new event definition in a Personalize project for tracking user interactions and measuring experience performance metrics.
286
+ - **get_all_events**: This tool retrieves all event definitions from a Personalize project for tracking and analytics configuration review.
287
+ - **update_event**: This tool modifies an existing event definition in a Personalize project, allowing updates to the key identifier and description.
288
+ - **delete_event**: This tool permanently removes an event definition from a Personalize project, cleaning up unused tracking configurations.
289
+
290
+ #### Analytics
291
+
292
+ - **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.
293
+ - **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.
294
+
295
+ #### Geolocation Support
296
+
297
+ - **get_countries**: This tool retrieves country information based on ISO 3166-1 standard for geographic targeting in Personalize audience definitions and segmentation.
298
+ - **get_regions**: This tool retrieves region information based on ISO 3166-2 standard for geographic targeting in Personalize audience definitions and state-level segmentation.
299
+ - **get_cities**: This tool retrieves city information for geographic targeting in Personalize audience definitions and local-level content personalization.
300
+
120
301
  ## Configuration
121
302
 
122
303
  ### Prerequisites
123
304
 
124
305
  1. Create a Contentstack account at [Contentstack](https://www.contentstack.com/login/)
125
- 2. Generate a [Management token](https://www.contentstack.com/docs/developers/create-tokens/generate-a-management-token/) from your Stack Settings
126
- 3. For Content Delivery API access, generate a [Delivery token](https://www.contentstack.com/docs/developers/create-tokens/create-a-delivery-token/) for the appropriate environment
306
+
307
+ ### OAuth Setup (Required for CMA, Analytics, BrandKit, Launch, DeveloperHub, and Personalize)
308
+
309
+ **Important**: Before using Content Management API (CMA), Analytics, BrandKit, Launch, DeveloperHub, or Personalize tools, you must authenticate using OAuth:
310
+
311
+ ```bash
312
+ npx @contentstack/mcp --auth
313
+ ```
314
+
315
+ This will guide you through the OAuth setup process and store your authentication tokens securely.
316
+
317
+ ### Additional Token Requirements
318
+
319
+ 2. For Content Delivery API access, generate a [Delivery token](https://www.contentstack.com/docs/developers/create-tokens/create-a-delivery-token/) for the appropriate environment
320
+ 3. For BrandKit access, obtain your Brand Kit Project ID from your Contentstack account
321
+ 4. For Launch access, obtain your Launch Project ID from your Contentstack Launch dashboard
322
+ 5. For Lytics access, generate a Lytics [Access token](https://docs.lytics.com/docs/access-tokens) from your Lytics account
323
+ 6. For Personalize access, obtain your Personalize Project ID from your Contentstack account
127
324
 
128
325
  ### Environment Variables
129
326
 
130
327
  These variables can also be set as arguments
131
328
 
132
- - `CONTENTSTACK_REGION` / `--region`: Contentstack Regions (defaults to NA)
133
- - Possible values: `NA` (for AWS NA), `EU` (for AWS EU), `AZURE_NA`, `AZURE_EU`, `GCP_NA`, `GCP_EU`
134
329
  - `CONTENTSTACK_API_KEY` / `--stack-api-key`: Your Stack API Key
135
- - `CONTENTSTACK_MANAGEMENT_TOKEN` / `--management-token`: Your Stack Management token
136
330
  - `CONTENTSTACK_DELIVERY_TOKEN` / `--delivery-token`: Your Stack Delivery token (required only if using CDN/Delivery API tools)
331
+ - `CONTENTSTACK_BRAND_KIT_ID` / `--brand-kit-id`: Your Brand Kit ID (required for BrandKit tools)
332
+ - `CONTENTSTACK_LAUNCH_PROJECT_ID` / `--launch-project-id`: Your Launch Project ID (required for Launch tools)
333
+ - `LYTICS_ACCESS_TOKEN` / `--lytics-access-token`: Your Lytics access token (required for Lytics tools)
334
+ - `CONTENTSTACK_PERSONALIZE_PROJECT_ID` / `--personalize-project-id`: Your Personalize Project ID (required for Personalize tools)
335
+ - `GROUPS` / `--groups`: Comma-separated list of API groups to enable (options: `cma`, `cda`, `analytics`, `brandkit`, `launch`, `developerhub`, `lytics`, `personalize`, `all`. Default: `cma`)
336
+
337
+ ### Group Requirements Summary
338
+
339
+ | Group | Authentication | Required Tokens/Configuration |
340
+ | ---------------- | -------------- | -------------------------------------- |
341
+ | **CMA** | OAuth | Stack API Key |
342
+ | **CDA** | Token-based | Stack API Key + Delivery Token |
343
+ | **Analytics** | OAuth | Stack API Key |
344
+ | **BrandKit** | OAuth | Stack API Key + Brand Kit ID |
345
+ | **Launch** | OAuth | Stack API Key + Launch Project ID |
346
+ | **DeveloperHub** | OAuth | Stack API Key |
347
+ | **Lytics** | Token-based | Lytics Access Token |
348
+ | **Personalize** | OAuth | Stack API Key + Personalize Project ID |
137
349
 
138
350
  ### Usage with Claude Desktop
139
351
 
@@ -147,16 +359,26 @@ You can use this MCP without cloning the repository by simply modifying your Cla
147
359
  "args": ["-y", "@contentstack/mcp"],
148
360
  "env": {
149
361
  "CONTENTSTACK_API_KEY": "<YOUR_STACK_API_KEY>",
150
- "CONTENTSTACK_MANAGEMENT_TOKEN": "<YOUR_STACK_MANAGEMENT_TOKEN>",
151
- "CONTENTSTACK_REGION": "<YOUR_STACK_REGION>",
152
- "CONTENTSTACK_DELIVERY_TOKEN": "<YOUR_DELIVERY_TOKEN>"
362
+ "CONTENTSTACK_DELIVERY_TOKEN": "<YOUR_DELIVERY_TOKEN>",
363
+ "CONTENTSTACK_BRAND_KIT_ID": "<YOUR_BRAND_KIT_ID>",
364
+ "CONTENTSTACK_LAUNCH_PROJECT_ID": "<YOUR_LAUNCH_PROJECT_ID>",
365
+ "CONTENTSTACK_PERSONALIZE_PROJECT_ID": "<YOUR_PERSONALIZE_PROJECT_ID>",
366
+ "LYTICS_ACCESS_TOKEN": "<YOUR_LYTICS_TOKEN>",
367
+ "GROUPS": "<COMMA_SEPARATED_GROUPS>"
153
368
  }
154
369
  }
155
370
  }
156
371
  }
157
372
  ```
158
373
 
159
- Note: The `CONTENTSTACK_DELIVERY_TOKEN` is optional and only required if you plan to use the Content Delivery API (CDN) tools.
374
+ **Notes:**
375
+
376
+ - The `CONTENTSTACK_DELIVERY_TOKEN` is optional and only required if you plan to use the Content Delivery API (CDA) tools.
377
+ - The `CONTENTSTACK_BRAND_KIT_ID` is required only for BrandKit tools.
378
+ - The `CONTENTSTACK_LAUNCH_PROJECT_ID` is required only for Launch tools.
379
+ - The `CONTENTSTACK_PERSONALIZE_PROJECT_ID` is required only for Personalize tools.
380
+ - The `LYTICS_ACCESS_TOKEN` is required only for Lytics tools.
381
+ - Before using CMA, Analytics, BrandKit, Launch, DeveloperHub, or Personalize groups, you must first run OAuth authentication: `npx @contentstack/mcp --auth`
160
382
 
161
383
  If your MCPClient doesn't support environment variables, you can alternatively provide the required authentication parameters as command-line arguments:
162
384
 
@@ -168,14 +390,20 @@ If your MCPClient doesn't support environment variables, you can alternatively p
168
390
  "args": [
169
391
  "-y",
170
392
  "@contentstack/mcp",
171
- "--management-token",
172
- "<YOUR_STACK_MANAGEMENT_TOKEN>",
173
393
  "--stack-api-key",
174
394
  "<YOUR_STACK_API_KEY>",
175
- "--region",
176
- "<YOUR_STACK_REGION>",
177
395
  "--delivery-token",
178
- "<YOUR_DELIVERY_TOKEN>"
396
+ "<YOUR_DELIVERY_TOKEN>",
397
+ "--brand-kit-id",
398
+ "<YOUR_BRAND_KIT_ID>",
399
+ "--launch-project-id",
400
+ "<YOUR_LAUNCH_PROJECT_ID>",
401
+ "--lytics-access-token",
402
+ "<YOUR_LYTICS_TOKEN>",
403
+ "--personalize-project-id",
404
+ "<YOUR_PERSONALIZE_PROJECT_ID>",
405
+ "--groups",
406
+ "<COMMA_SEPARATED_GROUPS>"
179
407
  ]
180
408
  }
181
409
  }
@@ -197,9 +425,12 @@ If you want to contribute and test what Claude does with your contributions;
197
425
  "args": ["/path/to/mcp/dist/index.js"],
198
426
  "env": {
199
427
  "CONTENTSTACK_API_KEY": "<YOUR_STACK_API_KEY>",
200
- "CONTENTSTACK_MANAGEMENT_TOKEN": "<YOUR_STACK_MANAGEMENT_TOKEN>",
201
- "CONTENTSTACK_REGION": "<YOUR_STACK_REGION>",
202
- "CONTENTSTACK_DELIVERY_TOKEN": "<YOUR_DELIVERY_TOKEN>"
428
+ "CONTENTSTACK_DELIVERY_TOKEN": "<YOUR_DELIVERY_TOKEN>",
429
+ "CONTENTSTACK_BRAND_KIT_ID": "<YOUR_BRAND_KIT_ID>",
430
+ "CONTENTSTACK_LAUNCH_PROJECT_ID": "<YOUR_LAUNCH_PROJECT_ID>",
431
+ "CONTENTSTACK_PERSONALIZE_PROJECT_ID": "<YOUR_PERSONALIZE_PROJECT_ID>",
432
+ "LYTICS_ACCESS_TOKEN": "<YOUR_LYTICS_TOKEN>",
433
+ "GROUPS": "<COMMA_SEPARATED_GROUPS>"
203
434
  }
204
435
  }
205
436
  }