@contentstack/mcp 0.4.0 → 0.5.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 +26 -0
  2. package/dist/index.js +14 -3
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Contentstack MCP Server
2
2
 
3
+ > **⚠️ EXPERIMENTAL**: This MCP server is currently in experimental stage. Features, APIs, and functionality may change without notice. Use in production environments at your own risk. We welcome feedback and contributions as we work towards a stable release.
4
+
3
5
  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
6
 
5
7
  ## Features
@@ -198,9 +200,22 @@ The MCP server supports multiple API groups that can be used independently or to
198
200
 
199
201
  ### Launch API
200
202
 
203
+ #### Project Management
204
+
205
+ - **get_all_projects**: Fetches the list of all projects in your organization with pagination support. Returns project details including repository information, organization UID, and metadata.
206
+ - **get_a_project**: Fetches a specific project in Launch using the project UID. Returns comprehensive project details including repository configuration and metadata.
207
+ - **create_a_project**: Creates a project in Launch using either a Git Provider or File Upload. For Git Provider: connect your GitHub/Bitbucket account and provide repository details. For File Upload: first get a signed upload URL, then upload your ZIP file (valid for 10 minutes).
208
+ - **update_a_project**: Updates an existing project in your organization. Allows modification of project name and description.
209
+ - **delete_a_project**: Deletes an existing project in your organization. This action is permanent and will remove all associated environments and deployments.
210
+
201
211
  #### Environment Management
202
212
 
203
213
  - **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.
214
+ - **get_all_environments**: Fetches the list of all environments in a project with pagination support. Returns environment details including build settings, Git branch configuration, and domain information.
215
+ - **get_an_environment**: Fetches a specific environment from a project using the project UID and environment UID. Returns comprehensive environment details including build configuration, domains, and settings.
216
+ - **create_an_environment**: Creates a new environment in your Launch project. For Git Provider projects, specify the Git branch. For File Upload projects, first get a signed upload URL and upload your ZIP file (valid for 10 minutes).
217
+ - **update_an_environment**: Updates an existing environment in your project. Allows modification of build settings, Git branch, environment variables, password protection, and feature flags.
218
+ - **delete_an_environment**: Deletes an existing environment in your project. This action is permanent and will remove all associated deployments.
204
219
 
205
220
  #### Deploy Hook Management
206
221
 
@@ -213,7 +228,18 @@ The MCP server supports multiple API groups that can be used independently or to
213
228
  #### Deployment Management
214
229
 
215
230
  - **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.
231
+ - **get_all_deployments**: Fetches the list of all deployments within a specific environment with pagination support. Returns deployment details including build status, Git commit information, duration, and preview URLs.
232
+ - **get_deployment**: Retrieves a specific deployment from an environment using the project UID, environment UID, and deployment UID. Returns comprehensive deployment details including status, build information, and performance metrics.
216
233
  - **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.
234
+ - **get_deployment_logs**: Fetches the deployment logs of a specific deployment. These logs provide detailed build and deployment information, helping track the build process and identify issues. Supports optional timestamp parameter for pagination.
235
+ - **get_server_logs**: Fetches the server logs of a specific deployment. These logs capture runtime information from deployed apps, helping monitor performance and debug runtime issues. Requires startTime and endTime parameters.
236
+
237
+ #### File Upload Management
238
+
239
+ - **get_signed_upload_url_project**: Fetches the signed URL where you must upload the ZIP file when creating a project via file upload. The signed URL is valid for 10 minutes. After getting this URL, upload your ZIP file, then use the uploadUid in the Create Project API.
240
+ - **get_signed_upload_url_environment**: Fetches the signed URL where you must upload the ZIP file when creating an environment via file upload. The signed URL is valid for 10 minutes. Only available for FILEUPLOAD projects.
241
+ - **get_signed_upload_url_deployment**: Retrieves the signed URL where you must upload the ZIP file when creating or redeploying a deployment via file upload. The signed URL is valid for 10 minutes. Only available for FILEUPLOAD projects.
242
+ - **get_signed_download_url_deployment**: Returns the signed URL to download the uploaded file from the latest deployment. The signed URL is valid for 15 minutes (900 seconds).
217
243
 
218
244
  #### Cache Management
219
245
 
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import dotenv from "dotenv";
13
13
  // package.json
