@contentful/mcp-server 1.8.1 → 1.9.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 +8 -7
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -63,13 +63,14 @@ npm run build
|
|
|
63
63
|
|
|
64
64
|
### Environment Variables
|
|
65
65
|
|
|
66
|
-
| Environment Variable | Required | Default Value | Description
|
|
67
|
-
| ------------------------------------ | -------- | -------------------- |
|
|
68
|
-
| `CONTENTFUL_MANAGEMENT_ACCESS_TOKEN` | ✅ Yes | - | Your Contentful Management API personal access token
|
|
69
|
-
| `SPACE_ID` | ✅ Yes | - | Your Contentful Space ID
|
|
70
|
-
| `ENVIRONMENT_ID` | ❌ No | `master` | Target environment within your space
|
|
71
|
-
| `CONTENTFUL_HOST` | ❌ No | `api.contentful.com` | Contentful API host
|
|
72
|
-
| `NODE_ENV` | ❌ No | `production` | Node Environment to run in
|
|
66
|
+
| Environment Variable | Required | Default Value | Description |
|
|
67
|
+
| ------------------------------------ | -------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| `CONTENTFUL_MANAGEMENT_ACCESS_TOKEN` | ✅ Yes | - | Your Contentful Management API personal access token |
|
|
69
|
+
| `SPACE_ID` | ✅ Yes | - | Your Contentful Space ID |
|
|
70
|
+
| `ENVIRONMENT_ID` | ❌ No | `master` | Target environment within your space |
|
|
71
|
+
| `CONTENTFUL_HOST` | ❌ No | `api.contentful.com` | Contentful API host |
|
|
72
|
+
| `NODE_ENV` | ❌ No | `production` | Node Environment to run in |
|
|
73
|
+
| `MAX_BULK_SIZE` | ❌ No | `10` | Maximum number of IDs allowed in a single bulk-operation tool call (1–100). Caps publish/unpublish/archive/unarchive on entries and assets. Mitigates accidental mass operations from AI hallucinations. |
|
|
73
74
|
|
|
74
75
|
### Configuration
|
|
75
76
|
|
package/dist/index.js
CHANGED
|
@@ -4098,6 +4098,12 @@ var EnvSchema = external_exports.object({
|
|
|
4098
4098
|
PROTECTED_ENVIRONMENTS: external_exports.string().optional().describe(
|
|
4099
4099
|
"Comma-separated list of environment IDs protected from write/delete operations (e.g., master,staging)"
|
|
4100
4100
|
),
|
|
4101
|
+
MAX_BULK_SIZE: external_exports.string().optional().refine(
|
|
4102
|
+
(v) => v === void 0 || /^\d+$/.test(v) && Number(v) > 0 && Number(v) <= 100,
|
|
4103
|
+
{ message: "MAX_BULK_SIZE must be a positive integer between 1 and 100" }
|
|
4104
|
+
).describe(
|
|
4105
|
+
"Maximum number of IDs allowed in a single bulk-operation tool call (default: 10, max: 100). Mitigates accidental mass operations from AI hallucinations."
|
|
4106
|
+
),
|
|
4101
4107
|
ORGANIZATION_ID: external_exports.string().optional().describe("Contentful organization ID"),
|
|
4102
4108
|
CONTENTFUL_DELIVERY_TOKEN: external_exports.string().optional().describe(
|
|
4103
4109
|
"Contentful CDA token (used with export_space to export only published content)"
|
|
@@ -4117,7 +4123,7 @@ init_esm_shims();
|
|
|
4117
4123
|
|
|
4118
4124
|
// src/mcpVersion.ts
|
|
4119
4125
|
init_esm_shims();
|
|
4120
|
-
var MCP_VERSION = "1.8.
|
|
4126
|
+
var MCP_VERSION = "1.8.1";
|
|
4121
4127
|
|
|
4122
4128
|
// src/getVersion.ts
|
|
4123
4129
|
var getVersion = () => {
|
|
@@ -4131,6 +4137,7 @@ function registerAllTools(server) {
|
|
|
4131
4137
|
}
|
|
4132
4138
|
const parsedProtectedEnvs = env.data.PROTECTED_ENVIRONMENTS ? env.data.PROTECTED_ENVIRONMENTS.split(",").map((e) => e.trim()).filter(Boolean) : void 0;
|
|
4133
4139
|
const protectedEnvironments = parsedProtectedEnvs?.length ? parsedProtectedEnvs : void 0;
|
|
4140
|
+
const maxBulkSize = env.data.MAX_BULK_SIZE ? Number(env.data.MAX_BULK_SIZE) : void 0;
|
|
4134
4141
|
const tools = new ContentfulMcpTools({
|
|
4135
4142
|
accessToken: env.data.CONTENTFUL_MANAGEMENT_ACCESS_TOKEN,
|
|
4136
4143
|
host: env.data.CONTENTFUL_HOST,
|
|
@@ -4141,7 +4148,8 @@ function registerAllTools(server) {
|
|
|
4141
4148
|
mcpVersion: getVersion(),
|
|
4142
4149
|
deliveryToken: env.data.CONTENTFUL_DELIVERY_TOKEN,
|
|
4143
4150
|
hostDelivery: env.data.CONTENTFUL_DELIVERY_HOST,
|
|
4144
|
-
protectedEnvironments
|
|
4151
|
+
protectedEnvironments,
|
|
4152
|
+
maxBulkSize
|
|
4145
4153
|
});
|
|
4146
4154
|
const aiActionTools = tools.getAiActionTools();
|
|
4147
4155
|
const assetTools = tools.getAssetTools();
|