@contentful/mcp-server 1.8.1 → 1.12.1

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 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
 
@@ -108,11 +109,13 @@ Below is a sample configuration:
108
109
  | | `delete_content_type` | Remove content types |
109
110
  | **Entries** | `search_entries` | Search and filter entries in your space |
110
111
  | | `get_entry` | Retrieve specific entries |
112
+ | | `get_entry_snapshot` | Retrieve entry version history (snapshots) |
111
113
  | | `create_entry` | Create new content entries with locale support |
112
114
  | | `update_entry` | Modify existing entries with locale support |
113
115
  | | `publish_entry` | Publish entries (single or bulk up to 100) |
114
116
  | | `unpublish_entry` | Unpublish entries (single or bulk up to 100) |
115
117
  | | `delete_entry` | Remove entries |
118
+ | | `resolve_entry_references` | Recursively resolve an entry's references tree |
116
119
  | **Editor Interfaces** | `list_editor_interfaces` | List all editor interfaces in a space |
117
120
  | | `get_editor_interface` | Get editor interface for a content type |
118
121
  | | `update_editor_interface` | Update field controls, sidebars, and layouts |
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.0";
4126
+ var MCP_VERSION = "1.12.0";
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();