@transcend-io/mcp-server-config 0.1.0 → 0.2.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 +13 -6
- package/dist/cli.mjs +21 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +21 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{src-DSpQACky.mjs → src-Boc4gKOP.mjs} +246 -121
- package/dist/src-Boc4gKOP.mjs.map +1 -0
- package/package.json +4 -4
- package/dist/src-DSpQACky.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -6,11 +6,13 @@ These tools read and write files on your machine, so they run over `stdio` only.
|
|
|
6
6
|
|
|
7
7
|
## Tools
|
|
8
8
|
|
|
9
|
-
| Tool
|
|
10
|
-
|
|
|
11
|
-
| `config_pull`
|
|
12
|
-
| `
|
|
13
|
-
| `
|
|
9
|
+
| Tool | What it does |
|
|
10
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `config_pull` | Writes the organization configuration to an absolute `.yml` path. Returns counts. |
|
|
12
|
+
| `config_diff` | Dry-run preview: pull live state, diff the file, return a fenced diff for chat. Read-only. |
|
|
13
|
+
| `config_push` | Pushes a `.yml` file to Transcend. Run `config_diff` first. Needs confirmation with a change summary. |
|
|
14
|
+
| `config_preview_push` | Structured dry-run summary and diff (like `transcend inventory push --dry-run`). Read-only. |
|
|
15
|
+
| `config_get_schema` | Section catalog by default; pass `resources` for partial schema, or `includeFullSchema` for the full file (very large). |
|
|
14
16
|
|
|
15
17
|
## Run
|
|
16
18
|
|
|
@@ -22,4 +24,9 @@ Auth works like the other MCP servers. See the [MCP README](../README.md).
|
|
|
22
24
|
|
|
23
25
|
## OAuth scopes
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
By default the server requests every scope that the pull and push paths can need.
|
|
28
|
+
|
|
29
|
+
Set `TRANSCEND_CONFIG_RESOURCES` to a comma-separated list of section names (for example
|
|
30
|
+
`dataSilos,purposes,consentManager`) to narrow OAuth sign-in and reject pull/push calls for
|
|
31
|
+
other sections. Unknown names fail at server startup. When the allowlist is set, `config_pull`
|
|
32
|
+
defaults and `resources: ["all"]` pull only those sections.
|
package/dist/cli.mjs
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as parseConfigResourceAllowlistFromEnv, i as oauthScopesForConfigAllowlist, t as getConfigTools } from "./src-Boc4gKOP.mjs";
|
|
3
3
|
import { TranscendGraphQLBase, createMCPServer, createTranscendRestClient } from "@transcend-io/mcp-server-base";
|
|
4
|
+
import { TranscendMcpServer, getMcpServerOAuthScopes } from "@transcend-io/sdk";
|
|
5
|
+
//#region package.json
|
|
6
|
+
var version = "0.2.0";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/server-instructions.ts
|
|
9
|
+
/** MCP initialize instructions for the transcend.yml config server. */
|
|
10
|
+
const CONFIG_SERVER_INSTRUCTIONS = "Before calling config_push, call config_diff with the same filePath and paste the returned diff into the chat for the user. config_push needs explicit approval in Cursor.";
|
|
4
11
|
//#endregion
|
|
5
12
|
//#region src/cli.ts
|
|
13
|
+
function resolveConfigOauthScopes() {
|
|
14
|
+
try {
|
|
15
|
+
const allowlist = parseConfigResourceAllowlistFromEnv();
|
|
16
|
+
if (!allowlist) return getMcpServerOAuthScopes(TranscendMcpServer.Config);
|
|
17
|
+
return oauthScopesForConfigAllowlist(allowlist);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
6
23
|
createMCPServer({
|
|
7
24
|
name: "transcend-mcp-config",
|
|
8
|
-
version
|
|
9
|
-
oauthScopes:
|
|
25
|
+
version,
|
|
26
|
+
oauthScopes: resolveConfigOauthScopes(),
|
|
27
|
+
instructions: CONFIG_SERVER_INSTRUCTIONS,
|
|
10
28
|
getTools: getConfigTools,
|
|
11
29
|
createClients: ({ auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl }) => {
|
|
12
30
|
const graphql = new TranscendGraphQLBase(auth, graphqlUrl);
|
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":["packageJson.version"],"sources":["../package.json","../src/cli.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":["packageJson.version"],"sources":["../package.json","../src/server-instructions.ts","../src/cli.ts"],"mappings":";;;;;;;;;ACCA,MAAa,6BACX;;;ACcF,SAAS,2BAA8C;AACrD,KAAI;EACF,MAAM,YAAY,qCAAqC;AACvD,MAAI,CAAC,UACH,QAAO,wBAAwB,mBAAmB,OAAO;AAE3D,SAAO,8BAA8B,UAAU;UACxC,OAAO;AACd,UAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,CAAC;AACrE,UAAQ,KAAK,EAAE;;;AAInB,gBAAgB;CACd,MAAM;CACGA;CACT,aAAa,0BAA0B;CACvC,cAAc;CACd,UAAU;CACV,gBAAgB,EAAE,MAAM,WAAW,mBAAmB,YAAY,mBAAmB;EACnF,MAAM,UAAU,IAAI,qBAAqB,MAAM,WAAW;AAC1D,SAAO;GACL,MAAM,0BAA0B,MAAM,SAAS;IAAE;IAAW;IAAmB,CAAC;GAChF;GACA;GACD;;CAEJ,CAAC"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { ScopeName } from "@transcend-io/privacy-types";
|
|
2
|
-
import { TranscendPullResource } from "@transcend-io/sdk";
|
|
3
1
|
import { ToolClients, ToolDefinition, z } from "@transcend-io/mcp-server-base";
|
|
2
|
+
import { TranscendPullResource } from "@transcend-io/sdk";
|
|
4
3
|
|
|
5
|
-
//#region src/scopes.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* OAuth scopes for the config MCP tools (offline_access added by base).
|
|
8
|
-
*
|
|
9
|
-
* The union of every scope the `transcend.yml` pull and push paths can need, so a
|
|
10
|
-
* user can pull or push any section after one sign-in.
|
|
11
|
-
*/
|
|
12
|
-
declare const CONFIG_OAUTH_SCOPES: ScopeName[];
|
|
13
|
-
//#endregion
|
|
14
4
|
//#region src/tools/config_get_schema.d.ts
|
|
15
5
|
declare const ConfigGetSchemaSchema: z.ZodObject<{
|
|
16
6
|
resources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -50,6 +40,17 @@ declare const ConfigGetSchemaSchema: z.ZodObject<{
|
|
|
50
40
|
}, z.core.$strip>;
|
|
51
41
|
type ConfigGetSchemaInput = z.infer<typeof ConfigGetSchemaSchema>;
|
|
52
42
|
//#endregion
|
|
43
|
+
//#region src/tools/config_diff.d.ts
|
|
44
|
+
declare const ConfigDiffSchema: z.ZodObject<{
|
|
45
|
+
filePath: z.ZodString;
|
|
46
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
47
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
maxLines: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
deleteExtraAttributeValues: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
includePlan: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
type ConfigDiffInput = z.infer<typeof ConfigDiffSchema>;
|
|
53
|
+
//#endregion
|
|
53
54
|
//#region src/tools/config_pull.d.ts
|
|
54
55
|
declare const ConfigPullSchema: z.ZodObject<{
|
|
55
56
|
filePath: z.ZodString;
|
|
@@ -65,6 +66,14 @@ declare const ConfigPullSchema: z.ZodObject<{
|
|
|
65
66
|
}, z.core.$strip>;
|
|
66
67
|
type ConfigPullInput = z.infer<typeof ConfigPullSchema>;
|
|
67
68
|
//#endregion
|
|
69
|
+
//#region src/tools/config_preview_push.d.ts
|
|
70
|
+
declare const ConfigPreviewPushSchema: z.ZodObject<{
|
|
71
|
+
filePath: z.ZodString;
|
|
72
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
73
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
type ConfigPreviewPushInput = z.infer<typeof ConfigPreviewPushSchema>;
|
|
76
|
+
//#endregion
|
|
68
77
|
//#region src/tools/config_push.d.ts
|
|
69
78
|
declare const ConfigPushSchema: z.ZodObject<{
|
|
70
79
|
filePath: z.ZodString;
|
|
@@ -78,5 +87,5 @@ type ConfigPushInput = z.infer<typeof ConfigPushSchema>;
|
|
|
78
87
|
//#region src/index.d.ts
|
|
79
88
|
declare function getConfigTools(clients: ToolClients): ToolDefinition[];
|
|
80
89
|
//#endregion
|
|
81
|
-
export {
|
|
90
|
+
export { type ConfigDiffInput, ConfigDiffSchema, type ConfigGetSchemaInput, ConfigGetSchemaSchema, type ConfigPreviewPushInput, ConfigPreviewPushSchema, type ConfigPullInput, ConfigPullSchema, type ConfigPushInput, ConfigPushSchema, getConfigTools };
|
|
82
91
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/tools/config_get_schema.ts","../src/tools/config_diff.ts","../src/tools/config_pull.ts","../src/tools/config_preview_push.ts","../src/tools/config_push.ts","../src/index.ts"],"mappings":";;;;cAqBa,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KActB,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,qBAAA;;;cCbrC,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;KAkCjB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,gBAAA;;;cC5BhC,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;;KAgDjB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,gBAAA;;;cCxDhC,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;KAiBxB,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,uBAAA;;;cCfvC,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;KA4BjB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,gBAAA;;;iBC1C7B,cAAA,CAAe,OAAA,EAAS,WAAA,GAAc,cAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { c as ConfigDiffSchema, n as ConfigPushSchema, o as ConfigPreviewPushSchema, r as ConfigPullSchema, s as ConfigGetSchemaSchema, t as getConfigTools } from "./src-Boc4gKOP.mjs";
|
|
2
|
+
export { ConfigDiffSchema, ConfigGetSchemaSchema, ConfigPreviewPushSchema, ConfigPullSchema, ConfigPushSchema, getConfigTools };
|
|
@@ -1,17 +1,166 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DEFAULT_TRANSCEND_PULL_RESOURCES, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, TranscendInput, TranscendPullResource, parseTranscendYaml, pullTranscendConfiguration, serializeTranscendYaml, syncConfigurationToTranscend } from "@transcend-io/sdk";
|
|
3
|
-
import { ErrorCode, ToolError, createGraphqlRequestClient, defineTool, getOAuthScopes, z } from "@transcend-io/mcp-server-base";
|
|
4
|
-
import { toJsonSchema } from "@transcend-io/type-utils";
|
|
1
|
+
import { ErrorCode, ToolError, createCollectedLogger, createGraphqlRequestClient, createToolResult, defineTool, getOAuthScopes, z } from "@transcend-io/mcp-server-base";
|
|
2
|
+
import { DEFAULT_TRANSCEND_PULL_RESOURCES, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, TranscendInput, TranscendPullResource, buildSnapshotRequest, parseTranscendYaml, planHasChanges, planPush, previewPush, pullTranscendConfiguration, renderPushPlan, renderPushPlanDiff, serializeTranscendYaml, summarizePushPlan, syncConfigurationToTranscend } from "@transcend-io/sdk";
|
|
5
3
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
4
|
import path from "node:path";
|
|
7
|
-
|
|
5
|
+
import { toJsonSchema } from "@transcend-io/type-utils";
|
|
6
|
+
import { ConsentTrackerStatus } from "@transcend-io/privacy-types";
|
|
7
|
+
//#region src/helpers/assertScopesAvailable.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Fail fast when a stdio OAuth session never asked for scopes the call needs.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Only the scopes requested at sign-in are known here, not the ones the user
|
|
12
|
+
* finally granted, and API keys carry no scope list at all. For those the server
|
|
13
|
+
* answers with an `ACCESS_DENIED` error that already names the missing scopes.
|
|
14
|
+
*
|
|
15
|
+
* @param graphql - Client whose current auth decides whether the check applies
|
|
16
|
+
* @param required - Scopes the call needs
|
|
17
|
+
* @throws ToolError with `missingScopes` when sign-in did not request them
|
|
13
18
|
*/
|
|
14
|
-
|
|
19
|
+
function assertScopesAvailable(graphql, required) {
|
|
20
|
+
if (graphql.effectiveAuth()?.type !== "oauthToken") return;
|
|
21
|
+
let requested;
|
|
22
|
+
try {
|
|
23
|
+
requested = getOAuthScopes();
|
|
24
|
+
} catch {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const missing = required.filter((scope) => !requested.includes(scope));
|
|
28
|
+
if (missing.length === 0) return;
|
|
29
|
+
throw new ToolError(ErrorCode.PERMISSION_ERROR, `This session did not request scopes needed for these sections: ${missing.join(", ")}. Sign in again with a server that includes the config tools, or use an API key that has them.`, false, { missingScopes: missing });
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/helpers/configFilePath.ts
|
|
33
|
+
const YAML_EXTENSIONS = new Set([".yml", ".yaml"]);
|
|
34
|
+
/**
|
|
35
|
+
* Validate the path an agent passes for a `transcend.yml` file.
|
|
36
|
+
*
|
|
37
|
+
* Absolute paths only, because the server's working directory is not the
|
|
38
|
+
* agent's. YAML extensions only, so a tool call cannot overwrite arbitrary files.
|
|
39
|
+
*
|
|
40
|
+
* @param filePath - Path from the tool arguments
|
|
41
|
+
* @returns The normalized absolute path
|
|
42
|
+
* @throws ToolError when the path is relative or not a YAML file
|
|
43
|
+
*/
|
|
44
|
+
function assertConfigFilePath(filePath) {
|
|
45
|
+
if (!path.isAbsolute(filePath)) throw new ToolError(ErrorCode.VALIDATION_ERROR, `filePath must be absolute, got "${filePath}".`, false);
|
|
46
|
+
const normalized = path.normalize(filePath);
|
|
47
|
+
if (!YAML_EXTENSIONS.has(path.extname(normalized).toLowerCase())) throw new ToolError(ErrorCode.VALIDATION_ERROR, `filePath must end in .yml or .yaml, got "${filePath}".`, false);
|
|
48
|
+
return normalized;
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/helpers/sections.ts
|
|
52
|
+
/** Whether a top-level `transcend.yml` section has anything to sync. */
|
|
53
|
+
function hasConfigSection(value) {
|
|
54
|
+
if (value === void 0 || value === null) return false;
|
|
55
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
56
|
+
if (typeof value === "object") return Object.keys(value).length > 0;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Drop empty sections. An empty array such as `action-items: []` still counts as
|
|
61
|
+
* a present key, and would request scopes and sync attempts for nothing.
|
|
62
|
+
*/
|
|
63
|
+
function stripEmptyConfigSections(input) {
|
|
64
|
+
return Object.fromEntries(Object.entries(input).filter(([, value]) => hasConfigSection(value)));
|
|
65
|
+
}
|
|
66
|
+
/** Item count per non-empty section, so a tool result never has to echo the file. */
|
|
67
|
+
function countConfigSections(input) {
|
|
68
|
+
return Object.fromEntries(Object.entries(input).filter(([, value]) => hasConfigSection(value)).map(([key, value]) => [key, Array.isArray(value) ? value.length : Object.keys(value).length || 1]));
|
|
69
|
+
}
|
|
70
|
+
/** Resources whose section is present in the input. */
|
|
71
|
+
function resourcesInInput(input) {
|
|
72
|
+
return Object.values(TranscendPullResource).filter((resource) => hasConfigSection(input[TR_YML_RESOURCE_TO_FIELD_NAME[resource]]));
|
|
73
|
+
}
|
|
74
|
+
/** Union of the scopes for the given resources, from a scope map. */
|
|
75
|
+
function scopesForResources(resources, scopeMap) {
|
|
76
|
+
return [...new Set(resources.flatMap((resource) => scopeMap[resource]))].sort();
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/helpers/loadConfigFile.ts
|
|
80
|
+
/**
|
|
81
|
+
* Read and parse a transcend.yml path from disk for config tools.
|
|
82
|
+
*
|
|
83
|
+
* @param filePath - Absolute path to the file
|
|
84
|
+
* @param variables - Values for <<parameters.*>> placeholders
|
|
85
|
+
* @returns Normalized source path and parsed input
|
|
86
|
+
*/
|
|
87
|
+
function loadConfigFile(filePath, variables = {}) {
|
|
88
|
+
const source = assertConfigFilePath(filePath);
|
|
89
|
+
let contents;
|
|
90
|
+
try {
|
|
91
|
+
contents = readFileSync(source, "utf-8");
|
|
92
|
+
} catch (error) {
|
|
93
|
+
throw new ToolError(ErrorCode.VALIDATION_ERROR, `Could not read ${source}: ${error instanceof Error ? error.message : String(error)}`, false);
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
return {
|
|
97
|
+
source,
|
|
98
|
+
input: stripEmptyConfigSections(parseTranscendYaml(contents, variables, source))
|
|
99
|
+
};
|
|
100
|
+
} catch (error) {
|
|
101
|
+
throw new ToolError(ErrorCode.VALIDATION_ERROR, `${source} is not a valid transcend.yml: ${error instanceof Error ? error.message : String(error)}`, false);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/tools/config_diff.ts
|
|
106
|
+
const ConfigDiffSchema = z.object({
|
|
107
|
+
filePath: z.string().describe("Absolute path of the transcend.yml file to preview. Must end in .yml or .yaml."),
|
|
108
|
+
variables: z.record(z.string(), z.string()).optional().describe("Values for <<parameters.name>> placeholders in the file, keyed by name."),
|
|
109
|
+
pageSize: z.number().int().min(1).max(100).optional().describe("Records per API request when pulling the live snapshot. Defaults to 50."),
|
|
110
|
+
maxLines: z.number().int().min(10).max(2e3).optional().describe("Maximum diff lines before truncation. Defaults to 400."),
|
|
111
|
+
deleteExtraAttributeValues: z.boolean().optional().describe("Match config_push: attribute values missing from the file are deleted remotely. Defaults to false."),
|
|
112
|
+
includePlan: z.boolean().optional().describe("When true, include the full structured push plan JSON. Defaults to false.")
|
|
113
|
+
});
|
|
114
|
+
function nextStep(hasChanges) {
|
|
115
|
+
if (!hasChanges) return "The live organization already matches this file. config_push would be a no-op.";
|
|
116
|
+
return "Paste the diff field into your reply exactly as returned (including the ```diff fence), summarize risks for the user, and only call config_push after they agree.";
|
|
117
|
+
}
|
|
118
|
+
function createConfigDiffTool(clients) {
|
|
119
|
+
return defineTool({
|
|
120
|
+
name: "config_diff",
|
|
121
|
+
description: "Dry-run preview for config_push: compares transcend.yml to live org state and returns a paste-ready fenced diff plus side effects (for example domain list replacement). Read-only.",
|
|
122
|
+
category: "Config",
|
|
123
|
+
readOnly: true,
|
|
124
|
+
requireLocalFilesystem: true,
|
|
125
|
+
annotations: {
|
|
126
|
+
readOnlyHint: true,
|
|
127
|
+
destructiveHint: false,
|
|
128
|
+
idempotentHint: true
|
|
129
|
+
},
|
|
130
|
+
zodSchema: ConfigDiffSchema,
|
|
131
|
+
handler: async ({ filePath, variables = {}, pageSize = 50, maxLines = 400, deleteExtraAttributeValues = false, includePlan = false }) => {
|
|
132
|
+
const { input } = loadConfigFile(filePath, variables);
|
|
133
|
+
const snapshot = buildSnapshotRequest(input);
|
|
134
|
+
const requiredScopes = scopesForResources(snapshot.resources, TR_PULL_RESOURCE_SCOPE_MAP);
|
|
135
|
+
assertScopesAvailable(clients.graphql, requiredScopes);
|
|
136
|
+
const { logger, logs } = createCollectedLogger();
|
|
137
|
+
const plan = planPush(input, await pullTranscendConfiguration(createGraphqlRequestClient(clients.graphql), {
|
|
138
|
+
...snapshot,
|
|
139
|
+
dataSiloIds: [],
|
|
140
|
+
integrationNames: [],
|
|
141
|
+
pageSize,
|
|
142
|
+
debug: false,
|
|
143
|
+
logger
|
|
144
|
+
}), { deleteExtraAttributeValues });
|
|
145
|
+
const { markdown: diff, truncated, lineCount } = renderPushPlanDiff(plan, { maxLines });
|
|
146
|
+
const hasChanges = planHasChanges(plan);
|
|
147
|
+
return createToolResult(true, {
|
|
148
|
+
hasChanges,
|
|
149
|
+
summary: plan.summary,
|
|
150
|
+
diff,
|
|
151
|
+
truncated,
|
|
152
|
+
lineCount,
|
|
153
|
+
effects: plan.effects,
|
|
154
|
+
warnings: plan.warnings,
|
|
155
|
+
ignoredResources: plan.ignoredResources,
|
|
156
|
+
requiredScopes,
|
|
157
|
+
nextStep: nextStep(hasChanges),
|
|
158
|
+
...includePlan && { plan },
|
|
159
|
+
...logs.some((entry) => entry.level !== "info") && { logs }
|
|
160
|
+
}, void 0);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
15
164
|
//#endregion
|
|
16
165
|
//#region src/tools/config_get_schema.ts
|
|
17
166
|
const TRANSCEND_PULL_RESOURCE_VALUES = Object.values(TranscendPullResource);
|
|
@@ -70,79 +219,43 @@ function createConfigGetSchemaTool(_clients) {
|
|
|
70
219
|
});
|
|
71
220
|
}
|
|
72
221
|
//#endregion
|
|
73
|
-
//#region src/
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const missing = required.filter((scope) => !requested.includes(scope));
|
|
94
|
-
if (missing.length === 0) return;
|
|
95
|
-
throw new ToolError(ErrorCode.PERMISSION_ERROR, `This session did not request scopes needed for these sections: ${missing.join(", ")}. Sign in again with a server that includes the config tools, or use an API key that has them.`, false, { missingScopes: missing });
|
|
96
|
-
}
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region src/helpers/collectingLogger.ts
|
|
99
|
-
/** Maximum lines kept, so a large sync cannot flood a tool result. */
|
|
100
|
-
const MAX_LOGS = 200;
|
|
101
|
-
/**
|
|
102
|
-
* Logger that keeps lines in memory instead of printing.
|
|
103
|
-
*
|
|
104
|
-
* A stdio MCP server reserves stdout for protocol frames, so SDK output must not
|
|
105
|
-
* reach it.
|
|
106
|
-
*
|
|
107
|
-
* @returns The logger and the lines it captured
|
|
108
|
-
*/
|
|
109
|
-
function createCollectedLogger() {
|
|
110
|
-
const logs = [];
|
|
111
|
-
const add = (level) => (...args) => {
|
|
112
|
-
if (level === "debug" || logs.length >= MAX_LOGS) return;
|
|
113
|
-
logs.push({
|
|
114
|
-
level,
|
|
115
|
-
message: args.map((arg) => typeof arg === "string" ? arg : JSON.stringify(arg)).join(" ")
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
return {
|
|
119
|
-
logger: {
|
|
120
|
-
debug: add("debug"),
|
|
121
|
-
info: add("info"),
|
|
122
|
-
warn: add("warn"),
|
|
123
|
-
error: add("error")
|
|
222
|
+
//#region src/tools/config_preview_push.ts
|
|
223
|
+
const MAX_DIFF_CHARS = 16e3;
|
|
224
|
+
const ConfigPreviewPushSchema = z.object({
|
|
225
|
+
filePath: z.string().describe("Absolute path of the transcend.yml file to preview. Must end in .yml or .yaml."),
|
|
226
|
+
variables: z.record(z.string(), z.string()).optional().describe("Values for <<parameters.name>> placeholders in the file, keyed by name."),
|
|
227
|
+
pageSize: z.number().int().min(1).max(100).optional().describe("Records per API request when pulling remote state. Defaults to 50.")
|
|
228
|
+
});
|
|
229
|
+
function createConfigPreviewPushTool(clients) {
|
|
230
|
+
return defineTool({
|
|
231
|
+
name: "config_preview_push",
|
|
232
|
+
description: "Dry-run preview for config_push: summary plus text diff, like transcend inventory push --dry-run. Show the diff in chat before pushing.",
|
|
233
|
+
category: "Config",
|
|
234
|
+
readOnly: true,
|
|
235
|
+
requireLocalFilesystem: true,
|
|
236
|
+
annotations: {
|
|
237
|
+
readOnlyHint: true,
|
|
238
|
+
destructiveHint: false,
|
|
239
|
+
idempotentHint: true
|
|
124
240
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const normalized = path.normalize(filePath);
|
|
144
|
-
if (!YAML_EXTENSIONS.has(path.extname(normalized).toLowerCase())) throw new ToolError(ErrorCode.VALIDATION_ERROR, `filePath must end in .yml or .yaml, got "${filePath}".`, false);
|
|
145
|
-
return normalized;
|
|
241
|
+
zodSchema: ConfigPreviewPushSchema,
|
|
242
|
+
handler: async ({ filePath, variables = {}, pageSize = 50 }) => {
|
|
243
|
+
const { input } = loadConfigFile(filePath, variables);
|
|
244
|
+
const requiredScopes = scopesForResources(resourcesInInput(input), TR_PUSH_RESOURCE_SCOPE_MAP);
|
|
245
|
+
assertScopesAvailable(clients.graphql, requiredScopes);
|
|
246
|
+
const plan = await previewPush(createGraphqlRequestClient(clients.graphql), input, { pageSize });
|
|
247
|
+
const diffFull = renderPushPlan(plan, { title: "Push preview (nothing was changed)" });
|
|
248
|
+
const truncated = diffFull.length > MAX_DIFF_CHARS;
|
|
249
|
+
const diff = truncated ? `${diffFull.slice(0, MAX_DIFF_CHARS)}\n… (diff truncated)` : diffFull;
|
|
250
|
+
return {
|
|
251
|
+
hasChanges: planHasChanges(plan),
|
|
252
|
+
summary: summarizePushPlan(plan),
|
|
253
|
+
diff,
|
|
254
|
+
truncated,
|
|
255
|
+
requiredScopes
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
});
|
|
146
259
|
}
|
|
147
260
|
//#endregion
|
|
148
261
|
//#region src/helpers/resources.ts
|
|
@@ -164,32 +277,42 @@ function parseResources(names) {
|
|
|
164
277
|
return names;
|
|
165
278
|
}
|
|
166
279
|
//#endregion
|
|
167
|
-
//#region src/helpers/
|
|
168
|
-
|
|
169
|
-
function hasConfigSection(value) {
|
|
170
|
-
if (value === void 0 || value === null) return false;
|
|
171
|
-
if (Array.isArray(value)) return value.length > 0;
|
|
172
|
-
if (typeof value === "object") return Object.keys(value).length > 0;
|
|
173
|
-
return true;
|
|
174
|
-
}
|
|
280
|
+
//#region src/helpers/configResourceAllowlist.ts
|
|
281
|
+
const TRANSCEND_CONFIG_RESOURCES_ENV = "TRANSCEND_CONFIG_RESOURCES";
|
|
175
282
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
283
|
+
* Comma-separated section names that cap OAuth scopes and config_pull / config_push.
|
|
284
|
+
* Returns `undefined` when unset so existing deployments keep the full server list.
|
|
178
285
|
*/
|
|
179
|
-
function
|
|
180
|
-
|
|
286
|
+
function parseConfigResourceAllowlistFromEnv() {
|
|
287
|
+
const raw = process.env[TRANSCEND_CONFIG_RESOURCES_ENV]?.trim();
|
|
288
|
+
if (!raw) return void 0;
|
|
289
|
+
const names = raw.split(",").map((name) => name.trim()).filter(Boolean);
|
|
290
|
+
if (names.length === 0) return void 0;
|
|
291
|
+
return parseResources(names);
|
|
181
292
|
}
|
|
182
|
-
/**
|
|
183
|
-
function
|
|
184
|
-
return
|
|
293
|
+
/** OAuth scopes needed to pull and push every section in the allowlist. */
|
|
294
|
+
function oauthScopesForConfigAllowlist(allowlist) {
|
|
295
|
+
return [...new Set([...scopesForResources(allowlist, TR_PULL_RESOURCE_SCOPE_MAP), ...scopesForResources(allowlist, TR_PUSH_RESOURCE_SCOPE_MAP)])].sort();
|
|
185
296
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
return Object.values(TranscendPullResource).filter((resource) => hasConfigSection(input[TR_YML_RESOURCE_TO_FIELD_NAME[resource]]));
|
|
297
|
+
function formatAllowlistError(disallowed, allowlist) {
|
|
298
|
+
return `Sections outside ${TRANSCEND_CONFIG_RESOURCES_ENV} allowlist: ${disallowed.join(", ")}. Allowed: ${allowlist.join(", ")}.`;
|
|
189
299
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
300
|
+
function assertResourcesInAllowlist(requested, allowlist) {
|
|
301
|
+
if (!allowlist?.length) return;
|
|
302
|
+
const allowed = new Set(allowlist);
|
|
303
|
+
const disallowed = requested.filter((resource) => !allowed.has(resource));
|
|
304
|
+
if (disallowed.length > 0) throw new ToolError(ErrorCode.VALIDATION_ERROR, formatAllowlistError(disallowed, allowlist), false);
|
|
305
|
+
}
|
|
306
|
+
function resolveDefaultPullResources(allowlist) {
|
|
307
|
+
return allowlist ? [...allowlist] : [...DEFAULT_TRANSCEND_PULL_RESOURCES];
|
|
308
|
+
}
|
|
309
|
+
/** Resolve config_pull `resources`, honoring TRANSCEND_CONFIG_RESOURCES when set. */
|
|
310
|
+
function resolvePullResourcesFromInput(resources, allowlist) {
|
|
311
|
+
if (!resources) return resolveDefaultPullResources(allowlist);
|
|
312
|
+
if (resources.includes("all")) return allowlist ? [...allowlist] : [...Object.values(TranscendPullResource)];
|
|
313
|
+
const parsed = parseResources(resources);
|
|
314
|
+
assertResourcesInAllowlist(parsed, allowlist);
|
|
315
|
+
return parsed;
|
|
193
316
|
}
|
|
194
317
|
//#endregion
|
|
195
318
|
//#region src/helpers/trackerStatuses.ts
|
|
@@ -236,7 +359,7 @@ function createConfigPullTool(clients) {
|
|
|
236
359
|
handler: async ({ filePath, resources, dataSiloIds = [], integrationNames = [], trackerStatuses, skipDatapoints, skipSubDatapoints, includeGuessedCategories, pageSize = 50, overwrite = false }) => {
|
|
237
360
|
const target = assertConfigFilePath(filePath);
|
|
238
361
|
if (existsSync(target) && !overwrite) throw new ToolError(ErrorCode.VALIDATION_ERROR, `${target} already exists. Pass overwrite: true to replace it.`, false);
|
|
239
|
-
const resourcesToPull =
|
|
362
|
+
const resourcesToPull = resolvePullResourcesFromInput(resources, parseConfigResourceAllowlistFromEnv());
|
|
240
363
|
const requiredScopes = scopesForResources(resourcesToPull, TR_PULL_RESOURCE_SCOPE_MAP);
|
|
241
364
|
assertScopesAvailable(clients.graphql, requiredScopes);
|
|
242
365
|
const { logger, logs } = createCollectedLogger();
|
|
@@ -276,11 +399,21 @@ const ConfigPushSchema = z.object({
|
|
|
276
399
|
function createConfigPushTool(clients) {
|
|
277
400
|
return defineTool({
|
|
278
401
|
name: "config_push",
|
|
279
|
-
description: "Push a transcend.yml file from disk to Transcend, creating and updating resources to match it. Same behavior as `transcend inventory push`. Empty sections are skipped. Returns success, per-resource errors, and warnings. Use config_get_schema for the file format and config_pull to start from the current state.",
|
|
402
|
+
description: "Push a transcend.yml file from disk to Transcend, creating and updating resources to match it. Same behavior as `transcend inventory push`. Empty sections are skipped. Run config_diff first (or config_preview_push for a structured summary). Returns success, per-resource errors, and warnings. Use config_get_schema for the file format and config_pull to start from the current state.",
|
|
280
403
|
category: "Config",
|
|
281
404
|
readOnly: false,
|
|
282
405
|
requireLocalFilesystem: true,
|
|
283
|
-
confirmation: {
|
|
406
|
+
confirmation: {
|
|
407
|
+
hint: "Creates and updates resources in the Transcend organization to match the transcend.yml file at filePath. Run config_diff first and confirm the diff with the user. Resources missing from the file are not deleted in most sections, but consent-manager domains and some lists are replaced wholesale. Check filePath and publishToPrivacyCenter before agreeing.",
|
|
408
|
+
describe: async (args) => {
|
|
409
|
+
const filePath = args.filePath;
|
|
410
|
+
if (typeof filePath !== "string") return void 0;
|
|
411
|
+
const variables = args.variables !== null && typeof args.variables === "object" && !Array.isArray(args.variables) ? args.variables : {};
|
|
412
|
+
const pageSize = typeof args.pageSize === "number" ? args.pageSize : 50;
|
|
413
|
+
const { input } = loadConfigFile(filePath, variables);
|
|
414
|
+
return summarizePushPlan(await previewPush(createGraphqlRequestClient(clients.graphql), input, { pageSize }));
|
|
415
|
+
}
|
|
416
|
+
},
|
|
284
417
|
annotations: {
|
|
285
418
|
readOnlyHint: false,
|
|
286
419
|
destructiveHint: true,
|
|
@@ -288,20 +421,10 @@ function createConfigPushTool(clients) {
|
|
|
288
421
|
},
|
|
289
422
|
zodSchema: ConfigPushSchema,
|
|
290
423
|
handler: async ({ filePath, variables = {}, publishToPrivacyCenter = false, classifyService = false, pageSize = 50 }) => {
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
} catch (error) {
|
|
296
|
-
throw new ToolError(ErrorCode.VALIDATION_ERROR, `Could not read ${source}: ${error instanceof Error ? error.message : String(error)}`, false);
|
|
297
|
-
}
|
|
298
|
-
let input;
|
|
299
|
-
try {
|
|
300
|
-
input = stripEmptyConfigSections(parseTranscendYaml(contents, variables, source));
|
|
301
|
-
} catch (error) {
|
|
302
|
-
throw new ToolError(ErrorCode.VALIDATION_ERROR, `${source} is not a valid transcend.yml: ${error instanceof Error ? error.message : String(error)}`, false);
|
|
303
|
-
}
|
|
304
|
-
const requiredScopes = scopesForResources(resourcesInInput(input), TR_PUSH_RESOURCE_SCOPE_MAP);
|
|
424
|
+
const { input } = loadConfigFile(filePath, variables);
|
|
425
|
+
const sectionsInFile = resourcesInInput(input);
|
|
426
|
+
assertResourcesInAllowlist(sectionsInFile, parseConfigResourceAllowlistFromEnv());
|
|
427
|
+
const requiredScopes = scopesForResources(sectionsInFile, TR_PUSH_RESOURCE_SCOPE_MAP);
|
|
305
428
|
assertScopesAvailable(clients.graphql, requiredScopes);
|
|
306
429
|
const { logger, logs } = createCollectedLogger();
|
|
307
430
|
const result = await syncConfigurationToTranscend(input, createGraphqlRequestClient(clients.graphql), {
|
|
@@ -326,11 +449,13 @@ function createConfigPushTool(clients) {
|
|
|
326
449
|
function getConfigTools(clients) {
|
|
327
450
|
return [
|
|
328
451
|
createConfigPullTool(clients),
|
|
452
|
+
createConfigDiffTool(clients),
|
|
329
453
|
createConfigPushTool(clients),
|
|
454
|
+
createConfigPreviewPushTool(clients),
|
|
330
455
|
createConfigGetSchemaTool(clients)
|
|
331
456
|
];
|
|
332
457
|
}
|
|
333
458
|
//#endregion
|
|
334
|
-
export {
|
|
459
|
+
export { parseConfigResourceAllowlistFromEnv as a, ConfigDiffSchema as c, oauthScopesForConfigAllowlist as i, ConfigPushSchema as n, ConfigPreviewPushSchema as o, ConfigPullSchema as r, ConfigGetSchemaSchema as s, getConfigTools as t };
|
|
335
460
|
|
|
336
|
-
//# sourceMappingURL=src-
|
|
461
|
+
//# sourceMappingURL=src-Boc4gKOP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-Boc4gKOP.mjs","names":[],"sources":["../src/helpers/assertScopesAvailable.ts","../src/helpers/configFilePath.ts","../src/helpers/sections.ts","../src/helpers/loadConfigFile.ts","../src/tools/config_diff.ts","../src/tools/config_get_schema.ts","../src/tools/config_preview_push.ts","../src/helpers/resources.ts","../src/helpers/configResourceAllowlist.ts","../src/helpers/trackerStatuses.ts","../src/tools/config_pull.ts","../src/tools/config_push.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAgB,sBACd,SACA,UACM;AACN,KAAI,QAAQ,eAAe,EAAE,SAAS,aAAc;CAEpD,IAAI;AACJ,KAAI;AACF,cAAY,gBAAgB;SACtB;AACN;;CAGF,MAAM,UAAU,SAAS,QAAQ,UAAU,CAAC,UAAU,SAAS,MAAM,CAAC;AACtE,KAAI,QAAQ,WAAW,EAAG;AAE1B,OAAM,IAAI,UACR,UAAU,kBACV,kEAAkE,QAAQ,KAAK,KAAK,CAAC,iGAErF,OACA,EAAE,eA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": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Transcend MCP Server — transcend.yml pull and push tools.",
|
|
5
5
|
"homepage": "https://github.com/transcend-io/tools/tree/main/packages/mcp/mcp-server-config",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@transcend-io/mcp-server-base": "^3.
|
|
34
|
-
"@transcend-io/privacy-types": "^7.1.
|
|
35
|
-
"@transcend-io/sdk": "^3.
|
|
33
|
+
"@transcend-io/mcp-server-base": "^3.2.0",
|
|
34
|
+
"@transcend-io/privacy-types": "^7.1.2",
|
|
35
|
+
"@transcend-io/sdk": "^3.4.0",
|
|
36
36
|
"@transcend-io/type-utils": "^3.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"src-DSpQACky.mjs","names":[],"sources":["../src/scopes.ts","../src/tools/config_get_schema.ts","../src/helpers/assertScopesAvailable.ts","../src/helpers/collectingLogger.ts","../src/helpers/configFilePath.ts","../src/helpers/resources.ts","../src/helpers/sections.ts","../src/helpers/trackerStatuses.ts","../src/tools/config_pull.ts","../src/tools/config_push.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;AASA,MAAa,sBAAmC,CAC9C,GAAG,IAAI,IAAI,CACT,GAAG,OAAO,OAAO,2BAA2B,CAAC,MAAM,EACnD,GAAG,OAAO,OAAO,2BAA2B,CAAC,MAAM,CACpD,CAAC,CACH,CAAC,MAAM;;;ACNR,MAAM,iCAAiC,OAAO,OAAO,sBAAsB;AAK3E,MAAM,8BAA8B,EAAE,KAAK,+BAA+B;AAE1E,MAAM,sBACJ;AAEF,MAAM,sBACJ;AAEF,MAAa,wBAAwB,EAAE,OAAO;CAC5C,WAAW,EACR,MAAM,4BAA4B,CAClC,UAAU,CACV,SAAS,qFAAmF;CAC/F,m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