14
14
  var package_default = {
15
15
  name: "@contentstack/mcp",
16
- version: "0.4.0",
16
+ version: "0.5.0",
17
17
  main: "./dist/index.js",
18
18
  type: "module",
19
19
  publishConfig: {
@@ -46,7 +46,7 @@ var package_default = {
46
46
  url: "https://github.com/contentstack/mcp.git"
47
47
  },
48
48
  dependencies: {
49
- "@modelcontextprotocol/sdk": "1.25.1",
49
+ "@modelcontextprotocol/sdk": "1.25.2",
50
50
  axios: "^1.13.2",
51
51
  dotenv: "^17.2.3",
52
52
  inquirer: "^13.1.0",
@@ -1047,6 +1047,7 @@ async function buildReturnValue(groupName, subgroupName, method, url2, data, que
1047
1047
  apiKey,
1048
1048
  deliveryToken,
1049
1049
  brandKitUID,
1050
+ organizationUid,
1050
1051
  launchProjectId,
1051
1052
  personalizeProjectId,
1052
1053
  lyticsAccessToken,
@@ -1131,11 +1132,15 @@ async function buildReturnValue(groupName, subgroupName, method, url2, data, que
1131
1132
  if (!launchProjectId) {
1132
1133
  throw new Error("Launch Project ID is required for Launch API");
1133
1134
  }
1135
+ if (!organizationUid) {
1136
+ throw new Error("Organization UID is required for Launch API");
1137
+ }
1134
1138
  config.headers = {
1135
1139
  ...config.headers,
1136
1140
  "apollographql-client-name": "contentfly-client",
1137
1141
  "apollographql-client-version": "1.3",
1138
- "x-project-uid": launchProjectId
1142
+ "x-project-uid": launchProjectId,
1143
+ "x-organization-uid": organizationUid
1139
1144
  };
1140
1145
  }
1141
1146
  config.headers = {
@@ -1152,6 +1157,7 @@ var TOKEN_ARGS = {
1152
1157
  OAUTH: "--auth",
1153
1158
  DELIVERY: "--delivery-token",
1154
1159
  API_KEY: "--stack-api-key",
1160
+ ORGANIZATION_UID: "--organization-uid",
1155
1161
  BRAND_KIT_ID: "--brand-kit-id",
1156
1162
  LYTICS_ACCESS_TOKEN: "--lytics-access-token",
1157
1163
  PERSONALIZE_PROJECT_ID: "--personalize-project-id",
@@ -1343,6 +1349,7 @@ async function initializeMCP() {
1343
1349
  const apiKey = getArgValue(TOKEN_ARGS.API_KEY);
1344
1350
  const deliveryToken = getArgValue(TOKEN_ARGS.DELIVERY);
1345
1351
  const brandKitID = getArgValue(TOKEN_ARGS.BRAND_KIT_ID);
1352
+ const organizationUid = getArgValue(TOKEN_ARGS.ORGANIZATION_UID);
1346
1353
  const launchProjectId = getArgValue(TOKEN_ARGS.LAUNCH_PROJECT_ID);
1347
1354
  const personalizeProjectId = getArgValue(TOKEN_ARGS.PERSONALIZE_PROJECT_ID);
1348
1355
  const lyticsAccessToken = getArgValue(TOKEN_ARGS.LYTICS_ACCESS_TOKEN);
@@ -1362,6 +1369,9 @@ async function initializeMCP() {
1362
1369
  if (deliveryToken) {
1363
1370
  process.env.CONTENTSTACK_DELIVERY_TOKEN = deliveryToken;
1364
1371
  }
1372
+ if (organizationUid) {
1373
+ process.env.CONTENTSTACK_ORGANIZATION_UID = organizationUid;
1374
+ }
1365
1375
  if (lyticsAccessToken) {
1366
1376
  process.env.LYTICS_ACCESS_TOKEN = lyticsAccessToken;
1367
1377
  }
@@ -1389,6 +1399,7 @@ async function initializeMCP() {
1389
1399
  apiKey: process.env.CONTENTSTACK_API_KEY || "",
1390
1400
  deliveryToken: process.env.CONTENTSTACK_DELIVERY_TOKEN || "",
1391
1401
  brandKitUID: process.env.CONTENTSTACK_BRAND_KIT_ID || "",
1402
+ organizationUid: process.env.CONTENTSTACK_ORGANIZATION_UID || "",
1392
1403
  launchProjectId: process.env.CONTENTSTACK_LAUNCH_PROJECT_ID || "",
1393
1404
  lyticsAccessToken: process.env.LYTICS_ACCESS_TOKEN || "",
1394
1405
  personalizeProjectId: process.env.CONTENTSTACK_PERSONALIZE_PROJECT_ID || "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/mcp",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "main": "./dist/index.js",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/contentstack/mcp.git"
34
34
  },
35
35
  "dependencies": {
36
- "@modelcontextprotocol/sdk": "1.25.1",
36
+ "@modelcontextprotocol/sdk": "1.25.2",
37
37
  "axios": "^1.13.2",
38
38
  "dotenv": "^17.2.3",
39
39
  "inquirer": "^13.1.0",