tracepass-mcp-server 1.4.0 → 1.4.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/dist/http.d.ts +6 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +103 -32
- package/dist/http.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
|
@@ -25,7 +25,12 @@
|
|
|
25
25
|
* Env:
|
|
26
26
|
* PORT (optional) — listen port, default 8080
|
|
27
27
|
* TRACEPASS_BASE_URL (optional) — the TracePass API base URL the
|
|
28
|
-
* tools call, default https://app.tracepass.eu
|
|
28
|
+
* tools call, default https://app.tracepass.eu. In prod
|
|
29
|
+
* this is the INTERNAL Docker address (platform:3000).
|
|
30
|
+
* TRACEPASS_AUTH_SERVER_URL (optional) — the PUBLIC authorization-server
|
|
31
|
+
* origin advertised in OAuth discovery metadata, default
|
|
32
|
+
* https://app.tracepass.eu. Set this when BASE_URL is an
|
|
33
|
+
* internal address so clients get a reachable auth server.
|
|
29
34
|
*/
|
|
30
35
|
export {};
|
|
31
36
|
//# sourceMappingURL=http.d.ts.map
|
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG"}
|
package/dist/http.js
CHANGED
|
@@ -25,14 +25,26 @@
|
|
|
25
25
|
* Env:
|
|
26
26
|
* PORT (optional) — listen port, default 8080
|
|
27
27
|
* TRACEPASS_BASE_URL (optional) — the TracePass API base URL the
|
|
28
|
-
* tools call, default https://app.tracepass.eu
|
|
28
|
+
* tools call, default https://app.tracepass.eu. In prod
|
|
29
|
+
* this is the INTERNAL Docker address (platform:3000).
|
|
30
|
+
* TRACEPASS_AUTH_SERVER_URL (optional) — the PUBLIC authorization-server
|
|
31
|
+
* origin advertised in OAuth discovery metadata, default
|
|
32
|
+
* https://app.tracepass.eu. Set this when BASE_URL is an
|
|
33
|
+
* internal address so clients get a reachable auth server.
|
|
29
34
|
*/
|
|
30
35
|
import { createServer } from "node:http";
|
|
31
36
|
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
32
37
|
import { createMcpServer } from "./server.js";
|
|
33
38
|
const PORT = Number(process.env.PORT) || 8080;
|
|
34
39
|
const DEFAULT_BASE_URL = "https://app.tracepass.eu";
|
|
40
|
+
// The API base the TOOLS call. In prod this is the INTERNAL Docker address
|
|
41
|
+
// (http://platform:3000) — a private loopback, never exposed to clients.
|
|
35
42
|
const BASE_URL = process.env.TRACEPASS_BASE_URL?.trim() || DEFAULT_BASE_URL;
|
|
43
|
+
// The PUBLIC origin of the TracePass authorization server, used ONLY in the
|
|
44
|
+
// OAuth discovery metadata (RFC 9728 `authorization_servers`). MUST be a URL the
|
|
45
|
+
// client's browser can reach — distinct from BASE_URL, which in prod is the
|
|
46
|
+
// internal loopback. Defaults to the public app origin.
|
|
47
|
+
const PUBLIC_AUTH_SERVER_URL = process.env.TRACEPASS_AUTH_SERVER_URL?.trim() || DEFAULT_BASE_URL;
|
|
36
48
|
/** The MCP endpoint path. `/mcp` is the conventional path. */
|
|
37
49
|
const MCP_PATH = "/mcp";
|
|
38
50
|
/** The MCP server card discovery path (SEP-1649). */
|
|
@@ -41,8 +53,8 @@ const SERVER_CARD_PATH = "/.well-known/mcp/server-card.json";
|
|
|
41
53
|
* RFC 9728 Protected Resource Metadata path. The MCP authorization spec has a
|
|
42
54
|
* client fetch this (pointed to by the `resource_metadata` param on our 401
|
|
43
55
|
* `WWW-Authenticate` challenge) to discover which authorization server protects
|
|
44
|
-
* this resource. TracePass
|
|
45
|
-
*
|
|
56
|
+
* this resource. TracePass runs a real OAuth2 authorization server at its public
|
|
57
|
+
* origin (PUBLIC_AUTH_SERVER_URL), which we name in the metadata. This is the
|
|
46
58
|
* resource server (ai.tracepass.eu); the authorization server is a different
|
|
47
59
|
* origin — RFC 9728 is exactly the indirection for that split.
|
|
48
60
|
*/
|
|
@@ -68,7 +80,7 @@ const GLAMA_CLAIM = {
|
|
|
68
80
|
* because discovery precedes auth.
|
|
69
81
|
*
|
|
70
82
|
* Every value here mirrors the real server: `serverInfo` matches
|
|
71
|
-
* `MCP_SERVER_INFO` in server.ts (tracepass / 1.4.
|
|
83
|
+
* `MCP_SERVER_INFO` in server.ts (tracepass / 1.4.2); the capability lists are
|
|
72
84
|
* the exact tool names from tools.ts, resource URIs/templates from
|
|
73
85
|
* resources.ts, and prompt names from prompts.ts. Keep this in sync when
|
|
74
86
|
* capabilities change — a card that over-claims is worse than no card.
|
|
@@ -88,9 +100,9 @@ const GLAMA_CLAIM = {
|
|
|
88
100
|
*/
|
|
89
101
|
const SERVER_CARD = {
|
|
90
102
|
name: "tracepass",
|
|
91
|
-
version: "1.4.
|
|
103
|
+
version: "1.4.2",
|
|
92
104
|
description: "Model Context Protocol server for TracePass — the EU Digital Product Passport platform. Manage products, Digital Product Passports, economic-operator parties, and GS1 EPCIS 2.0 supply-chain events.",
|
|
93
|
-
serverInfo: { name: "tracepass", version: "1.4.
|
|
105
|
+
serverInfo: { name: "tracepass", version: "1.4.2" },
|
|
94
106
|
transport: {
|
|
95
107
|
type: "streamable-http",
|
|
96
108
|
endpoint: `https://ai.tracepass.eu${MCP_PATH}`,
|
|
@@ -141,15 +153,16 @@ const SERVER_CARD = {
|
|
|
141
153
|
};
|
|
142
154
|
/**
|
|
143
155
|
* RFC 9728 Protected Resource Metadata. Declares that this resource
|
|
144
|
-
* (ai.tracepass.eu/mcp) is protected by the TracePass authorization server
|
|
145
|
-
*
|
|
156
|
+
* (ai.tracepass.eu/mcp) is protected by the TracePass authorization server at
|
|
157
|
+
* its PUBLIC origin (PUBLIC_AUTH_SERVER_URL — NOT the internal BASE_URL the
|
|
158
|
+
* tools call). An OAuth-capable MCP client fetches this after
|
|
146
159
|
* a 401, then drives the authorization-code flow against the named auth server.
|
|
147
160
|
* `scopes_supported` mirrors the platform's OAuth scopes so a client can request
|
|
148
161
|
* least-privilege.
|
|
149
162
|
*/
|
|
150
163
|
const PROTECTED_RESOURCE_METADATA = {
|
|
151
164
|
resource: `https://ai.tracepass.eu${MCP_PATH}`,
|
|
152
|
-
authorization_servers: [
|
|
165
|
+
authorization_servers: [PUBLIC_AUTH_SERVER_URL],
|
|
153
166
|
scopes_supported: [
|
|
154
167
|
"passports:read",
|
|
155
168
|
"passports:write",
|
|
@@ -183,8 +196,10 @@ function readBody(req) {
|
|
|
183
196
|
req.on("error", reject);
|
|
184
197
|
});
|
|
185
198
|
}
|
|
186
|
-
/** Convert a Node IncomingMessage to a Web `Request
|
|
187
|
-
|
|
199
|
+
/** Convert a Node IncomingMessage to a Web `Request`, reusing an already-read
|
|
200
|
+
* body string (the body stream can only be consumed once — we read it up front
|
|
201
|
+
* to inspect the JSON-RPC method, then hand the buffered copy here). */
|
|
202
|
+
function toWebRequest(req, body) {
|
|
188
203
|
const host = req.headers["host"] ?? `localhost:${PORT}`;
|
|
189
204
|
const url = `http://${host}${req.url ?? "/"}`;
|
|
190
205
|
const headers = new Headers();
|
|
@@ -194,10 +209,67 @@ async function toWebRequest(req) {
|
|
|
194
209
|
headers.set(k, Array.isArray(v) ? v.join(", ") : v);
|
|
195
210
|
}
|
|
196
211
|
const method = req.method ?? "GET";
|
|
197
|
-
const hasBody = method !== "GET" && method !== "HEAD";
|
|
198
|
-
const body = hasBody ? await readBody(req) : undefined;
|
|
199
212
|
return new Request(url, { method, headers, body: body || undefined });
|
|
200
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Emit the RFC 6750 Bearer challenge + RFC 9728 resource_metadata as a real HTTP
|
|
216
|
+
* 401. Used for BOTH a missing credential and a present-but-rejected one, so an
|
|
217
|
+
* OAuth-capable client always learns it should (re-)authenticate via the
|
|
218
|
+
* authorization server named in the protected-resource metadata. `reason`
|
|
219
|
+
* tailors the human-readable description.
|
|
220
|
+
* NB: HTTP header values are Latin-1 only — keep this ASCII (use "->" not the
|
|
221
|
+
* UTF-8 arrow, which makes Node throw "Invalid character in header content").
|
|
222
|
+
*/
|
|
223
|
+
function sendAuthChallenge(res, reason) {
|
|
224
|
+
const desc = reason === "missing"
|
|
225
|
+
? "Authenticate with a TracePass API key (Developer -> API Keys, send Authorization: Bearer <tp_ key>) or via OAuth (see resource_metadata)."
|
|
226
|
+
: "The credential was rejected (expired or invalid). Refresh your OAuth token or re-authenticate (see resource_metadata), or check your API key.";
|
|
227
|
+
res.setHeader("WWW-Authenticate", 'Bearer realm="TracePass MCP", error="invalid_token", ' +
|
|
228
|
+
`resource_metadata="https://ai.tracepass.eu${PROTECTED_RESOURCE_METADATA_PATH}", ` +
|
|
229
|
+
`error_description="${desc}"`);
|
|
230
|
+
sendJson(res, 401, {
|
|
231
|
+
error: "unauthorized",
|
|
232
|
+
message: reason === "missing"
|
|
233
|
+
? "Missing credential. Send Authorization: Bearer <tp_ key> (Developer -> API Keys) or connect via OAuth."
|
|
234
|
+
: "The credential was rejected. Refresh your OAuth token or check your API key.",
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/** True if the JSON-RPC body is an `initialize` request — the first call an MCP
|
|
238
|
+
* client makes when connecting. We validate the credential here so a
|
|
239
|
+
* present-but-invalid token fails fast with a proper 401 challenge at connect
|
|
240
|
+
* time, rather than every tool call paying an extra round-trip. */
|
|
241
|
+
function isInitializeRequest(body) {
|
|
242
|
+
if (!body)
|
|
243
|
+
return false;
|
|
244
|
+
try {
|
|
245
|
+
const parsed = JSON.parse(body);
|
|
246
|
+
const msgs = Array.isArray(parsed) ? parsed : [parsed];
|
|
247
|
+
return msgs.some((m) => m && typeof m === "object" && m.method === "initialize");
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Probe whether a present credential is actually valid, with a cheap read
|
|
255
|
+
* against the v1 API (the same endpoint the credential test uses). Returns true
|
|
256
|
+
* if the API accepts it, false on a 401/403 (rejected), and — deliberately —
|
|
257
|
+
* true on any other failure (network blip, 5xx) so we DON'T block a connect over
|
|
258
|
+
* a transient error; the real call will surface that later as an isError result.
|
|
259
|
+
*/
|
|
260
|
+
async function credentialAccepted(bearerToken) {
|
|
261
|
+
try {
|
|
262
|
+
const res = await fetch(`${BASE_URL}/api/v1/products?limit=1`, {
|
|
263
|
+
method: "GET",
|
|
264
|
+
headers: { Authorization: `Bearer ${bearerToken}`, Accept: "application/json", "X-Source": "mcp" },
|
|
265
|
+
});
|
|
266
|
+
// Only a hard auth rejection blocks the connect. Everything else passes.
|
|
267
|
+
return res.status !== 401 && res.status !== 403;
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
return true; // transient/network — don't block on it
|
|
271
|
+
}
|
|
272
|
+
}
|
|
201
273
|
/** Write a Web `Response` back through a Node ServerResponse. */
|
|
202
274
|
async function writeWebResponse(webRes, res) {
|
|
203
275
|
res.statusCode = webRes.status;
|
|
@@ -254,26 +326,25 @@ const httpServer = createServer((req, res) => {
|
|
|
254
326
|
}
|
|
255
327
|
// A credential is required — no anonymous MCP access. Accepts either a
|
|
256
328
|
// tp_ API key or an OAuth access token (forwarded verbatim to the v1 API).
|
|
329
|
+
// A MISSING credential → real 401 + WWW-Authenticate so a discovery-capable
|
|
330
|
+
// client learns the scheme + the OAuth resource_metadata pointer.
|
|
257
331
|
const bearerToken = extractBearerToken(req);
|
|
258
332
|
if (!bearerToken) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
error: "unauthorized",
|
|
275
|
-
message: "Missing API key. Send Authorization: Bearer <tp_ key>. Mint a key in the TracePass dashboard → Developer → API Keys.",
|
|
276
|
-
});
|
|
333
|
+
sendAuthChallenge(res, "missing");
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
// Read the body once (the stream is single-use); we both inspect it for
|
|
337
|
+
// the JSON-RPC method and hand the buffered copy to the transport below.
|
|
338
|
+
const method = req.method ?? "GET";
|
|
339
|
+
const bodyStr = method !== "GET" && method !== "HEAD" ? await readBody(req) : undefined;
|
|
340
|
+
// On `initialize` (the first call of an MCP session), validate the token
|
|
341
|
+
// up front. A PRESENT-but-rejected credential gets a real 401 +
|
|
342
|
+
// WWW-Authenticate challenge — so an OAuth client knows to refresh /
|
|
343
|
+
// re-authenticate rather than only seeing an isError tool result. We probe
|
|
344
|
+
// ONLY on initialize, so tool calls don't pay an extra round-trip; a token
|
|
345
|
+
// that expires mid-session still surfaces as an isError result on the call.
|
|
346
|
+
if (isInitializeRequest(bodyStr) && !(await credentialAccepted(bearerToken))) {
|
|
347
|
+
sendAuthChallenge(res, "invalid");
|
|
277
348
|
return;
|
|
278
349
|
}
|
|
279
350
|
// Fresh, stateless server + transport per request, bound to this
|
|
@@ -286,7 +357,7 @@ const httpServer = createServer((req, res) => {
|
|
|
286
357
|
sessionIdGenerator: undefined, // stateless
|
|
287
358
|
});
|
|
288
359
|
await server.connect(transport);
|
|
289
|
-
const webReq =
|
|
360
|
+
const webReq = toWebRequest(req, bodyStr);
|
|
290
361
|
const webRes = await transport.handleRequest(webReq);
|
|
291
362
|
await writeWebResponse(webRes, res);
|
|
292
363
|
// Stateless — release the per-request server once answered.
|
package/dist/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":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d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
16
16
|
* meaningful tool-surface change. */
|
|
17
17
|
export declare const MCP_SERVER_INFO: {
|
|
18
18
|
readonly name: "tracepass";
|
|
19
|
-
readonly version: "1.4.
|
|
19
|
+
readonly version: "1.4.2";
|
|
20
20
|
};
|
|
21
21
|
export interface CreateMcpServerConfig {
|
|
22
22
|
/** Base URL of the TracePass app — e.g. "https://app.tracepass.eu".
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tracepass-mcp-server",
|
|
3
3
|
"mcpName": "eu.tracepass/tracepass",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.2",
|
|
5
5
|
"description": "Model Context Protocol server for TracePass \u2014 the EU Digital Product Passport platform. Lets AI assistants manage products, passports, and EPCIS supply-chain events.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|