@didit-protocol/mcp-server 5.1.51 → 5.1.53

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.
Files changed (117) hide show
  1. package/README.md +156 -14
  2. package/dist/account-session.d.ts +46 -0
  3. package/dist/account-session.d.ts.map +1 -0
  4. package/dist/account-session.js +262 -0
  5. package/dist/account-session.js.map +1 -0
  6. package/dist/api-key-connection.d.ts +77 -0
  7. package/dist/api-key-connection.d.ts.map +1 -0
  8. package/dist/api-key-connection.js +170 -0
  9. package/dist/api-key-connection.js.map +1 -0
  10. package/dist/app-api-key.d.ts.map +1 -1
  11. package/dist/app-api-key.js +4 -0
  12. package/dist/app-api-key.js.map +1 -1
  13. package/dist/audit-log.d.ts +2 -0
  14. package/dist/audit-log.d.ts.map +1 -1
  15. package/dist/audit-log.js +13 -0
  16. package/dist/audit-log.js.map +1 -1
  17. package/dist/auth/introspection-verifier.d.ts.map +1 -1
  18. package/dist/auth/introspection-verifier.js +10 -0
  19. package/dist/auth/introspection-verifier.js.map +1 -1
  20. package/dist/compress.d.ts +8 -0
  21. package/dist/compress.d.ts.map +1 -0
  22. package/dist/compress.js +90 -0
  23. package/dist/compress.js.map +1 -0
  24. package/dist/config.d.ts +12 -5
  25. package/dist/config.d.ts.map +1 -1
  26. package/dist/config.js +33 -6
  27. package/dist/config.js.map +1 -1
  28. package/dist/device-login.d.ts +5 -0
  29. package/dist/device-login.d.ts.map +1 -1
  30. package/dist/device-login.js +2 -0
  31. package/dist/device-login.js.map +1 -1
  32. package/dist/guidance.d.ts +53 -0
  33. package/dist/guidance.d.ts.map +1 -0
  34. package/dist/guidance.js +183 -0
  35. package/dist/guidance.js.map +1 -0
  36. package/dist/http.d.ts.map +1 -1
  37. package/dist/http.js +43 -5
  38. package/dist/http.js.map +1 -1
  39. package/dist/index.d.ts +33 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +529 -121
  42. package/dist/index.js.map +1 -1
  43. package/dist/internal-tools.d.ts +6 -1
  44. package/dist/internal-tools.d.ts.map +1 -1
  45. package/dist/internal-tools.js +3 -2
  46. package/dist/internal-tools.js.map +1 -1
  47. package/dist/login-cli.d.ts.map +1 -1
  48. package/dist/login-cli.js +8 -0
  49. package/dist/login-cli.js.map +1 -1
  50. package/dist/mcp-modern.d.ts +9 -5
  51. package/dist/mcp-modern.d.ts.map +1 -1
  52. package/dist/mcp-modern.js +31 -8
  53. package/dist/mcp-modern.js.map +1 -1
  54. package/dist/orgapp.d.ts.map +1 -1
  55. package/dist/orgapp.js +14 -1
  56. package/dist/orgapp.js.map +1 -1
  57. package/dist/paging.d.ts +43 -0
  58. package/dist/paging.d.ts.map +1 -0
  59. package/dist/paging.js +98 -0
  60. package/dist/paging.js.map +1 -0
  61. package/dist/permissions.d.ts.map +1 -1
  62. package/dist/permissions.js +1 -0
  63. package/dist/permissions.js.map +1 -1
  64. package/dist/privileged-tools.d.ts +5 -1
  65. package/dist/privileged-tools.d.ts.map +1 -1
  66. package/dist/privileged-tools.js +2 -2
  67. package/dist/privileged-tools.js.map +1 -1
  68. package/dist/tools/auth.d.ts.map +1 -1
  69. package/dist/tools/auth.js +11 -4
  70. package/dist/tools/auth.js.map +1 -1
  71. package/dist/tools/billing.d.ts.map +1 -1
  72. package/dist/tools/billing.js +29 -0
  73. package/dist/tools/billing.js.map +1 -1
  74. package/dist/tools/blocklist.d.ts.map +1 -1
  75. package/dist/tools/blocklist.js +21 -0
  76. package/dist/tools/blocklist.js.map +1 -1
  77. package/dist/tools/cases.d.ts.map +1 -1
  78. package/dist/tools/cases.js +12 -0
  79. package/dist/tools/cases.js.map +1 -1
  80. package/dist/tools/context.d.ts.map +1 -1
  81. package/dist/tools/context.js +16 -0
  82. package/dist/tools/context.js.map +1 -1
  83. package/dist/tools/discovery.d.ts +50 -0
  84. package/dist/tools/discovery.d.ts.map +1 -0
  85. package/dist/tools/discovery.js +522 -0
  86. package/dist/tools/discovery.js.map +1 -0
  87. package/dist/tools/docs.d.ts +10 -0
  88. package/dist/tools/docs.d.ts.map +1 -0
  89. package/dist/tools/docs.js +137 -0
  90. package/dist/tools/docs.js.map +1 -0
  91. package/dist/tools/investigator.d.ts.map +1 -1
  92. package/dist/tools/investigator.js +4 -3
  93. package/dist/tools/investigator.js.map +1 -1
  94. package/dist/tools/questionnaires.d.ts +2 -1
  95. package/dist/tools/questionnaires.d.ts.map +1 -1
  96. package/dist/tools/questionnaires.js +3 -2
  97. package/dist/tools/questionnaires.js.map +1 -1
  98. package/dist/tools/search.d.ts +3 -1
  99. package/dist/tools/search.d.ts.map +1 -1
  100. package/dist/tools/search.js +20 -6
  101. package/dist/tools/search.js.map +1 -1
  102. package/dist/tools/sessions.d.ts +2 -1
  103. package/dist/tools/sessions.d.ts.map +1 -1
  104. package/dist/tools/sessions.js +3 -2
  105. package/dist/tools/sessions.js.map +1 -1
  106. package/dist/tools/settings.d.ts +4 -0
  107. package/dist/tools/settings.d.ts.map +1 -1
  108. package/dist/tools/settings.js +7 -0
  109. package/dist/tools/settings.js.map +1 -1
  110. package/dist/tools/transactions.d.ts.map +1 -1
  111. package/dist/tools/transactions.js +21 -0
  112. package/dist/tools/transactions.js.map +1 -1
  113. package/dist/toolsets.d.ts +87 -0
  114. package/dist/toolsets.d.ts.map +1 -0
  115. package/dist/toolsets.js +345 -0
  116. package/dist/toolsets.js.map +1 -0
  117. package/package.json +8 -3
