@transcend-io/mcp 2.2.0 → 2.4.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/dist/cli.mjs +9 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +26 -30
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{oauth-scopes-B0TE4ubH.mjs → oauth-scopes-WCeJ2itg.mjs} +2627 -2399
- package/dist/oauth-scopes-WCeJ2itg.mjs.map +1 -0
- package/package.json +17 -17
- package/dist/oauth-scopes-B0TE4ubH.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as TranscendMcpServer, f as TranscendGraphQLClient, l as parseMcpServerAllowlistFromEnv, n as resolveUmbrellaOAuthScopes, o as allowlistIncludesDocs, r as ToolRegistry, s as allowlistIncludesServer, u as resolveMcpServerAllowlist } from "./oauth-scopes-
|
|
2
|
+
import { d as TranscendMcpServer, f as TranscendGraphQLClient, l as parseMcpServerAllowlistFromEnv, n as resolveUmbrellaOAuthScopes, o as allowlistIncludesDocs, r as ToolRegistry, s as allowlistIncludesServer, u as resolveMcpServerAllowlist } from "./oauth-scopes-WCeJ2itg.mjs";
|
|
3
3
|
import { McpTransport, SimpleLogger, buildMcpServer, configureOAuthScopes, createTranscendRestClient, isOAuthModeEnabled, parseTransportArgs, readSombraEnvConfig, resolveMcpDashboardUrl, resolveMcpGraphqlUrl, resolveStdioStartupAuthOptional, runMcpHttp } from "@transcend-io/mcp-server-base";
|
|
4
4
|
import { getDsrPrompts } from "@transcend-io/mcp-server-dsr";
|
|
5
5
|
import { parseConfigResourceAllowlistFromEnv } from "@transcend-io/mcp-server-config";
|
|
6
6
|
import { getConsentPrompts } from "@transcend-io/mcp-server-consent";
|
|
7
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
8
|
//#region package.json
|
|
9
|
-
var version = "2.
|
|
9
|
+
var version = "2.4.0";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/server-instructions.ts
|
|
12
12
|
/** MCP initialize instructions for the unified @transcend-io/mcp server. */
|
|
@@ -25,12 +25,13 @@ function buildServerOptions(allowlist) {
|
|
|
25
25
|
prompts
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
function createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl, allowlist) {
|
|
28
|
+
function createToolRegistry(auth, sombraUrl, sombraCustomerKey, requireMultiTenantSombra, graphqlUrl, dashboardUrl, allowlist) {
|
|
29
29
|
const graphqlClient = new TranscendGraphQLClient(auth, graphqlUrl);
|
|
30
30
|
return new ToolRegistry({
|
|
31
31
|
rest: createTranscendRestClient(auth, graphqlClient, {
|
|
32
32
|
sombraUrl,
|
|
33
|
-
sombraCustomerKey
|
|
33
|
+
sombraCustomerKey,
|
|
34
|
+
requireMultiTenantSombra
|
|
34
35
|
}),
|
|
35
36
|
graphql: graphqlClient,
|
|
36
37
|
dashboardUrl,
|
|
@@ -60,6 +61,8 @@ async function main() {
|
|
|
60
61
|
await runMcpHttp({
|
|
61
62
|
name: "transcend-mcp",
|
|
62
63
|
version: VERSION,
|
|
64
|
+
authorizationServerUrl: graphqlUrl,
|
|
65
|
+
scopesSupported: resolveUmbrellaOAuthScopes(allowlist, parseConfigResourceAllowlistFromEnv()),
|
|
63
66
|
createServer: async (auth) => {
|
|
64
67
|
logger.info("Creating unified MCP server for new HTTP session...", {
|
|
65
68
|
sombraUrl: sombraUrl ?? "(lazy GraphQL resolve)",
|
|
@@ -69,7 +72,7 @@ async function main() {
|
|
|
69
72
|
hasSombraCustomerKey: Boolean(sombraCustomerKey),
|
|
70
73
|
mcpServers: parseMcpServerAllowlistFromEnv() ? [...allowlist].join(",") : "(all)"
|
|
71
74
|
});
|
|
72
|
-
const registry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl, allowlist);
|
|
75
|
+
const registry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, Boolean(config.publicUrl), graphqlUrl, dashboardUrl, allowlist);
|
|
73
76
|
return buildMcpServer({
|
|
74
77
|
...serverOptions,
|
|
75
78
|
tools: registry.getAllTools(),
|
|
@@ -88,7 +91,7 @@ async function main() {
|
|
|
88
91
|
authType: auth?.type ?? (isOAuthModeEnabled() ? "oauth-pending" : "none"),
|
|
89
92
|
mcpServers: parseMcpServerAllowlistFromEnv() ? [...allowlist].join(",") : "(all)"
|
|
90
93
|
});
|
|
91
|
-
const toolRegistry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, graphqlUrl, dashboardUrl, allowlist);
|
|
94
|
+
const toolRegistry = createToolRegistry(auth, sombraUrl, sombraCustomerKey, false, graphqlUrl, dashboardUrl, allowlist);
|
|
92
95
|
logger.info(`Registered ${toolRegistry.getToolCount()} tools across ${toolRegistry.getCategories().length} categories`, {
|
|
93
96
|
categories: toolRegistry.getCategories(),
|
|
94
97
|
toolCount: toolRegistry.getToolCount()
|
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":["packageJson.version"],"sources":["../package.json","../src/server-instructions.ts","../src/cli.ts"],"mappings":";;;;;;;;;;;;ACCA,MAAa,oCACX;;AAQF,MAAa,+BACX;;;AC4BF,MAAM,UAAUA;AAEhB,SAAS,mBAAmB,WAA+B;CACzD,MAAM,UAAU,CACd,GAAI,wBAAwB,WAAW,mBAAmB,QAAQ,GAAG,mBAAmB,GAAG,EAAE,EAC7F,GAAI,wBAAwB,WAAW,mBAAmB,IAAI,GAAG,eAAe,GAAG,EAAE,CACtF;AAED,QAAO;EACL,MAAM;EACN,SAAS;EACT,cAAc,sBAAsB,UAAU,GAC1C,oCACA;EACJ;EACD;;AAGH,SAAS,mBACP,MACA,WACA,mBACA,YACA,cACA,WACc;CACd,MAAM,gBAAgB,IAAI,uBAAuB,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":["packageJson.version"],"sources":["../package.json","../src/server-instructions.ts","../src/cli.ts"],"mappings":";;;;;;;;;;;;ACCA,MAAa,oCACX;;AAQF,MAAa,+BACX;;;AC4BF,MAAM,UAAUA;AAEhB,SAAS,mBAAmB,WAA+B;CACzD,MAAM,UAAU,CACd,GAAI,wBAAwB,WAAW,mBAAmB,QAAQ,GAAG,mBAAmB,GAAG,EAAE,EAC7F,GAAI,wBAAwB,WAAW,mBAAmB,IAAI,GAAG,eAAe,GAAG,EAAE,CACtF;AAED,QAAO;EACL,MAAM;EACN,SAAS;EACT,cAAc,sBAAsB,UAAU,GAC1C,oCACA;EACJ;EACD;;AAGH,SAAS,mBACP,MACA,WACA,mBACA,0BACA,YACA,cACA,WACc;CACd,MAAM,gBAAgB,IAAI,uBAAuB,MAAM,WAAW;AAMlE,QAAO,IAAI,aACT;EACE,MAPe,0BAA0B,MAAM,eAAe;GAChE;GACA;GACA;GACD,CAGmB;EAChB,SAAS;EACT;EACA,iBAAiB;EACjB;EACD,EACD,UACD;;AAGH,SAAS,0BAA8C;AACrD,KAAI;AACF,SAAO,2BAA2B;UAC3B,OAAO;AAEd,MADmB,cACb,CAAC,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,CAAC;AACpE,UAAQ,KAAK,EAAE;;;AAInB,eAAe,OAAsB;CACnC,MAAM,YAAY,yBAAyB;CAC3C,MAAM,gBAAgB,mBAAmB,UAAU;CACnD,MAAM,SAAS,oBAAoB;CACnC,MAAM,kBAAkB,OAAO,cAAc,aAAa;AAC1D,cAAa,gBAAgB,gBAAgB;CAC7C,MAAM,SAAS,IAAI,cAAc;CACjC,MAAM,EAAE,WAAW,sBAAsB,qBAAqB;CAC9D,MAAM,eAAe,wBAAwB;CAC7C,MAAM,aAAa,MAAM,qBAAqB,OAAO;AAErD,KAAI,iBAAiB;AACnB,QAAM,WACJ;GACE,MAAM;GACN,SAAS;GAET,wB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c;EACnC,CAAC;;AAGJ,MAAM,CAAC,OAAO,UAAU;AAEtB,KADmB,cACb,CAAC,MAAM,2BAA2B,MAAM;AAC9C,SAAQ,KAAK,EAAE;EACf"}
|
package/dist/index.d.mts
CHANGED
|
@@ -414,6 +414,29 @@ declare module './HKT' {
|
|
|
414
414
|
* @since 2.0.0
|
|
415
415
|
*/
|
|
416
416
|
//#endregion
|
|
417
|
+
//#region ../../privacy-types/dist/index.d.mts
|
|
418
|
+
/**
|
|
419
|
+
* Domain MCP server identifiers (excludes docs, which uses no API scopes).
|
|
420
|
+
* Wire values match {@link https://github.com/transcend-io/tools/pull/790 | SDK OAuth scope centralization}.
|
|
421
|
+
*/
|
|
422
|
+
declare const TranscendMcpServer: {
|
|
423
|
+
readonly Admin: "admin";
|
|
424
|
+
readonly Assessment: "assessment";
|
|
425
|
+
readonly Config: "config";
|
|
426
|
+
readonly Consent: "consent";
|
|
427
|
+
readonly CustomFunctions: "customFunctions";
|
|
428
|
+
readonly Discovery: "discovery";
|
|
429
|
+
readonly Dsr: "dsr";
|
|
430
|
+
readonly Inventory: "inventory";
|
|
431
|
+
readonly Policy: "policy";
|
|
432
|
+
readonly Preferences: "preferences";
|
|
433
|
+
readonly PrivacyCenter: "privacyCenter";
|
|
434
|
+
readonly Workflows: "workflows";
|
|
435
|
+
};
|
|
436
|
+
type TranscendMcpServer = (typeof TranscendMcpServer)[keyof typeof TranscendMcpServer]; //#endregion
|
|
437
|
+
//#region src/objects.d.ts
|
|
438
|
+
/** The purpose of processing data */
|
|
439
|
+
//#endregion
|
|
417
440
|
//#region ../../../node_modules/.pnpm/got@15.0.5/node_modules/got/dist/source/core/timed-out.d.ts
|
|
418
441
|
declare const reentry: unique symbol;
|
|
419
442
|
declare module 'http' {
|
|
@@ -423,9 +446,6 @@ declare module 'http' {
|
|
|
423
446
|
}
|
|
424
447
|
//#endregion
|
|
425
448
|
//#region ../../sdk/dist/index.d.mts
|
|
426
|
-
/**
|
|
427
|
-
* Resources that can be pulled in
|
|
428
|
-
*/
|
|
429
449
|
declare enum TranscendPullResource {
|
|
430
450
|
ApiKeys = "apiKeys",
|
|
431
451
|
Attributes = "customFields",
|
|
@@ -459,33 +479,8 @@ declare enum TranscendPullResource {
|
|
|
459
479
|
PreferenceWorkflowConfigs = "preferenceWorkflowConfigs",
|
|
460
480
|
WorkflowConfigs = "workflowConfigs"
|
|
461
481
|
} //#endregion
|
|
462
|
-
//#region src/transcend-yml/
|
|
463
|
-
/**
|
|
464
|
-
* Mapping between resource type and scopes required for cli
|
|
465
|
-
*/
|
|
466
|
-
//#endregion
|
|
467
|
-
//#region src/mcp/oauthScopes.d.ts
|
|
468
|
-
/**
|
|
469
|
-
* Canonical domain MCP server identifiers (excludes docs, which uses no API scopes).
|
|
470
|
-
* Single source of truth for {@link MCP_SERVER_OAUTH_SCOPES} and {@link TRANSCEND_MCP_SERVER_NPM_PACKAGES}.
|
|
471
|
-
*/
|
|
472
|
-
declare enum TranscendMcpServer {
|
|
473
|
-
Admin = "admin",
|
|
474
|
-
Assessment = "assessment",
|
|
475
|
-
Config = "config",
|
|
476
|
-
Consent = "consent",
|
|
477
|
-
CustomFunctions = "customFunctions",
|
|
478
|
-
Discovery = "discovery",
|
|
479
|
-
Dsr = "dsr",
|
|
480
|
-
Inventory = "inventory",
|
|
481
|
-
Policy = "policy",
|
|
482
|
-
Preferences = "preferences",
|
|
483
|
-
PrivacyCenter = "privacyCenter",
|
|
484
|
-
Workflows = "workflows"
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* OAuth scopes each domain MCP server requests at sign-in (offline_access added by base).
|
|
488
|
-
*/
|
|
482
|
+
//#region src/transcend-yml/checkTranscendYaml.d.ts
|
|
483
|
+
/** Sentinel for running every opt-in rule in `parseTranscendYamlCheckRules` */
|
|
489
484
|
//#endregion
|
|
490
485
|
//#region src/mcp-server-allowlist.d.ts
|
|
491
486
|
declare const TRANSCEND_MCP_SERVERS_ENV = "TRANSCEND_MCP_SERVERS";
|
|
@@ -538,6 +533,7 @@ declare class ToolRegistry {
|
|
|
538
533
|
readOnlyHint: boolean;
|
|
539
534
|
destructiveHint: boolean;
|
|
540
535
|
idempotentHint: boolean;
|
|
536
|
+
openWorldHint?: boolean;
|
|
541
537
|
};
|
|
542
538
|
_meta?: Record<string, unknown>;
|
|
543
539
|
}>;
|