@contentful/mcp-server 1.7.19 → 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 +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4095,6 +4095,9 @@ 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
|
+
PROTECTED_ENVIRONMENTS: external_exports.string().optional().describe(
|
|
4099
|
+
"Comma-separated list of environment IDs protected from write/delete operations (e.g., master,staging)"
|
|
4100
|
+
),
|
|
4098
4101
|
ORGANIZATION_ID: external_exports.string().optional().describe("Contentful organization ID"),
|
|
4099
4102
|
CONTENTFUL_DELIVERY_TOKEN: external_exports.string().optional().describe(
|
|
4100
4103
|
"Contentful CDA token (used with export_space to export only published content)"
|
|
@@ -4114,7 +4117,7 @@ init_esm_shims();
|
|
|
4114
4117
|
|
|
4115
4118
|
// src/mcpVersion.ts
|
|
4116
4119
|
init_esm_shims();
|
|
4117
|
-
var MCP_VERSION = "1.
|
|
4120
|
+
var MCP_VERSION = "1.8.0";
|
|
4118
4121
|
|
|
4119
4122
|
// src/getVersion.ts
|
|
4120
4123
|
var getVersion = () => {
|
|
@@ -4126,6 +4129,8 @@ function registerAllTools(server) {
|
|
|
4126
4129
|
if (!env.success || !env.data) {
|
|
4127
4130
|
throw new Error("Environment variables are not properly configured");
|
|
4128
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;
|
|
4129
4134
|
const tools = new ContentfulMcpTools({
|
|
4130
4135
|
accessToken: env.data.CONTENTFUL_MANAGEMENT_ACCESS_TOKEN,
|
|
4131
4136
|
host: env.data.CONTENTFUL_HOST,
|
|
@@ -4135,7 +4140,8 @@ function registerAllTools(server) {
|
|
|
4135
4140
|
appId: env.data.APP_ID,
|
|
4136
4141
|
mcpVersion: getVersion(),
|
|
4137
4142
|
deliveryToken: env.data.CONTENTFUL_DELIVERY_TOKEN,
|
|
4138
|
-
hostDelivery: env.data.CONTENTFUL_DELIVERY_HOST
|
|
4143
|
+
hostDelivery: env.data.CONTENTFUL_DELIVERY_HOST,
|
|
4144
|
+
protectedEnvironments
|
|
4139
4145
|
});
|
|
4140
4146
|
const aiActionTools = tools.getAiActionTools();
|
|
4141
4147
|
const assetTools = tools.getAssetTools();
|