@@ -1,4 +1,8 @@
1
+ import { type WholeList } from "../paging";
2
+ /** One page of the application's workflows (20 unless `limit` says otherwise), most recently changed first. */
1
3
  export declare function listWorkflows(params?: Record<string, any>): Promise<any>;
4
+ /** Every workflow of the application, for the lookups that must not miss one (paging.ts). */
5
+ export declare function listEveryWorkflow(): Promise<WholeList>;
2
6
  export declare function getWorkflow(uuid: string): Promise<any>;
3
7
  /**
4
8
  * Create a simple (linear) workflow from an ordered `features` list.
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/tools/settings.ts"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AAC,GAAG,CAAC,CAQ1F;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAmB/D"}
@@ -1,19 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.listWorkflows = listWorkflows;
4
+ exports.listEveryWorkflow = listEveryWorkflow;
4
5
  exports.getWorkflow = getWorkflow;
5
6
  exports.createWorkflow = createWorkflow;
6
7
  exports.updateWorkflow = updateWorkflow;
7
8
  exports.deleteWorkflow = deleteWorkflow;
9
+ const paging_1 = require("../paging");
8
10
  const config_1 = require("../config");
9
11
  const security_1 = require("../security");
10
12
  const feature_config_1 = require("./feature-config");
11
13
  // Workflows are the console's "verification-settings" resource, scoped per org+app.
12
14
  // org/application are resolved from the tool arguments (organization_id/application_id)
13
15
  // via the request context — see orgAppPath / the CallTool dispatch in index.ts.
16
+ /** One page of the application's workflows (20 unless `limit` says otherwise), most recently changed first. */
14
17
  async function listWorkflows(params) {
15
18
  return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/verification-settings/"), { params });
16
19
  }
