@ganintegrity/mcp 1.0.0 → 1.1.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.
Files changed (80) hide show
  1. package/README.md +186 -60
  2. package/dist/core/als.d.ts.map +1 -0
  3. package/dist/core/als.js.map +1 -0
  4. package/dist/core/auth/auth.types.d.ts.map +1 -0
  5. package/dist/{auth → core/auth}/auth.types.js.map +1 -1
  6. package/dist/core/auth/index.d.ts +33 -0
  7. package/dist/core/auth/index.d.ts.map +1 -0
  8. package/dist/core/auth/index.js +57 -0
  9. package/dist/core/auth/index.js.map +1 -0
  10. package/dist/core/define.d.ts +64 -0
  11. package/dist/core/define.d.ts.map +1 -0
  12. package/dist/core/define.js +48 -0
  13. package/dist/core/define.js.map +1 -0
  14. package/dist/core/dispatch.d.ts +34 -0
  15. package/dist/core/dispatch.d.ts.map +1 -0
  16. package/dist/core/dispatch.js +57 -0
  17. package/dist/core/dispatch.js.map +1 -0
  18. package/dist/core/errors/errors.types.d.ts.map +1 -0
  19. package/dist/core/errors/errors.types.js.map +1 -0
  20. package/dist/core/errors/index.d.ts.map +1 -0
  21. package/dist/core/errors/index.js.map +1 -0
  22. package/dist/core/test-helpers.d.ts +20 -0
  23. package/dist/core/test-helpers.d.ts.map +1 -0
  24. package/dist/core/test-helpers.js +38 -0
  25. package/dist/core/test-helpers.js.map +1 -0
  26. package/dist/core/tool/index.d.ts +19 -0
  27. package/dist/core/tool/index.d.ts.map +1 -0
  28. package/dist/{tool → core/tool}/index.js +28 -25
  29. package/dist/core/tool/index.js.map +1 -0
  30. package/dist/{tool → core/tool}/tool.types.d.ts +21 -0
  31. package/dist/core/tool/tool.types.d.ts.map +1 -0
  32. package/dist/{tool → core/tool}/tool.types.js.map +1 -1
  33. package/dist/{auth/index.d.ts → express/auth.d.ts} +4 -5
  34. package/dist/express/auth.d.ts.map +1 -0
  35. package/dist/express/auth.js +47 -0
  36. package/dist/express/auth.js.map +1 -0
  37. package/dist/express/express.types.d.ts +35 -0
  38. package/dist/express/express.types.d.ts.map +1 -0
  39. package/dist/express/express.types.js +2 -0
  40. package/dist/express/express.types.js.map +1 -0
  41. package/dist/express/index.d.ts +32 -0
  42. package/dist/express/index.d.ts.map +1 -0
  43. package/dist/express/index.js +50 -0
  44. package/dist/express/index.js.map +1 -0
  45. package/dist/index.d.ts +13 -18
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +8 -4
  48. package/dist/index.js.map +1 -1
  49. package/package.json +5 -1
  50. package/dist/als.d.ts.map +0 -1
  51. package/dist/als.js.map +0 -1
  52. package/dist/auth/auth.types.d.ts.map +0 -1
  53. package/dist/auth/index.d.ts.map +0 -1
  54. package/dist/auth/index.js +0 -74
  55. package/dist/auth/index.js.map +0 -1
  56. package/dist/errors/errors.types.d.ts.map +0 -1
  57. package/dist/errors/errors.types.js.map +0 -1
  58. package/dist/errors/index.d.ts.map +0 -1
  59. package/dist/errors/index.js.map +0 -1
  60. package/dist/server/index.d.ts +0 -18
  61. package/dist/server/index.d.ts.map +0 -1
  62. package/dist/server/index.js +0 -130
  63. package/dist/server/index.js.map +0 -1
  64. package/dist/server/server.types.d.ts +0 -78
  65. package/dist/server/server.types.d.ts.map +0 -1
  66. package/dist/server/server.types.js +0 -2
  67. package/dist/server/server.types.js.map +0 -1
  68. package/dist/tool/index.d.ts +0 -26
  69. package/dist/tool/index.d.ts.map +0 -1
  70. package/dist/tool/index.js.map +0 -1
  71. package/dist/tool/tool.types.d.ts.map +0 -1
  72. /package/dist/{als.d.ts → core/als.d.ts} +0 -0
  73. /package/dist/{als.js → core/als.js} +0 -0
  74. /package/dist/{auth → core/auth}/auth.types.d.ts +0 -0
  75. /package/dist/{auth → core/auth}/auth.types.js +0 -0
  76. /package/dist/{errors → core/errors}/errors.types.d.ts +0 -0
  77. /package/dist/{errors → core/errors}/errors.types.js +0 -0
  78. /package/dist/{errors → core/errors}/index.d.ts +0 -0
  79. /package/dist/{errors → core/errors}/index.js +0 -0
  80. /package/dist/{tool → core/tool}/tool.types.js +0 -0
