@contentstack/mcp 0.3.1 → 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.
- package/README.md +41 -0
- package/dist/index.js +18 -7
- package/package.json +6 -6
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
|
|
@@ -57,6 +59,11 @@ The MCP server supports multiple API groups that can be used independently or to
|
|
|
57
59
|
|
|
58
60
|
- **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.
|
|
59
61
|
- **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.
|
|
62
|
+
- **create_a_content_type**: This tool creates a new content type in the specified Contentstack stack, supporting branch selection and optional branch metadata inclusion.
|
|
63
|
+
- **update_content_type**: This tool updates an existing content type in the specified Contentstack stack, supporting branch selection and optional branch metadata inclusion.
|
|
64
|
+
- **delete_content_type**: This tool deletes an existing content type and all the entries within it.
|
|
65
|
+
- **get_all_references_of_ct**: This tool retrieves a list of all content types that are referenced within the specified content type. This includes both direct and nested references.
|
|
66
|
+
- **export_content_type**: This tool exports a specific content type and its schema. The data is exported in JSON format.
|
|
60
67
|
- **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.
|
|
61
68
|
- **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.
|
|
62
69
|
|
|
@@ -112,10 +119,20 @@ The MCP server supports multiple API groups that can be used independently or to
|
|
|
112
119
|
|
|
113
120
|
- **get_all_branches**: This tool retrieves metadata for all branches within a specified stack, supporting pagination via limit and skip parameters.
|
|
114
121
|
- **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.
|
|
122
|
+
- **create_a_branch**: This tool creates a new branch in the specified Contentstack stack.
|
|
123
|
+
- **delete_a_branch**: This tool deletes a branch in the specified Contentstack stack.
|
|
115
124
|
- **merge_branch**: This tool merges content types and global fields from a compare branch into a base branch, with optional per item strategy overrides.
|
|
116
125
|
- **get_all_branch_aliases**: This tool retrieves metadata for all branch aliases within a specified stack, supporting pagination via limit and skip parameters.
|
|
117
126
|
- **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.
|
|
127
|
+
- **assign_a_branch_alias**: This tool creates a new alias in a particular stack of your organization. This alias can point to any existing branch (target branch) of your stack.
|
|
128
|
+
- **delete_a_branch_alias**: This tool permanently deletes the specified branch alias from the selected stack.
|
|
129
|
+
- **get_all_merge_jobs**: This tool retrieves a list of all the recent merge jobs within a specific period.
|
|
118
130
|
- **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.
|
|
131
|
+
- **compare_branches**: This tool retrieves a list of all the differences between two branches.
|
|
132
|
+
- **compare_content_types_between_branches**: This tool retrieves a list of all the differences in content types between the two specified branches.
|
|
133
|
+
- **compare_global_fields_between_branches**: This tool retrieves a list of all the differences in global fields between the two specified branches.
|
|
134
|
+
- **compare_specific_ct_between_branches**: This tool retrieves all the differences of the specified content type between the two specified branches.
|
|
135
|
+
- **compare_specific_gf_between_branches**: This tool retrieves all the differences of the specified global field between the two specified branches.
|
|
119
136
|
|
|
120
137
|
#### Release Management
|
|
121
138
|
|
|
@@ -183,9 +200,22 @@ The MCP server supports multiple API groups that can be used independently or to
|
|
|
183
200
|
|
|
184
201
|
### Launch API
|
|
185
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
|
+
|
|
186
211
|
#### Environment Management
|
|
187
212
|
|
|
188
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.
|
|
189
219
|
|
|
190
220
|
#### Deploy Hook Management
|
|
191
221
|
|
|
@@ -198,7 +228,18 @@ The MCP server supports multiple API groups that can be used independently or to
|
|
|
198
228
|
#### Deployment Management
|
|
199
229
|
|
|
200
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.
|
|
201
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).
|
|
202
243
|
|
|
203
244
|
#### Cache Management
|
|
204
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.
|
|
16
|
+
version: "0.5.0",
|
|
17
17
|
main: "./dist/index.js",
|
|
18
18
|
type: "module",
|
|
19
19
|
publishConfig: {
|
|
@@ -46,11 +46,11 @@ var package_default = {
|
|
|
46
46
|
url: "https://github.com/contentstack/mcp.git"
|
|
47
47
|
},
|
|
48
48
|
dependencies: {
|
|
49
|
-
"@modelcontextprotocol/sdk": "1.
|
|
50
|
-
axios: "^1.
|
|
51
|
-
dotenv: "^
|
|
52
|
-
inquirer: "^
|
|
53
|
-
open: "^
|
|
49
|
+
"@modelcontextprotocol/sdk": "1.25.2",
|
|
50
|
+
axios: "^1.13.2",
|
|
51
|
+
dotenv: "^17.2.3",
|
|
52
|
+
inquirer: "^13.1.0",
|
|
53
|
+
open: "^11.0.0"
|
|
54
54
|
},
|
|
55
55
|
devDependencies: {
|
|
56
56
|
"@commitlint/cli": "^19.8.1",
|
|
@@ -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.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"url": "https://github.com/contentstack/mcp.git"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@modelcontextprotocol/sdk": "1.
|
|
37
|
-
"axios": "^1.
|
|
38
|
-
"dotenv": "^
|
|
39
|
-
"inquirer": "^
|
|
40
|
-
"open": "^
|
|
36
|
+
"@modelcontextprotocol/sdk": "1.25.2",
|
|
37
|
+
"axios": "^1.13.2",
|
|
38
|
+
"dotenv": "^17.2.3",
|
|
39
|
+
"inquirer": "^13.1.0",
|
|
40
|
+
"open": "^11.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@commitlint/cli": "^19.8.1",
|