20
+ /** Every workflow of the application, for the lookups that must not miss one (paging.ts). */
21
+ async function listEveryWorkflow() {
22
+ return (0, paging_1.everyPage)((page) => listWorkflows(page));
23
+ }
17
24
  async function getWorkflow(uuid) {
18
25
  return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/verification-settings/${(0, security_1.pathSegment)(uuid, "workflow_id")}/`));
19
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/tools/settings.ts"],"names":[],"mappings":";;AAaA,sCAEC;AAED,kCAEC;AAgBD,wCAuGC;AAED,wCAQC;AAED,wCAmBC;AAzKD,sCAAmD;AACnD,0CAA0C;AAC1C,qDAK0B;AAE1B,oFAAoF;AACpF,wFAAwF;AACxF,gFAAgF;AAEzE,KAAK,UAAU,aAAa,CAAC,MAA4B;IAC9D,OAAO,IAAA,mBAAU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+BAA+B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAG7F"}
@@ -84,10 +84,31 @@ async function backtestTransactionRule(data) {
84
84
  async function listTransactionRuleLibrary(params) {
85
85
  return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/library/"), { params });
86
86
  }
87
+ /**
88
+ * Install and uninstall act on a selection of presets: specific library_keys, a bundle, or both.
89
+ * The two input schemas used to say "one of the two" with a top-level `anyOf`, which nothing
90
+ * enforced (the low-level MCP server does not validate arguments) and which the Claude API
91
+ * refuses for the whole tool list. It is said in the descriptions and enforced here instead,
92
+ * before anything is sent.
93
+ */
94
+ function requirePresetSelector(data, verb) {
95
+ const hasKeys = Array.isArray(data?.library_keys) && data.library_keys.length > 0;
96
+ const hasBundle = typeof data?.bundle === "string" && data.bundle.trim() !== "";
97
+ if (hasKeys || hasBundle)
98
+ return;
99
+ throw new security_1.DiditError({
100
+ code: "bad_request",
101
+ message: `Say which preset rules to ${verb}: pass library_keys, bundle or both.`,
102
+ field: "library_keys",
103
+ hint: "didit_transaction_rule_library_list returns every preset with its library_key and its bundle.",
104
+ });
105
+ }
87
106
  async function installTransactionRuleLibrary(data) {
107
+ requirePresetSelector(data, "install");
88
108
  return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/install/"), { method: "POST", json: data });
89
109
  }
90
110
  async function uninstallTransactionRuleLibrary(data) {
111
+ requirePresetSelector(data, "uninstall");
91
112
  return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/install/"), { method: "DELETE", json: data });
92
113
  }
93
114
  //# sourceMappingURL=transactions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/tools/transactions.ts"],"names":[],"mappings":";;AAKA,4CAEC;AAED,8CAEC;AAED,wCAEC;AAED,oCAEC;AAgCD,oDAEC;AAED,gDAEC;AAED,sDAGC;AAED,sDAMC;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AAY,CAAC,MAAM,GAAG,CAAC,CAAC;IAClF,MAAM,SAAS,GAAG,OAAO,IAAI,EAAE,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;IAChF,IAAI,OAAO,IAAI,SAAS;QAAE,OAAO;IACjC,MAAM,IAAI,qBAAU,CAAC;QACnB,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,6BAA6B,IAAI,sCAAsC;QAChF,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,+FAA+F;KACtG,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,6BAA6B,CAAC,IAAyB;IAC3E,qBAAqB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,8BAA8B,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAChG,CAAC;AAEM,KAAK,UAAU,+BAA+B,CAAC,IAAyB;IAC7E,qBAAqB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACzC,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,8BAA8B,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAClG,CAAC"}
@@ -0,0 +1,87 @@
1
+ export interface Toolset {
2
+ /** Stable id: what a person types in `?toolsets=`. Lowercase, no spaces. */
3
+ id: string;
4
+ /** One line for people and models choosing what to load. */
5
+ description: string;
6
+ /** Tool-name prefixes (after `didit_`), each with the label a connector UI groups it under. */
7
+ groups: readonly (readonly [prefix: string, label: string])[];
8
+ }
9
+ /** The short catalog: the tools most work starts from (see CORE_TOOLS). */
10
+ export declare const CORE_TOOLSET = "core";
11
+ /** Every tool the caller may use. */
12
+ export declare const ALL_TOOLSETS = "all";
13
+ /** What a connection loads when neither it nor the deployment names anything. */
14
+ export declare const DEFAULT_TOOLSETS = "all";
15
+ /**
16
+ * The server's default selection: MCP_DEFAULT_TOOLSETS (a comma-separated list of toolset ids,
17
+ * or `all`), else everything. Read per request, so a deployment changes it without a rebuild.
18
+ * `core` there makes the short catalog what every connection gets unless it asks for more.
19
+ */
20
+ export declare function defaultToolsets(env?: Record<string, string | undefined>): string;
21
+ /** Every toolset this build serves, in the order a listing shows them. */
22
+ export declare const TOOLSETS: readonly Toolset[];
23
+ /** The ids a person may ask for. The staff toolset is not one of them: it follows the caller. */
24
+ export declare const SELECTABLE_TOOLSET_IDS: readonly string[];
25
+ /** The toolset a tool belongs to, or undefined for a name no toolset claims. */
26
+ export declare function toolsetOf(name: string): string | undefined;
27
+ /** The label a connector UI groups the tool under (`_meta["anthropic/toolGroup"]`). */
28
+ export declare function toolGroupOf(name: string): string;
29
+ /**
30
+ * The `core` catalog: the tools most conversations start from, picked across toolsets.
31
+ *
32
+ * It began from production telemetry of the console assistant (2026-08-07 to 2026-09-06), where
33
+ * a list of about 45 tools carried roughly 94% of calls, and was cut further: of each
34
+ * list/search pair only the search stays (it is the superset), building and editing workflows
35
+ * lives in the `workflows` toolset (the definitions of those tools are several times larger
36
+ * than this whole list), and the developer loop is covered end to end (create a session,
37
+ * simulate its outcome in the sandbox, read its webhook deliveries, manage webhooks and the
38
+ * API key).
39
+ *
40
+ * Keep it under 30 hosted tools. Every addition is paid by every conversation that chose the
41
+ * short catalog, and anything left out is still one search away. Revisit it with fresh
42
+ * `mcp.tool_call` audit data.
43
+ */
44
+ export declare const CORE_TOOLS: ReadonlySet<string>;
45
+ /** What one connection asked to load. */
46
+ export interface CatalogSelection {
47
+ /** Toolset ids to list (`core` included when selected), or "all". */
48
+ toolsets: ReadonlySet<string> | typeof ALL_TOOLSETS;
49
+ /** List read-only tools only, and refuse every other call. */
50
+ readOnly: boolean;
51
+ /** Ids the caller named that do not exist. Reported back, never an error. */
52
+ unknown: readonly string[];
53
+ }
54
+ /** No narrowing at all: what `createServer()` serves when the caller passes no selection. */
55
+ export declare const FULL_SELECTION: CatalogSelection;
56
+ /** "1", "true", "yes" and "on" (any case) switch a flag on; anything else leaves it off. */
57
+ export declare function parseFlag(value: unknown): boolean;
58
+ /**
59
+ * Turn what a connection asked for into a selection.
60
+ *
61
+ * `requested` is the raw `toolsets` value (comma or space separated); undefined or empty means
62
+ * the default. `fallback` is the server's default selection in the same syntax (see
63
+ * defaultToolsets). Unknown ids are dropped and reported in `unknown`: refusing the connection
64
+ * instead would show up in most clients as "cannot connect", with the reason nowhere the person
65
+ * can read it. A request that names nothing valid falls back to the default rather than to an
66
+ * empty catalog.
67
+ */
68
+ export declare function parseSelection(requested: string | null | undefined, readOnly: unknown, fallback?: string): CatalogSelection;
69
+ /** Whether the selection lists this tool. Staff tools ride along for staff callers. */
70
+ export declare function selectionLists(selection: CatalogSelection, name: string): boolean;
71
+ /** The selection as a person would type it: `core,transactions` or `all`. */
72
+ export declare function selectionLabel(selection: CatalogSelection): string;
73
+ /**
74
+ * The selection of a local (stdio) server: `--toolsets=a,b` (or `--toolsets a,b`) and
75
+ * `--read-only` on the command line, else DIDIT_TOOLSETS and DIDIT_READ_ONLY, else everything.
76
+ */
77
+ export declare function selectionFromArgv(argv: readonly string[], env?: Record<string, string | undefined>): CatalogSelection;
78
+ type HeaderValue = string | string[] | undefined;
79
+ /**
80
+ * The selection of a hosted request: the `toolsets` and `read_only` query parameters of the
81
+ * server URL, else the `X-MCP-Toolsets` and `X-MCP-Readonly` headers (for clients that can set
82
+ * a header but not edit the URL), else the server default. Read-only is on when either says so:
83
+ * a safety switch is never overridden by the other source.
84
+ */
85
+ export declare function selectionFromRequest(query: Record<string, unknown>, headers: Record<string, HeaderValue>, fallback: string): CatalogSelection;
86
+ export {};
87
+ //# sourceMappingURL=toolsets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../src/toolsets.ts"],"names":[],"mappings":"AAiCA,MAAM,WAAW,OAAO;I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,KAAK,EAAE,OAAO,GAAG,OAAO,CAKjD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,QAAQ,EAAE,OAAO,EACjB,QAAQ,GAAE,MAAyB,GAClC,gBAAgB,CA8BlB;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOjF;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CASlE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,gBAAgB,CAWlI;AAED,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAQjD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACpC,QAAQ,EAAE,MAAM,GACf,gBAAgB,CAMlB"}
@@ -0,0 +1,345 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FULL_SELECTION = exports.CORE_TOOLS = exports.SELECTABLE_TOOLSET_IDS = exports.TOOLSETS = exports.DEFAULT_TOOLSETS = exports.ALL_TOOLSETS = exports.CORE_TOOLSET = void 0;
4
+ exports.defaultToolsets = defaultToolsets;
5
+ exports.toolsetOf = toolsetOf;
6
+ exports.toolGroupOf = toolGroupOf;
7
+ exports.parseFlag = parseFlag;
8
+ exports.parseSelection = parseSelection;
9
+ exports.selectionLists = selectionLists;
10
+ exports.selectionLabel = selectionLabel;
11
+ exports.selectionFromArgv = selectionFromArgv;
12
+ exports.selectionFromRequest = selectionFromRequest;
13
+ /**
14
+ * Toolsets: which part of the tool catalog a connection loads.
15
+ *
16
+ * The whole catalog is more than 200 tools and tens of thousands of tokens of definitions. A
17
+ * client sends all of that to the model with every request, and some clients cap how many tools
18
+ * they accept. A short catalog trades those tokens for one search step. Measured (the
19
+ * tool-selection eval): a model does not pick worse from the long list, it picks a little
20
+ * better, at about ten times the tokens. So a connection can name what it wants instead:
21
+ *
22
+ * hosted https://mcp.didit.me/mcp?toolsets=core,transactions&read_only=true
23
+ * (or the `X-MCP-Toolsets` / `X-MCP-Readonly` headers)
24
+ * stdio --toolsets=core,transactions --read-only
25
+ * (or DIDIT_TOOLSETS / DIDIT_READ_ONLY)
26
+ *
27
+ * `core` is a short list of the tools most work starts from; `all` is everything. A connection
28
+ * that names nothing gets the server default, which is `all`: nothing changes for a client
29
+ * that never heard of toolsets. A deployment may set another default (MCP_DEFAULT_TOOLSETS).
30
+ * Whatever a connection does not load stays reachable through the discovery tools
31
+ * (tools/discovery.ts), so a smaller catalog never removes a capability.
32
+ *
33
+ * Two different things, on purpose:
34
+ *
35
+ * - a TOOLSET is a context budget. It decides what tools/list returns. It is not access
36
+ * control: a tool outside the selection still runs when called by name, exactly as before.
37
+ * - READ-ONLY is a safety boundary. It is enforced on every call, whatever the client lists.
38
+ *
39
+ * Membership is by tool-name prefix (`didit_<domain>_<action>`), the same convention that
40
+ * groups the tools in a connector's permission screen, so a new tool lands in its toolset
41
+ * without touching this file. A tool whose name matches no prefix fails the catalog test.
42
+ */
43
+ const internal_tools_1 = require("./internal-tools");
44
+ const privileged_tools_1 = require("./privileged-tools");
45
+ /** The short catalog: the tools most work starts from (see CORE_TOOLS). */
46
+ exports.CORE_TOOLSET = "core";
47
+ /** Every tool the caller may use. */
48
+ exports.ALL_TOOLSETS = "all";
49
+ /** What a connection loads when neither it nor the deployment names anything. */
50
+ exports.DEFAULT_TOOLSETS = exports.ALL_TOOLSETS;
51
+ /** Alias for whatever the server's default selection is. */
52
+ const DEFAULT_ALIAS = "default";
53
+ /**
54
+ * The server's default selection: MCP_DEFAULT_TOOLSETS (a comma-separated list of toolset ids,
55
+ * or `all`), else everything. Read per request, so a deployment changes it without a rebuild.
56
+ * `core` there makes the short catalog what every connection gets unless it asks for more.
57
+ */
58
+ function defaultToolsets(env = process.env) {
59
+ return env.MCP_DEFAULT_TOOLSETS?.trim() || exports.DEFAULT_TOOLSETS;
60
+ }
61
+ const PUBLIC_TOOLSETS = [
62
+ {
63
+ id: "account",
64
+ description: "Organizations, applications, API keys, members and roles.",
65
+ groups: [
66
+ ["account_", "Account Setup"],
67
+ ["context_", "Account & Org"],
68
+ ["org_", "Account & Org"],
69
+ ],
70
+ },
71
+ {
72
+ id: "billing",
73
+ description: "Plan, credit balance, payment methods, receipts and billing details.",
74
+ groups: [["billing_", "Billing"]],
75
+ },
76
+ {
77
+ id: "sessions",
78
+ description: "Verification sessions: create, find, decide, review, share, import, PDFs and webhook deliveries.",
79
+ groups: [["session_", "Sessions"]],
80
+ },
81
+ {
82
+ id: "workflows",
83
+ description: "Verification workflows and questionnaires: build, edit, validate and publish.",
84
+ groups: [
85
+ ["workflow_", "Workflows & Questionnaires"],
86
+ ["questionnaire_", "Workflows & Questionnaires"],
87
+ ],
88
+ },
89
+ {
90
+ id: "lists",
91
+ description: "Custom lists, the blocklist and the allowlist.",
92
+ groups: [
93
+ ["lists_", "Lists & Blocklist"],
94
+ ["blocklist_", "Lists & Blocklist"],
95
+ ["allowlist_", "Lists & Blocklist"],
96
+ ],
97
+ },
98
+ {
99
+ id: "vendors",
100
+ description: "The people and companies you verify: vendor users and vendor businesses.",
101
+ groups: [["vendor_", "Vendor Users & Businesses"]],
102
+ },
103
+ {
104
+ id: "transactions",
105
+ description: "Transaction monitoring: transactions, wallet screening and rules with backtesting.",
106
+ groups: [["transaction_", "Transactions (AML)"]],
107
+ },
108
+ {
109
+ id: "cases",
110
+ description: "Case management: create, assign, escalate and resolve cases.",
111
+ groups: [["case_", "Cases"]],
112
+ },
113
+ {
114
+ id: "investigator",
115
+ description: "The AI Investigator: its review queue, reports, decisions, policy questions and performance.",
116
+ groups: [["investigator_", "Investigator"]],
117
+ },
118
+ {
119
+ id: "webhooks",
120
+ description: "Webhook destinations and alerts.",
121
+ groups: [
122
+ ["webhook_", "Webhooks & Alerts"],
123
+ ["alert_", "Webhooks & Alerts"],
124
+ ],
125
+ },
126
+ {
127
+ id: "reports",
128
+ description: "Analytics, exports and the audit log.",
129
+ groups: [
130
+ ["report_", "Reports & Audit"],
131
+ ["audit_", "Reports & Audit"],
132
+ ["analytics", "Reports & Audit"],
133
+ ],
134
+ },
135
+ {
136
+ id: "branding",
137
+ description: "White-label branding of the verification flow.",
138
+ groups: [["branding_", "Branding"]],
139
+ },
140
+ {
141
+ id: "verification",
142
+ description: "Standalone verification APIs: ID document, face, AML, proof of address, phone, email, database and business checks.",
143
+ groups: [["verify_", "Verification APIs"]],
144
+ },
145
+ {
146
+ id: "docs",
147
+ description: "Search the Didit documentation.",
148
+ groups: [["docs_", "Documentation"]],
149
+ },
150
+ ];
151
+ /** Every toolset this build serves, in the order a listing shows them. */
152
+ exports.TOOLSETS = [
153
+ ...PUBLIC_TOOLSETS,
154
+ ...internal_tools_1.INTERNAL_TOOLSETS,
155
+ ...(privileged_tools_1.PRIVILEGED_TOOLSET ? [privileged_tools_1.PRIVILEGED_TOOLSET] : []),
156
+ ];
157
+ const TOOLSET_IDS = new Set(exports.TOOLSETS.map((toolset) => toolset.id));
158
+ /** The ids a person may ask for. The staff toolset is not one of them: it follows the caller. */
159
+ exports.SELECTABLE_TOOLSET_IDS = exports.TOOLSETS.map((toolset) => toolset.id).filter((id) => id !== privileged_tools_1.PRIVILEGED_TOOLSET?.id);
160
+ /** `[prefix, toolset, group label]`, longest prefix first so a longer prefix always wins. */
161
+ const PREFIX_INDEX = exports.TOOLSETS.flatMap((toolset) => toolset.groups.map(([prefix, label]) => [prefix, toolset, label])).sort((a, b) => b[0].length - a[0].length);
162
+ function match(name) {
163
+ const rest = name.replace(/^didit_/, "");
164
+ return PREFIX_INDEX.find(([prefix]) => rest.startsWith(prefix));
165
+ }
166
+ /** The toolset a tool belongs to, or undefined for a name no toolset claims. */
167
+ function toolsetOf(name) {
168
+ return match(name)?.[1].id;
169
+ }
170
+ /** The label a connector UI groups the tool under (`_meta["anthropic/toolGroup"]`). */
171
+ function toolGroupOf(name) {
172
+ // The discovery tools (tools/discovery.ts) belong to no toolset: they stand in for the rest.
173
+ if (name.startsWith("didit_tool_"))
174
+ return "Tool Discovery";
175
+ return match(name)?.[2] ?? "Other";
176
+ }
177
+ /**
178
+ * The `core` catalog: the tools most conversations start from, picked across toolsets.
179
+ *
180
+ * It began from production telemetry of the console assistant (2026-08-07 to 2026-09-06), where
181
+ * a list of about 45 tools carried roughly 94% of calls, and was cut further: of each
182
+ * list/search pair only the search stays (it is the superset), building and editing workflows
183
+ * lives in the `workflows` toolset (the definitions of those tools are several times larger
184
+ * than this whole list), and the developer loop is covered end to end (create a session,
185
+ * simulate its outcome in the sandbox, read its webhook deliveries, manage webhooks and the
186
+ * API key).
187
+ *
188
+ * Keep it under 30 hosted tools. Every addition is paid by every conversation that chose the
189
+ * short catalog, and anything left out is still one search away. Revisit it with fresh
190
+ * `mcp.tool_call` audit data.
191
+ */
192
+ exports.CORE_TOOLS = new Set([
193
+ // Where everything starts: the caller's organizations and applications.
194
+ "didit_context_get",
195
+ "didit_docs_search",
196
+ // Signing in. Local (stdio) servers only; a hosted server authenticates with OAuth.
197
+ "didit_account_device_login_start",
198
+ "didit_account_device_login_poll",
199
+ "didit_account_register",
200
+ "didit_account_verify_email",
201
+ "didit_account_resend_otp",
202
+ "didit_account_login",
203
+ "didit_account_verify_2fa",
204
+ // Sessions
205
+ "didit_session_create",
206
+ "didit_session_search",
207
+ "didit_session_get_decision",
208
+ "didit_session_explain_decision",
209
+ "didit_session_update_status",
210
+ "didit_session_simulate",
211
+ "didit_session_webhooks",
212
+ // Workflows
213
+ "didit_workflow_search",
214
+ "didit_workflow_get",
215
+ // Numbers
216
+ "didit_analytics",
217
+ "didit_org_get_balance",
218
+ // Integration: the application, its API key and its webhooks
219
+ "didit_org_get_application",
220
+ "didit_org_list_api_keys",
221
+ "didit_org_create_api_key",
222
+ "didit_webhook_list",
223
+ "didit_webhook_create",
224
+ "didit_webhook_update",
225
+ // Finding records across applications
226
+ "didit_case_search",
227
+ "didit_case_get",
228
+ "didit_vendor_user_search",
229
+ "didit_vendor_business_search",
230
+ "didit_transaction_search",
231
+ "didit_transaction_get",
232
+ ]);
233
+ /** Listed on every connection, whatever it selects: nothing works before the ids it returns. */
234
+ const ALWAYS_LISTED = new Set(["didit_context_get"]);
235
+ /** No narrowing at all: what `createServer()` serves when the caller passes no selection. */
236
+ exports.FULL_SELECTION = { toolsets: exports.ALL_TOOLSETS, readOnly: false, unknown: [] };
237
+ function splitIds(value) {
238
+ return value
239
+ .split(/[\s,]+/)
240
+ .map((id) => id.trim().toLowerCase().replace(/-/g, "_"))
241
+ .filter(Boolean);
242
+ }
243
+ /** "1", "true", "yes" and "on" (any case) switch a flag on; anything else leaves it off. */
244
+ function parseFlag(value) {
245
+ if (value === true)
246
+ return true;
247
+ if (typeof value !== "string")
248
+ return false;
249
+ return ["1", "true", "yes", "on"].includes(value.trim().toLowerCase());
250
+ }
251
+ /**
252
+ * Turn what a connection asked for into a selection.
253
+ *
254
+ * `requested` is the raw `toolsets` value (comma or space separated); undefined or empty means
255
+ * the default. `fallback` is the server's default selection in the same syntax (see
256
+ * defaultToolsets). Unknown ids are dropped and reported in `unknown`: refusing the connection
257
+ * instead would show up in most clients as "cannot connect", with the reason nowhere the person
258
+ * can read it. A request that names nothing valid falls back to the default rather than to an
259
+ * empty catalog.
260
+ */
261
+ function parseSelection(requested, readOnly, fallback = exports.DEFAULT_TOOLSETS) {
262
+ const expand = (ids) => {
263
+ const result = { ids: new Set(), all: false, unknown: [] };
264
+ for (const id of ids) {
265
+ if (id === exports.ALL_TOOLSETS)
266
+ result.all = true;
267
+ else if (id === exports.CORE_TOOLSET || TOOLSET_IDS.has(id))
268
+ result.ids.add(id);
269
+ else
270
+ result.unknown.push(id);
271
+ }
272
+ return result;
273
+ };
274
+ // The default itself may not name `default`; an operator typo there falls back to everything.
275
+ const base = expand(splitIds(fallback).filter((id) => id !== DEFAULT_ALIAS));
276
+ const baseIds = base.all || base.ids.size > 0 ? base : expand([exports.DEFAULT_TOOLSETS]);
277
+ const asked = splitIds(requested ?? "");
278
+ const wantsDefault = asked.includes(DEFAULT_ALIAS);
279
+ const named = expand(asked.filter((id) => id !== DEFAULT_ALIAS));
280
+ const nothingValid = !named.all && named.ids.size === 0 && !wantsDefault;
281
+ const useBase = wantsDefault || nothingValid;
282
+ const all = named.all || (useBase && baseIds.all);
283
+ const ids = new Set([...named.ids, ...(useBase ? baseIds.ids : [])]);
284
+ return {
285
+ toolsets: all ? exports.ALL_TOOLSETS : ids,
286
+ readOnly: parseFlag(readOnly),
287
+ unknown: named.unknown,
288
+ };
289
+ }
290
+ /** Whether the selection lists this tool. Staff tools ride along for staff callers. */
291
+ function selectionLists(selection, name) {
292
+ if (selection.toolsets === exports.ALL_TOOLSETS || ALWAYS_LISTED.has(name))
293
+ return true;
294
+ if (selection.toolsets.has(exports.CORE_TOOLSET) && exports.CORE_TOOLS.has(name))
295
+ return true;
296
+ const toolset = toolsetOf(name);
297
+ if (!toolset)
298
+ return false;
299
+ return selection.toolsets.has(toolset) || toolset === privileged_tools_1.PRIVILEGED_TOOLSET?.id;
300
+ }
301
+ /** The selection as a person would type it: `core,transactions` or `all`. */
302
+ function selectionLabel(selection) {
303
+ if (selection.toolsets === exports.ALL_TOOLSETS)
304
+ return exports.ALL_TOOLSETS;
305
+ const ids = selection.toolsets;
306
+ const ordered = [
307
+ ...(ids.has(exports.CORE_TOOLSET) ? [exports.CORE_TOOLSET] : []),
308
+ ...exports.TOOLSETS.map((toolset) => toolset.id).filter((id) => ids.has(id)),
309
+ ];
310
+ return ordered.join(",");
311
+ }
312
+ /**
313
+ * The selection of a local (stdio) server: `--toolsets=a,b` (or `--toolsets a,b`) and
314
+ * `--read-only` on the command line, else DIDIT_TOOLSETS and DIDIT_READ_ONLY, else everything.
315
+ */
316
+ function selectionFromArgv(argv, env = process.env) {
317
+ let toolsets;
318
+ let readOnly = false;
319
+ for (let index = 0; index < argv.length; index++) {
320
+ const arg = argv[index];
321
+ if (arg === "--read-only" || arg === "--readonly")
322
+ readOnly = true;
323
+ else if (arg.startsWith("--toolsets="))
324
+ toolsets = arg.slice("--toolsets=".length);
325
+ else if (arg === "--toolsets" && argv[index + 1] !== undefined)
326
+ toolsets = argv[++index];
327
+ }
328
+ return parseSelection(toolsets ?? env.DIDIT_TOOLSETS, readOnly || parseFlag(env.DIDIT_READ_ONLY));
329
+ }
330
+ function first(value) {
331
+ const item = Array.isArray(value) ? value[0] : value;
332
+ return typeof item === "string" ? item : undefined;
333
+ }
334
+ /**
335
+ * The selection of a hosted request: the `toolsets` and `read_only` query parameters of the
336
+ * server URL, else the `X-MCP-Toolsets` and `X-MCP-Readonly` headers (for clients that can set
337
+ * a header but not edit the URL), else the server default. Read-only is on when either says so:
338
+ * a safety switch is never overridden by the other source.
339
+ */
340
+ function selectionFromRequest(query, headers, fallback) {
341
+ const toolsets = first(query.toolsets) ?? first(headers["x-mcp-toolsets"]);
342
+ const readOnly = parseFlag(first(query.read_only)) || parseFlag(first(query.readonly)) || parseFlag(first(headers["x-mcp-readonly"]));
343
+ return parseSelection(toolsets, readOnly, fallback);
344
+ }
345
+ //# sourceMappingURL=toolsets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolsets.js","sourceRoot":"","sources":["../src/toolsets.ts"],"names":[],"mappings":";;;AAwDA,0CAEC;AAwHD,8BAEC;AAGD,kCAKC;AAmFD,8BAKC;AAYD,wCAkCC;AAGD,wCAOC;AAGD,wCASC;AAMD,8CAWC;AAgBD,oDAUC;AAnYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qDA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AC,CAAC;IAEvH,OAAO,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didit-protocol/mcp-server",
3
- "version": "5.1.51",
3
+ "version": "5.1.53",
4
4
  "description": "Didit MCP Server - AI agent integration for identity verification APIs",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -18,7 +18,8 @@
18
18
  "dev": "ts-node src/index.ts",
19
19
  "dev:http": "ts-node src/http.ts",
20
20
  "schema:readme": "node scripts/update-readme-schema.mjs",
21
- "schema:check": "node scripts/update-readme-schema.mjs --check"
21
+ "schema:check": "node scripts/update-readme-schema.mjs --check",
22
+ "catalog:export": "node scripts/export-tool-catalog.mjs"
22
23
  },
23
24
  "keywords": [
24
25
  "didit",
@@ -32,12 +33,16 @@
32
33
  "license": "MIT",
33
34
  "dependencies": {
34
35
  "@modelcontextprotocol/sdk": "1.32.1",
36
+ "compression": "^1.8.2",
35
37
  "express": "^5.0.0",
36
- "jose": "^6.0.0"
38
+ "jose": "^6.0.0",
39
+ "on-headers": "^1.1.0"
37
40
  },
38
41
  "devDependencies": {
42
+ "@types/compression": "^1.8.1",
39
43
  "@types/express": "^5.0.0",
40
44
  "@types/node": "^20.0.0",
45
+ "@types/on-headers": "^1.0.4",
41
46
  "ts-node": "^10.9.0",
42
47
  "typescript": "^5.3.0"
43
48
  },