@@ -1,74 +0,0 @@
1
- const BEARER_PREFIX = /^Bearer\s+/i;
2
- function extractBearer(req) {
3
- const auth = req.headers["authorization"];
4
- if (typeof auth === "string" && BEARER_PREFIX.test(auth)) {
5
- return auth.replace(BEARER_PREFIX, "").trim();
6
- }
7
- // Parity fallback: REST accepts X-Access-Token. Same middleware shape.
8
- const xat = req.headers["x-access-token"];
9
- if (typeof xat === "string" && xat && xat !== "null" && xat !== "undefined") {
10
- return xat;
11
- }
12
- return undefined;
13
- }
14
- function applyAuthToRequest(req, user, token) {
15
- req.user = user;
16
- req.headers.company = user.companySubdomainName;
17
- req.auth = {
18
- token,
19
- clientId: user.id,
20
- scopes: [],
21
- extra: { user },
22
- };
23
- const sessionId = req.headers["x-session-id"];
24
- if (typeof sessionId === "string" && sessionId.length > 0) {
25
- req.mcpSessionId = sessionId;
26
- }
27
- }
28
- /**
29
- * Bearer-token auth middleware for the MCP HTTP endpoint.
30
- *
31
- * Token sources, in order: `Authorization: Bearer <token>`, then
32
- * `X-Access-Token`. If neither is present the middleware responds `401` and
33
- * does not call `next`.
34
- *
35
- * On success it sets:
36
- * - `req.user` — the resolved {@link AuthUser}
37
- * - `req.headers.company` — `user.companySubdomainName` (for downstream
38
- * middleware that keys off the company header)
39
- * - `req.auth` — SDK-shaped `AuthInfo`, surfaced to MCP tool handlers as
40
- * `RequestHandlerExtra.authInfo`
41
- * - `req.mcpSessionId` — value of the `X-Session-Id` header if present, used
42
- * for log correlation
43
- *
44
- * Then calls `next()`.
45
- *
46
- * **Never throws.** All failures (missing token, `tokenToUser` rejection)
47
- * are turned into `401` responses; the middleware does not call `next(err)`.
48
- *
49
- * Mounted automatically by `createMcpServer`'s `mount()`. Exported in case
50
- * you want to compose it differently (e.g. mount under a different router,
51
- * or stack additional middleware).
52
- */
53
- export function mcpAuth(options) {
54
- return async (req, res, next) => {
55
- const token = extractBearer(req);
56
- if (!token) {
57
- res
58
- .status(401)
59
- .json({ error: "Missing or invalid Authorization header" });
60
- return;
61
- }
62
- try {
63
- const user = await options.tokenToUser(token);
64
- applyAuthToRequest(req, user, token);
65
- next();
66
- }
67
- catch (err) {
68
- const reason = err instanceof Error ? err.message : "invalid token";
69
- options.logger.warn({ err }, "mcp auth: token rejected");
70
- res.status(401).json({ error: `Authentication failed: ${reason}` });
71
- }
72
- };
73
- }
74
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAGA,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC,SAAS,aAAa,CAAC,GAAY;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAChD,CAAC;IACD,uEAAuE;IACvE,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC1C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;QAC5E,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAID,SAAS,kBAAkB,CAAC,GAAY,EAAE,IAAc,EAAE,KAAa;IACpE,GAAmB,CAAC,IAAI,GAAG,IAAI,CAAC;IACjC,GAAG,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC;IAChD,GAAG,CAAC,IAAI,GAAG;QACT,KAAK;QACL,QAAQ,EAAE,IAAI,CAAC,EAAE;QACjB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE,I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../../src/errors/errors.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,gFAAgF;IAChF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK,YAAY,GAAG,IAAI,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.types.js","sourceRoot":"","sources":["../../src/errors/errors.types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,cAAc,mBAAmB,CAAC;AA+D/C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,YAAY,GAAG,IAAI,EAC3B,WAAW,EAAE,OAAO,EACpB,IAAI,EAAE,aAAa,GAClB,cAAc,CAMhB"}
@@ -1 +0,0 @@
1
- {"version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,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,IAAI,CAAC,MAAM,CAAC,KAAK,CACf;QACE,GAAG,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;QAC3C,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B,EACD,0BAA0B,CAC3B,CAAC;IACF,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iDAAiD,EAAE;SAC1E;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,cAAc;YACpB,OAAO;SACR;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,eAAe,CAC7B,MAA2B,EAC3B,WAAoB,EACpB,IAAmB;IAEnB,IAAI,MAAM,EAAE,CAAC;QACX,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC7B,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,oBAAoB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AACjD,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { CreateMcpServerOptions, CreateMcpServerResult } from "./server.types.ts";
2
- /**
3
- * Build an MCP server bound to the Streamable HTTP transport.
4
- *
5
- * Returns a `{ server, mount }` pair. Register tools against `server` using
6
- * `tool()` at boot time, then call `mount(router)` to wire the JSON-RPC
7
- * endpoint onto an Express router. Each incoming HTTP request runs through:
8
- *
9
- * `express.json()` → auth middleware → caller's `setupPostgan` → tool dispatch
10
- *
11
- * Tool handlers run inside an `AsyncLocalStorage` scope, so they pull
12
- * `user` / `postgan` / `transaction` / `sessionId` / `logger` from
13
- * `ToolContext` without Express objects leaking in.
14
- *
15
- * Synchronous and never throws.
16
- */
17
- export declare function createMcpServer(options: CreateMcpServerOptions): CreateMcpServerResult;
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EAKtB,MAAM,mBAAmB,CAAC;AA2G3B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,CAuBvB"}
@@ -1,130 +0,0 @@
1
- import express, {} from "express";
2
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
4
- import { mcpAuth } from "../auth/index.js";
5
- import { requestStore } from "../als.js";
6
- /**
7
- * Build the recording shim handed to consumers as `server`.
8
- *
9
- * Why a shim and not a real `McpServer`: the SDK's
10
- * `StreamableHTTPServerTransport` (stateless mode) is single-use — once it
11
- * has handled one request it cannot be reused. The transport must be paired
12
- * with an `McpServer`, so we need a fresh server per HTTP request. But
13
- * consumers register tools once at boot, not per request — so registration
14
- * is split in two:
15
- *
16
- * - boot: `tool(server, spec)` lands here and pushes onto `registrations`.
17
- * - request: {@link handleMcpRequest} constructs a real `McpServer` and
18
- * replays every recorded registration onto it before connecting
19
- * the transport.
20
- *
21
- * The recorder is typed as `McpServer` so `tool(server, spec)` type-checks,
22
- * but `registerTool` is the only method actually implemented. Nothing in
23
- * the library calls anything else on it, and the consumer is documented to
24
- * only pass it to `tool()` — calls to other methods are undefined behaviour.
25
- */
26
- function createToolRecorder() {
27
- const registrations = [];
28
- const recorder = {
29
- registerTool: (name, config, handler) => {
30
- registrations.push({ name, config, handler });
31
- // Real `registerTool` returns a registration handle for later
32
- // update/remove. We don't expose that surface — empty object satisfies
33
- // the return type and is never read.
34
- return {};
35
- },
36
- };
37
- return { server: recorder, registrations };
38
- }
39
- /**
40
- * Per-request handler. Builds the ALS store from `req.user` / `req.postgan`
41
- * (set upstream by the auth + setupPostgan middleware), spins up a fresh
42
- * `McpServer` + transport pair, replays the recorded tool registrations,
43
- * dispatches the JSON-RPC call inside `requestStore.run(...)`, and tears
44
- * down server + transport in `finally`.
45
- */
46
- function handleMcpRequest(deps) {
47
- return async (req, res) => {
48
- const { user, postgan } = req;
49
- if (!user || !postgan) {
50
- // Defensive: mcpAuth + setupPostgan should have populated both.
51
- res.status(401).json({ error: "Unauthenticated" });
52
- return;
53
- }
54
- const sessionId = req.mcpSessionId;
55
- const store = {
56
- user,
57
- postgan,
58
- sessionId,
59
- logger: deps.logger.child({
60
- sessionId,
61
- userId: user.id,
62
- company: user.companySubdomainName,
63
- }),
64
- errorMapper: deps.errorMapper,
65
- };
66
- const requestServer = new McpServer({
67
- name: deps.name,
68
- version: deps.version,
69
- });
70
- for (const reg of deps.registrations) {
71
- requestServer.registerTool(reg.name, reg.config, reg.handler);
72
- }
73
- const transport = new StreamableHTTPServerTransport({
74
- sessionIdGenerator: undefined,
75
- });
76
- await requestServer.connect(transport);
77
- await requestStore.run(store, async () => {
78
- try {
79
- await transport.handleRequest(req, res, req.body);
80
- }
81
- catch (err) {
82
- deps.logger.error({ err, sessionId }, "mcp: transport.handleRequest threw");
83
- if (!res.headersSent) {
84
- res.status(500).json({ error: "Internal MCP transport error" });
85
- }
86
- }
87
- finally {
88
- await transport.close().catch((closeErr) => {
89
- deps.logger.warn({ err: closeErr }, "mcp: transport close failed");
90
- });
91
- await requestServer.close().catch((closeErr) => {
92
- deps.logger.warn({ err: closeErr }, "mcp: server close failed");
93
- });
94
- }
95
- });
96
- };
97
- }
98
- /**
99
- * Build an MCP server bound to the Streamable HTTP transport.
100
- *
101
- * Returns a `{ server, mount }` pair. Register tools against `server` using
102
- * `tool()` at boot time, then call `mount(router)` to wire the JSON-RPC
103
- * endpoint onto an Express router. Each incoming HTTP request runs through:
104
- *
105
- * `express.json()` → auth middleware → caller's `setupPostgan` → tool dispatch
106
- *
107
- * Tool handlers run inside an `AsyncLocalStorage` scope, so they pull
108
- * `user` / `postgan` / `transaction` / `sessionId` / `logger` from
109
- * `ToolContext` without Express objects leaking in.
110
- *
111
- * Synchronous and never throws.
112
- */
113
- export function createMcpServer(options) {
114
- const mcpLogger = options.logger.child({ component: "mcp" });
115
- const { server, registrations } = createToolRecorder();
116
- const mount = async (target) => {
117
- target.use(express.json());
118
- target.use(mcpAuth({ tokenToUser: options.tokenToUser, logger: mcpLogger }));
119
- target.use(options.setupPostgan);
120
- target.post("/", handleMcpRequest({
121
- name: options.name,
122
- version: options.version,
123
- registrations,
124
- logger: mcpLogger,
125
- errorMapper: options.errorMapper,
126
- }));
127
- };
128
- return { server, mount };
129
- }
130
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAA4C,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAqB,MAAM,WAAW,CAAC;AAU5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,kBAAkB;IAIzB,MAAM,aAAa,GAAuB,EAAE,CAAC;IAC7C,MAAM,QAAQ,GAAG;QACf,YAAY,EAAE,CACZ,IAAyB,EACzB,MAA2B,EAC3B,OAA4B,EAC5B,EAAE;YACF,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;YAC9C,8DAA8D;YAC9D,uEAAuE;YACvE,qCAAqC;YACrC,OAAO,EAA2C,CAAC;QACrD,CAAC;KACsB,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC7C,CA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CAAC;QAC3B,MAAM,CAAC,GAAG,CACR,OAAO,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CACjE,CAAC;QACF,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACjC,MAAM,CAAC,IAAI,CACT,GAAG,EACH,gBAAgB,CAAC;YACf,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,aAAa;YACb,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC3B,CAAC"}
@@ -1,78 +0,0 @@
1
- import type { Request, RequestHandler, Router } from "express";
2
- import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- import type { Postgan } from "@ganintegrity/postgan";
4
- import type { Logger } from "pino";
5
- import type { AuthUser } from "../auth/auth.types.ts";
6
- import type { McpErrorMapper } from "../errors/errors.types.ts";
7
- /**
8
- * Configuration for `createMcpServer()`.
9
- */
10
- export interface CreateMcpServerOptions {
11
- /** MCP server name advertised to clients during initialisation. */
12
- name: string;
13
- /** MCP server version advertised to clients during initialisation. */
14
- version: string;
15
- /**
16
- * Service logger. The library calls `logger.child({ component: "mcp" })`
17
- * internally and further childs with `sessionId` / `userId` / `company`
18
- * per request and with `tool` / `sessionId` per tool call.
19
- */
20
- logger: Logger;
21
- /**
22
- * Resolve a bearer token to a user. See `McpAuthOptions.tokenToUser`.
23
- * Reject by throwing — the library responds `401`.
24
- */
25
- tokenToUser: (token: string) => Promise<AuthUser>;
26
- /**
27
- * Express middleware that attaches a `Postgan` instance to `req.postgan`.
28
- * Mounted automatically between the auth middleware and the JSON-RPC
29
- * dispatcher; tools open per-call transactions against `ctx.postgan`.
30
- *
31
- * The library is neutral about how Postgan is constructed — supply your
32
- * service's existing setup-postgan middleware.
33
- */
34
- setupPostgan: RequestHandler;
35
- /**
36
- * Translate a thrown error into an MCP envelope. Return `null` to fall
37
- * through to a redacted `INTERNAL_ERROR` envelope — appropriate for
38
- * anything you don't want surfaced to the agent. Without a mapper every
39
- * thrown error becomes `INTERNAL_ERROR`.
40
- */
41
- errorMapper?: McpErrorMapper;
42
- }
43
- /**
44
- * Return value of `createMcpServer()`.
45
- */
46
- export interface CreateMcpServerResult {
47
- /**
48
- * Tool-registration target. Pass to `tool()` at boot, once per tool.
49
- * Treat as opaque — `tool()` is the only supported way to use it.
50
- */
51
- server: McpServer;
52
- /**
53
- * Attach the MCP route handlers (auth + setupPostgan + JSON-RPC dispatch)
54
- * to the supplied Express router. Caller decides the mount path
55
- * (`app.use("/mcp", router)`).
56
- *
57
- * Resolves once the route is attached. Never throws.
58
- */
59
- mount: (target: Router) => Promise<void>;
60
- }
61
- export type RegisterToolArgs = Parameters<McpServer["registerTool"]>;
62
- export type ReqWithUserPostgan = Request & {
63
- user?: AuthUser;
64
- postgan?: Postgan;
65
- };
66
- export interface ToolRegistration {
67
- name: RegisterToolArgs[0];
68
- config: RegisterToolArgs[1];
69
- handler: RegisterToolArgs[2];
70
- }
71
- export interface HandleRequestDeps {
72
- name: string;
73
- version: string;
74
- registrations: readonly ToolRegistration[];
75
- logger: Logger;
76
- errorMapper?: McpErrorMapper;
77
- }
78
- //# sourceMappingURL=server.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.types.d.ts","sourceRoot":"","sources":["../../src/server/server.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CA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IACf,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=server.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.types.js","sourceRoot":"","sources":["../../src/server/server.types.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import type { z } from "zod";
3
- import type { ToolSpec } from "./tool.types.ts";
4
- /**
5
- * Register a tool against the MCP server returned by `createMcpServer()`.
6
- * The wrapper around your handler:
7
- *
8
- * 1. Builds a {@link ToolContext} from the active request scope.
9
- * 2. Opens a fresh `Postgan.Transaction` before calling your handler.
10
- * 3. On resolve, commits the transaction and returns a `CallToolResult`
11
- * where the handler's return value is surfaced both as a JSON `text`
12
- * content block (for non-structured-aware clients) and as
13
- * `structuredContent` (for AI-SDK clients).
14
- * 4. On throw, rolls back the transaction and routes the error through
15
- * the consumer's `McpErrorMapper` (passed to `createMcpServer`) to
16
- * build an MCP error envelope.
17
- *
18
- * Registration itself is synchronous and does not throw. The wrapped handler
19
- * **may** throw at request time — but only if it is invoked outside an
20
- * active request scope, which indicates a programming bug (the handler was
21
- * dispatched without going through `mount()`'s ALS wrapper). Such throws
22
- * propagate to the SDK transport and surface as an HTTP 500. Errors raised
23
- * by your own handler logic are caught and never propagate.
24
- */
25
- export declare function tool<Schema extends z.ZodObject, Output extends Record<string, unknown>>(server: McpServer, spec: ToolSpec<Schema, Output>): void;
26
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tool/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AA6B7D;;;;;;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AM;IAC1D,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACvE"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes