@transcend-io/mcp-server-config 0.0.0-stage → 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,25 @@
1
- # Temporary Holding Version
1
+ # @transcend-io/mcp-server-config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Pull and push `transcend.yml` files from MCP tools. Same behavior as `transcend inventory pull` and `transcend inventory push`.
4
+
5
+ These tools read and write files on your machine, so they run over `stdio` only. The hosted HTTP server does not list them.
6
+
7
+ ## Tools
8
+
9
+ | Tool | What it does |
10
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
11
+ | `config_pull` | Writes the organization configuration to an absolute `.yml` path. Returns counts. |
12
+ | `config_push` | Pushes a `.yml` file to Transcend. Needs confirmation. Returns errors and warnings. |
13
+ | `config_get_schema` | Section catalog by default; pass `resources` for partial schema, or `includeFullSchema` for the full file (very large). |
14
+
15
+ ## Run
16
+
17
+ ```bash
18
+ npx -y @transcend-io/mcp-server-config
19
+ ```
20
+
21
+ Auth works like the other MCP servers. See the [MCP README](../README.md).
22
+
23
+ ## OAuth scopes
24
+
25
+ The server requests every scope that the pull and push paths can need. See `src/scopes.ts`.
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.mjs ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import { a as CONFIG_OAUTH_SCOPES, t as getConfigTools } from "./src-Dvs9ER5U.mjs";
3
+ import { TranscendGraphQLBase, createMCPServer, createTranscendRestClient } from "@transcend-io/mcp-server-base";
4
+ //#endregion
5
+ //#region src/cli.ts
6
+ createMCPServer({
7
+ name: "transcend-mcp-config",
8
+ version: "0.1.2",
9
+ oauthScopes: CONFIG_OAUTH_SCOPES,
10
+ getTools: getConfigTools,
11
+ createClients: ({ auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl }) => {
12
+ const graphql = new TranscendGraphQLBase(auth, graphqlUrl);
13
+ return {
14
+ rest: createTranscendRestClient(auth, graphql, {
15
+ sombraUrl,
16
+ sombraCustomerKey
17
+ }),
18
+ graphql,
19
+ dashboardUrl
20
+ };
21
+ }
22
+ });
23
+ //#endregion
24
+ export {};
25
+
26
+ //# sourceMappingURL=cli.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.mjs","names":["packageJson.version"],"sources":["../package.json","../src/cli.ts"],"mappings":";;;;;ACWA,gBAAgB;CACd,MAAM;CACGA;CACT,aAAa;CACb,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"}
@@ -0,0 +1,82 @@
1
+ import { ScopeName } from "@transcend-io/privacy-types";
2
+ import { TranscendPullResource } from "@transcend-io/sdk";
3
+ import { ToolClients, ToolDefinition, z } from "@transcend-io/mcp-server-base";
4
+
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
+ //#region src/tools/config_get_schema.d.ts
15
+ declare const ConfigGetSchemaSchema: z.ZodObject<{
16
+ resources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
17
+ apiKeys: TranscendPullResource.ApiKeys;
18
+ customFields: TranscendPullResource.Attributes;
19
+ templates: TranscendPullResource.Templates;
20
+ dataSilos: TranscendPullResource.DataSilos;
21
+ enrichers: TranscendPullResource.Enrichers;
22
+ dataFlows: TranscendPullResource.DataFlows;
23
+ businessEntities: TranscendPullResource.BusinessEntities;
24
+ processingActivities: TranscendPullResource.ProcessingActivities;
25
+ actions: TranscendPullResource.Actions;
26
+ dataSubjects: TranscendPullResource.DataSubjects;
27
+ identifiers: TranscendPullResource.Identifiers;
28
+ cookies: TranscendPullResource.Cookies;
29
+ consentSites: TranscendPullResource.ConsentSites;
30
+ consentManager: TranscendPullResource.ConsentManager;
31
+ partitions: TranscendPullResource.Partitions;
32
+ vendors: TranscendPullResource.Vendors;
33
+ dataCategories: TranscendPullResource.DataCategories;
34
+ processingPurposes: TranscendPullResource.ProcessingPurposes;
35
+ actionItems: TranscendPullResource.ActionItems;
36
+ actionItemCollections: TranscendPullResource.ActionItemCollections;
37
+ teams: TranscendPullResource.Teams;
38
+ privacyCenters: TranscendPullResource.PrivacyCenters;
39
+ policies: TranscendPullResource.Policies;
40
+ messages: TranscendPullResource.Messages;
41
+ assessments: TranscendPullResource.Assessments;
42
+ assessmentTemplates: TranscendPullResource.AssessmentTemplates;
43
+ purposes: TranscendPullResource.Purposes;
44
+ preferenceOptions: TranscendPullResource.PreferenceOptions;
45
+ systemDiscovery: TranscendPullResource.SystemDiscovery;
46
+ preferenceWorkflowConfigs: TranscendPullResource.PreferenceWorkflowConfigs;
47
+ workflowConfigs: TranscendPullResource.WorkflowConfigs;
48
+ }>>>;
49
+ includeFullSchema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
50
+ }, z.core.$strip>;
51
+ type ConfigGetSchemaInput = z.infer<typeof ConfigGetSchemaSchema>;
52
+ //#endregion
53
+ //#region src/tools/config_pull.d.ts
54
+ declare const ConfigPullSchema: z.ZodObject<{
55
+ filePath: z.ZodString;
56
+ resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
+ dataSiloIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
+ integrationNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ trackerStatuses: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
+ skipDatapoints: z.ZodOptional<z.ZodBoolean>;
61
+ skipSubDatapoints: z.ZodOptional<z.ZodBoolean>;
62
+ includeGuessedCategories: z.ZodOptional<z.ZodBoolean>;
63
+ pageSize: z.ZodOptional<z.ZodNumber>;
64
+ overwrite: z.ZodOptional<z.ZodBoolean>;
65
+ }, z.core.$strip>;
66
+ type ConfigPullInput = z.infer<typeof ConfigPullSchema>;
67
+ //#endregion
68
+ //#region src/tools/config_push.d.ts
69
+ declare const ConfigPushSchema: z.ZodObject<{
70
+ filePath: z.ZodString;
71
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
72
+ publishToPrivacyCenter: z.ZodOptional<z.ZodBoolean>;
73
+ classifyService: z.ZodOptional<z.ZodBoolean>;
74
+ pageSize: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strip>;
76
+ type ConfigPushInput = z.infer<typeof ConfigPushSchema>;
77
+ //#endregion
78
+ //#region src/index.d.ts
79
+ declare function getConfigTools(clients: ToolClients): ToolDefinition[];
80
+ //#endregion
81
+ export { CONFIG_OAUTH_SCOPES, type ConfigGetSchemaInput, ConfigGetSchemaSchema, type ConfigPullInput, ConfigPullSchema, type ConfigPushInput, ConfigPushSchema, getConfigTools };
82
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/scopes.ts","../src/tools/config_get_schema.ts","../src/tools/config_pull.ts","../src/tools/config_push.ts","../src/index.ts"],"mappings":";;;;;;;;;AASA;;cAAa,mBAAA,EAAqB,SAAA;;;cCYrB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KActB,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,qBAAA;;;cCTrC,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;;KAgDjB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,gBAAA;;;cChDhC,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;KA4BjB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,gBAAA;;;iBC/C7B,cAAA,CAAe,OAAA,EAAS,WAAA,GAAc,cAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { a as CONFIG_OAUTH_SCOPES, i as ConfigGetSchemaSchema, n as ConfigPushSchema, r as ConfigPullSchema, t as getConfigTools } from "./src-Dvs9ER5U.mjs";
2
+ export { CONFIG_OAUTH_SCOPES, ConfigGetSchemaSchema, ConfigPullSchema, ConfigPushSchema, getConfigTools };
@@ -0,0 +1,305 @@
1
+ import { ConsentTrackerStatus } from "@transcend-io/privacy-types";
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, createCollectedLogger, createGraphqlRequestClient, defineTool, getOAuthScopes, z } from "@transcend-io/mcp-server-base";
4
+ import { toJsonSchema } from "@transcend-io/type-utils";
5
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
6
+ import path from "node:path";
7
+ //#region src/scopes.ts
8
+ /**
9
+ * OAuth scopes for the config MCP tools (offline_access added by base).
10
+ *
11
+ * The union of every scope the `transcend.yml` pull and push paths can need, so a
12
+ * user can pull or push any section after one sign-in.
13
+ */
14
+ const CONFIG_OAUTH_SCOPES = [...new Set([...Object.values(TR_PULL_RESOURCE_SCOPE_MAP).flat(), ...Object.values(TR_PUSH_RESOURCE_SCOPE_MAP).flat()])].sort();
15
+ //#endregion
16
+ //#region src/tools/config_get_schema.ts
17
+ const TRANSCEND_PULL_RESOURCE_VALUES = Object.values(TranscendPullResource);
18
+ const TranscendPullResourceSchema = z.enum(TRANSCEND_PULL_RESOURCE_VALUES);
19
+ const FULL_SCHEMA_WARNING = "Full transcend.yml JSON schema is very large (about 160k tokens). Prefer requesting specific resources.";
20
+ const SCHEMA_CATALOG_HINT = "No schema returned. Pass resources for section schemas, or set includeFullSchema to true for the full file.";
21
+ const ConfigGetSchemaSchema = z.object({
22
+ resources: z.array(TranscendPullResourceSchema).optional().describe("Sections to describe, such as [\"dataSilos\"]. Omit for a catalog of all sections."),
23
+ includeFullSchema: z.boolean().optional().default(false).describe("When true and resources is omitted, return the full file schema. Very large; can overflow agent context.")
24
+ });
25
+ let cachedSchema;
26
+ /** Built on first use: the codec is large, and most sessions never need it. */
27
+ function getTranscendInputSchema() {
28
+ cachedSchema ??= toJsonSchema(TranscendInput);
29
+ return cachedSchema;
30
+ }
31
+ function buildKeyBySection(resources) {
32
+ const sections = resources.length > 0 ? resources : Object.values(TranscendPullResource);
33
+ return Object.fromEntries(sections.map((resource) => [resource, TR_YML_RESOURCE_TO_FIELD_NAME[resource]]));
34
+ }
35
+ function createConfigGetSchemaTool(_clients) {
36
+ return defineTool({
37
+ name: "config_get_schema",
38
+ description: "Get transcend.yml JSON schema for chosen sections, or a section catalog when resources is omitted. Use before editing a file for config_push. The full-file schema is huge; pass resources or only set includeFullSchema when you truly need every section at once.",
39
+ category: "Config",
40
+ readOnly: true,
41
+ annotations: {
42
+ readOnlyHint: true,
43
+ destructiveHint: false,
44
+ idempotentHint: true
45
+ },
46
+ zodSchema: ConfigGetSchemaSchema,
47
+ handler: async ({ resources = [], includeFullSchema = false }) => {
48
+ const keyBySection = buildKeyBySection(resources);
49
+ if (resources.length === 0 && !includeFullSchema) return {
50
+ keyBySection,
51
+ validSections: TRANSCEND_PULL_RESOURCE_VALUES,
52
+ hint: SCHEMA_CATALOG_HINT
53
+ };
54
+ const schema = getTranscendInputSchema();
55
+ if (resources.length === 0) return {
56
+ schema,
57
+ keyBySection,
58
+ warning: FULL_SCHEMA_WARNING
59
+ };
60
+ const keys = new Set(Object.values(keyBySection));
61
+ const { required: _required, ...rest } = schema;
62
+ return {
63
+ schema: {
64
+ ...rest,
65
+ properties: Object.fromEntries(Object.entries(schema.properties ?? {}).filter(([key]) => keys.has(key)))
66
+ },
67
+ keyBySection
68
+ };
69
+ }
70
+ });
71
+ }
72
+ //#endregion
73
+ //#region src/helpers/assertScopesAvailable.ts
74
+ /**
75
+ * Fail fast when a stdio OAuth session never asked for scopes the call needs.
76
+ *
77
+ * Only the scopes requested at sign-in are known here, not the ones the user
78
+ * finally granted, and API keys carry no scope list at all. For those the server
79
+ * answers with an `ACCESS_DENIED` error that already names the missing scopes.
80
+ *
81
+ * @param graphql - Client whose current auth decides whether the check applies
82
+ * @param required - Scopes the call needs
83
+ * @throws ToolError with `missingScopes` when sign-in did not request them
84
+ */
85
+ function assertScopesAvailable(graphql, required) {
86
+ if (graphql.effectiveAuth()?.type !== "oauthToken") return;
87
+ let requested;
88
+ try {
89
+ requested = getOAuthScopes();
90
+ } catch {
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/configFilePath.ts
99
+ const YAML_EXTENSIONS = new Set([".yml", ".yaml"]);
100
+ /**
101
+ * Validate the path an agent passes for a `transcend.yml` file.
102
+ *
103
+ * Absolute paths only, because the server's working directory is not the
104
+ * agent's. YAML extensions only, so a tool call cannot overwrite arbitrary files.
105
+ *
106
+ * @param filePath - Path from the tool arguments
107
+ * @returns The normalized absolute path
108
+ * @throws ToolError when the path is relative or not a YAML file
109
+ */
110
+ function assertConfigFilePath(filePath) {
111
+ if (!path.isAbsolute(filePath)) throw new ToolError(ErrorCode.VALIDATION_ERROR, `filePath must be absolute, got "${filePath}".`, false);
112
+ const normalized = path.normalize(filePath);
113
+ if (!YAML_EXTENSIONS.has(path.extname(normalized).toLowerCase())) throw new ToolError(ErrorCode.VALIDATION_ERROR, `filePath must end in .yml or .yaml, got "${filePath}".`, false);
114
+ return normalized;
115
+ }
116
+ //#endregion
117
+ //#region src/helpers/resources.ts
118
+ const VALID_RESOURCES = new Set(Object.values(TranscendPullResource));
119
+ /**
120
+ * Validate section names from a tool call.
121
+ *
122
+ * Tool inputs take plain strings instead of an enum. The 30 names would otherwise
123
+ * be repeated in the input schema of every tool, which counts against the size of
124
+ * `tools/list`. The error names every valid value, so a wrong guess costs one retry.
125
+ *
126
+ * @param names - Section names from the arguments
127
+ * @returns The names as resources
128
+ * @throws ToolError naming the unknown sections and all valid ones
129
+ */
130
+ function parseResources(names) {
131
+ const unknown = names.filter((name) => !VALID_RESOURCES.has(name));
132
+ if (unknown.length > 0) throw new ToolError(ErrorCode.VALIDATION_ERROR, `Unknown sections: ${unknown.join(", ")}. Valid sections: ${[...VALID_RESOURCES].join(", ")}.`, false);
133
+ return names;
134
+ }
135
+ //#endregion
136
+ //#region src/helpers/sections.ts
137
+ /** Whether a top-level `transcend.yml` section has anything to sync. */
138
+ function hasConfigSection(value) {
139
+ if (value === void 0 || value === null) return false;
140
+ if (Array.isArray(value)) return value.length > 0;
141
+ if (typeof value === "object") return Object.keys(value).length > 0;
142
+ return true;
143
+ }
144
+ /**
145
+ * Drop empty sections. An empty array such as `action-items: []` still counts as
146
+ * a present key, and would request scopes and sync attempts for nothing.
147
+ */
148
+ function stripEmptyConfigSections(input) {
149
+ return Object.fromEntries(Object.entries(input).filter(([, value]) => hasConfigSection(value)));
150
+ }
151
+ /** Item count per non-empty section, so a tool result never has to echo the file. */
152
+ function countConfigSections(input) {
153
+ return Object.fromEntries(Object.entries(input).filter(([, value]) => hasConfigSection(value)).map(([key, value]) => [key, Array.isArray(value) ? value.length : Object.keys(value).length || 1]));
154
+ }
155
+ /** Resources whose section is present in the input. */
156
+ function resourcesInInput(input) {
157
+ return Object.values(TranscendPullResource).filter((resource) => hasConfigSection(input[TR_YML_RESOURCE_TO_FIELD_NAME[resource]]));
158
+ }
159
+ /** Union of the scopes for the given resources, from a scope map. */
160
+ function scopesForResources(resources, scopeMap) {
161
+ return [...new Set(resources.flatMap((resource) => scopeMap[resource]))].sort();
162
+ }
163
+ //#endregion
164
+ //#region src/helpers/trackerStatuses.ts
165
+ const VALID_STATUSES = new Set(Object.values(ConsentTrackerStatus));
166
+ /**
167
+ * Validate tracker statuses from a tool call.
168
+ *
169
+ * @param names - Status names from the arguments
170
+ * @returns The names as statuses
171
+ * @throws ToolError naming the unknown statuses and all valid ones
172
+ */
173
+ function parseTrackerStatuses(names) {
174
+ const unknown = names.filter((name) => !VALID_STATUSES.has(name));
175
+ if (unknown.length > 0) throw new ToolError(ErrorCode.VALIDATION_ERROR, `Unknown tracker statuses: ${unknown.join(", ")}. Valid: ${[...VALID_STATUSES].join(", ")}.`, false);
176
+ return names;
177
+ }
178
+ //#endregion
179
+ //#region src/tools/config_pull.ts
180
+ const ConfigPullSchema = z.object({
181
+ filePath: z.string().describe("Absolute path of the transcend.yml file to write. Must end in .yml or .yaml."),
182
+ resources: z.array(z.string()).optional().describe(`Section names to pull, such as ["dataSilos", "purposes"]. Use ["all"] for every section. Defaults to ${DEFAULT_TRANSCEND_PULL_RESOURCES.join(", ")}. Valid names: config_get_schema.`),
183
+ dataSiloIds: z.array(z.string()).optional().describe("Only pull these data silo IDs. Cannot be combined with integrationNames."),
184
+ integrationNames: z.array(z.string()).optional().describe("Only pull data silos of these integration types, such as \"salesforce\"."),
185
+ trackerStatuses: z.array(z.string()).optional().describe("Cookie and data flow statuses to pull: LIVE or NEEDS_REVIEW. Defaults to all."),
186
+ skipDatapoints: z.boolean().optional().describe("Skip data points when pulling data silos. Faster for large organizations."),
187
+ skipSubDatapoints: z.boolean().optional().describe("Skip sub data points when pulling data silos."),
188
+ includeGuessedCategories: z.boolean().optional().describe("Include metadata about guessed data categories."),
189
+ pageSize: z.number().int().min(1).max(100).optional().describe("Records per API request. Defaults to 50."),
190
+ overwrite: z.boolean().optional().describe("Replace the file if it exists. Defaults to false, which fails instead.")
191
+ });
192
+ function createConfigPullTool(clients) {
193
+ return defineTool({
194
+ name: "config_pull",
195
+ description: "Pull organization configuration from Transcend into a transcend.yml file on disk. Same output as `transcend inventory pull`. Returns per-section counts, never the file contents. Read the file to see it. Use config_get_schema to learn the file format.",
196
+ category: "Config",
197
+ readOnly: false,
198
+ requireLocalFilesystem: true,
199
+ annotations: {
200
+ readOnlyHint: false,
201
+ destructiveHint: false,
202
+ idempotentHint: true
203
+ },
204
+ zodSchema: ConfigPullSchema,
205
+ handler: async ({ filePath, resources, dataSiloIds = [], integrationNames = [], trackerStatuses, skipDatapoints, skipSubDatapoints, includeGuessedCategories, pageSize = 50, overwrite = false }) => {
206
+ const target = assertConfigFilePath(filePath);
207
+ if (existsSync(target) && !overwrite) throw new ToolError(ErrorCode.VALIDATION_ERROR, `${target} already exists. Pass overwrite: true to replace it.`, false);
208
+ const resourcesToPull = !resources ? [...DEFAULT_TRANSCEND_PULL_RESOURCES] : resources.includes("all") ? Object.values(TranscendPullResource) : parseResources(resources);
209
+ const requiredScopes = scopesForResources(resourcesToPull, TR_PULL_RESOURCE_SCOPE_MAP);
210
+ assertScopesAvailable(clients.graphql, requiredScopes);
211
+ const { logger, logs } = createCollectedLogger();
212
+ const configuration = await pullTranscendConfiguration(createGraphqlRequestClient(clients.graphql), {
213
+ dataSiloIds,
214
+ integrationNames,
215
+ resources: resourcesToPull,
216
+ trackerStatuses: trackerStatuses && parseTrackerStatuses(trackerStatuses),
217
+ skipDatapoints,
218
+ skipSubDatapoints,
219
+ includeGuessedCategories,
220
+ pageSize,
221
+ debug: false,
222
+ logger
223
+ });
224
+ mkdirSync(path.dirname(target), { recursive: true });
225
+ writeFileSync(target, serializeTranscendYaml(configuration));
226
+ return {
227
+ filePath: target,
228
+ resources: resourcesToPull,
229
+ sections: countConfigSections(configuration),
230
+ requiredScopes,
231
+ ...logs.some((log) => log.level !== "info") && { logs }
232
+ };
233
+ }
234
+ });
235
+ }
236
+ //#endregion
237
+ //#region src/tools/config_push.ts
238
+ const ConfigPushSchema = z.object({
239
+ filePath: z.string().describe("Absolute path of the transcend.yml file to push. Must end in .yml or .yaml."),
240
+ variables: z.record(z.string(), z.string()).optional().describe("Values for <<parameters.name>> placeholders in the file, keyed by name. Every placeholder in the file needs a value."),
241
+ publishToPrivacyCenter: z.boolean().optional().describe("Publish privacy center changes after the push. Defaults to false."),
242
+ classifyService: z.boolean().optional().describe("Run service classification on data silos during the push. Defaults to false."),
243
+ pageSize: z.number().int().min(1).max(100).optional().describe("Records per API request. Defaults to 50.")
244
+ });
245
+ function createConfigPushTool(clients) {
246
+ return defineTool({
247
+ name: "config_push",
248
+ 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.",
249
+ category: "Config",
250
+ readOnly: false,
251
+ requireLocalFilesystem: true,
252
+ confirmation: { hint: "Creates and updates resources in the Transcend organization to match the transcend.yml file at filePath, across every section the file contains (data silos, purposes, workflows, policies, and more). Resources missing from the file are not deleted, but matching resources are overwritten. Check the file path, and whether publishToPrivacyCenter is set, before agreeing." },
253
+ annotations: {
254
+ readOnlyHint: false,
255
+ destructiveHint: true,
256
+ idempotentHint: true
257
+ },
258
+ zodSchema: ConfigPushSchema,
259
+ handler: async ({ filePath, variables = {}, publishToPrivacyCenter = false, classifyService = false, pageSize = 50 }) => {
260
+ const source = assertConfigFilePath(filePath);
261
+ let contents;
262
+ try {
263
+ contents = readFileSync(source, "utf-8");
264
+ } catch (error) {
265
+ throw new ToolError(ErrorCode.VALIDATION_ERROR, `Could not read ${source}: ${error instanceof Error ? error.message : String(error)}`, false);
266
+ }
267
+ let input;
268
+ try {
269
+ input = stripEmptyConfigSections(parseTranscendYaml(contents, variables, source));
270
+ } catch (error) {
271
+ throw new ToolError(ErrorCode.VALIDATION_ERROR, `${source} is not a valid transcend.yml: ${error instanceof Error ? error.message : String(error)}`, false);
272
+ }
273
+ const requiredScopes = scopesForResources(resourcesInInput(input), TR_PUSH_RESOURCE_SCOPE_MAP);
274
+ assertScopesAvailable(clients.graphql, requiredScopes);
275
+ const { logger, logs } = createCollectedLogger();
276
+ const result = await syncConfigurationToTranscend(input, createGraphqlRequestClient(clients.graphql), {
277
+ pageSize,
278
+ publishToPrivacyCenter,
279
+ classifyService,
280
+ logger
281
+ });
282
+ return {
283
+ success: result.success,
284
+ errors: result.errors,
285
+ ...result.warnings && { warnings: result.warnings },
286
+ sections: countConfigSections(input),
287
+ requiredScopes,
288
+ ...!result.success && { logs: result.logs ?? logs }
289
+ };
290
+ }
291
+ });
292
+ }
293
+ //#endregion
294
+ //#region src/index.ts
295
+ function getConfigTools(clients) {
296
+ return [
297
+ createConfigPullTool(clients),
298
+ createConfigPushTool(clients),
299
+ createConfigGetSchemaTool(clients)
300
+ ];
301
+ }
302
+ //#endregion
303
+ export { CONFIG_OAUTH_SCOPES as a, ConfigGetSchemaSchema as i, ConfigPushSchema as n, ConfigPullSchema as r, getConfigTools as t };
304
+
305
+ //# sourceMappingURL=src-Dvs9ER5U.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-Dvs9ER5U.mjs","names":[],"sources":["../src/scopes.ts","../src/tools/config_get_schema.ts","../src/helpers/assertScopesAvailable.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,MA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AU,kBACV,kBAAkB,OAAO,IAAI,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,IACnF,MACD;;GAGH,IAAI;AACJ,OAAI;AACF,YAAQ,yBAAyB,mBAAmB,UAAU,WAAW,OAAO,CAAC;YAC1E,OAAO;AACd,UAAM,IAAI,UACR,UAAU,kBACV,GAAG,OAAO,iCACR,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,IAExD,MACD;;GAGH,MAAM,iBAAiB,mBACrB,iBAAiB,MAAM,EACvB,2BACD;AACD,yBAAsB,QAAQ,SAAS,eAAe;GAEtD,MAAM,EAAE,QAAQ,SAAS,uBAAuB;GAChD,MAAM,SAAS,MAAM,6BACnB,OACA,2BAA2B,QAAQ,QAAQ,EAC3C;IAAE;IAAU;IAAwB;IAAiB;IAAQ,CAC9D;AAED,UAAO;IACL,SAAS,OAAO;IAChB,QAAQ,OAAO;IACf,GAAI,OAAO,YAAY,EAAE,UAAU,OAAO,UAAU;IACpD,UAAU,oBAAoB,MAAM;IACpC;IACA,GAAI,CAAC,OAAO,WAAW,EAAE,MAAM,OAAO,QAAQ,MAAM;IACrD;;EAEJ,CAAC;;;;AC7HJ,SAAgB,eAAe,SAAwC;AACrE,QAAO;EACL,qBAAqB,QAAQ;EAC7B,qBAAqB,QAAQ;EAC7B,0BAA0B,QAAQ;EACnC"}
package/package.json CHANGED
@@ -1,6 +1,62 @@
1
1
  {
2
2
  "name": "@transcend-io/mcp-server-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.2",
4
+ "description": "Transcend MCP Server — transcend.yml pull and push tools.",
5
+ "homepage": "https://github.com/transcend-io/tools/tree/main/packages/mcp/mcp-server-config",
6
+ "license": "Apache-2.0",
7
+ "author": "Transcend Inc.",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/transcend-io/tools.git",
11
+ "directory": "packages/mcp/mcp-server-config"
12
+ },
13
+ "bin": {
14
+ "transcend-mcp-config": "./dist/cli.mjs"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "type": "module",
20
+ "sideEffects": false,
21
+ "types": "./dist/index.d.mts",
22
+ "exports": {
23
+ ".": {
24
+ "@transcend-io/source": "./src/index.ts",
25
+ "types": "./dist/index.d.mts",
26
+ "default": "./dist/index.mjs"
27
+ }
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "dependencies": {
33
+ "@transcend-io/mcp-server-base": "^3.1.2",
34
+ "@transcend-io/sdk": "^3.3.0",
35
+ "@transcend-io/privacy-types": "^7.1.1",
36
+ "@transcend-io/type-utils": "^3.3.0"
37
+ },
38
+ "devDependencies": {
39
+ "@arethetypeswrong/cli": "0.18.3",
40
+ "@modelcontextprotocol/sdk": "1.29.0",
41
+ "@types/node": "24.13.3",
42
+ "publint": "0.3.21",
43
+ "tsdown": "0.21.10",
44
+ "typescript": "6.0.3",
45
+ "vitest": "4.1.11",
46
+ "zod": "4.6.6"
47
+ },
48
+ "peerDependencies": {
49
+ "@modelcontextprotocol/sdk": "^1.29.0",
50
+ "zod": "^4.6.6"
51
+ },
52
+ "engines": {
53
+ "node": ">=22.12.0"
54
+ },
55
+ "scripts": {
56
+ "build": "tsdown",
57
+ "test": "vitest run --config ../../../vitest.config.mcp.ts",
58
+ "typecheck": "tsc -p tsconfig.json --noEmit",
59
+ "check:exports": "attw --pack . --ignore-rules cjs-resolves-to-esm",
60
+ "check:publint": "publint --level warning --strict --pack pnpm"
61
+ }
6
62
  }