@contentful/mcp-server 1.7.18 → 1.8.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/dist/index.js CHANGED
@@ -4095,7 +4095,16 @@ var EnvSchema = external_exports.object({
4095
4095
  APP_ID: external_exports.string().optional().describe("Contentful App ID"),
4096
4096
  SPACE_ID: external_exports.string().optional().describe("Contentful Space ID"),
4097
4097
  ENVIRONMENT_ID: external_exports.string().optional().default("master").describe("Contentful environment ID"),
4098
- ORGANIZATION_ID: external_exports.string().optional().describe("Contentful organization ID")
4098
+ PROTECTED_ENVIRONMENTS: external_exports.string().optional().describe(
4099
+ "Comma-separated list of environment IDs protected from write/delete operations (e.g., master,staging)"
4100
+ ),
4101
+ ORGANIZATION_ID: external_exports.string().optional().describe("Contentful organization ID"),
4102
+ CONTENTFUL_DELIVERY_TOKEN: external_exports.string().optional().describe(
4103
+ "Contentful CDA token (used with export_space to export only published content)"
4104
+ ),
4105
+ CONTENTFUL_DELIVERY_HOST: external_exports.string().optional().describe(
4106
+ "Contentful Delivery API host (used with CONTENTFUL_DELIVERY_TOKEN for custom CDA endpoints)"
4107
+ )
4099
4108
  });
4100
4109
  var env = EnvSchema.safeParse(process.env);
4101
4110
  if (!env.success && process.env["TEST_TYPE"] !== "unit") {
@@ -4108,7 +4117,7 @@ init_esm_shims();
4108
4117
 
4109
4118
  // src/mcpVersion.ts
4110
4119
  init_esm_shims();
4111
- var MCP_VERSION = "1.7.17";
4120
+ var MCP_VERSION = "1.8.0";
4112
4121
 
4113
4122
  // src/getVersion.ts
4114
4123
  var getVersion = () => {
@@ -4120,6 +4129,8 @@ function registerAllTools(server) {
4120
4129
  if (!env.success || !env.data) {
4121
4130
  throw new Error("Environment variables are not properly configured");
4122
4131
  }
4132
+ const parsedProtectedEnvs = env.data.PROTECTED_ENVIRONMENTS ? env.data.PROTECTED_ENVIRONMENTS.split(",").map((e) => e.trim()).filter(Boolean) : void 0;
4133
+ const protectedEnvironments = parsedProtectedEnvs?.length ? parsedProtectedEnvs : void 0;
4123
4134
  const tools = new ContentfulMcpTools({
4124
4135
  accessToken: env.data.CONTENTFUL_MANAGEMENT_ACCESS_TOKEN,
4125
4136
  host: env.data.CONTENTFUL_HOST,
@@ -4127,7 +4138,10 @@ function registerAllTools(server) {
4127
4138
  environmentId: env.data.ENVIRONMENT_ID,
4128
4139
  organizationId: env.data.ORGANIZATION_ID,
4129
4140
  appId: env.data.APP_ID,
4130
- mcpVersion: getVersion()
4141
+ mcpVersion: getVersion(),
4142
+ deliveryToken: env.data.CONTENTFUL_DELIVERY_TOKEN,
4143
+ hostDelivery: env.data.CONTENTFUL_DELIVERY_HOST,
4144
+ protectedEnvironments
4131
4145
  });
4132
4146
  const aiActionTools = tools.getAiActionTools();
4133
4147
  const assetTools = tools.getAssetTools();