@get-technology-inc/jamf-docs-mcp-server 4.0.0 → 4.0.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/README.md +73 -0
- package/dist/core/apps/generated/app-html.d.ts +3 -1
- package/dist/core/apps/generated/app-html.d.ts.map +1 -1
- package/dist/core/apps/generated/app-html.js +3 -1
- package/dist/core/apps/generated/app-html.js.map +1 -1
- package/dist/core/apps/index.d.ts +18 -2
- package/dist/core/apps/index.d.ts.map +1 -1
- package/dist/core/apps/index.js +23 -4
- package/dist/core/apps/index.js.map +1 -1
- package/dist/core/create-server.d.ts +10 -2
- package/dist/core/create-server.d.ts.map +1 -1
- package/dist/core/create-server.js +17 -4
- package/dist/core/create-server.js.map +1 -1
- package/dist/core/resources/index.d.ts.map +1 -1
- package/dist/core/resources/index.js +29 -4
- package/dist/core/resources/index.js.map +1 -1
- package/dist/core/schemas/index.js +2 -2
- package/dist/core/schemas/index.js.map +1 -1
- package/dist/core/schemas/output.d.ts +9 -0
- package/dist/core/schemas/output.d.ts.map +1 -1
- package/dist/core/schemas/output.js +29 -0
- package/dist/core/schemas/output.js.map +1 -1
- package/dist/core/services/article-service.d.ts +9 -1
- package/dist/core/services/article-service.d.ts.map +1 -1
- package/dist/core/services/article-service.js +4 -5
- package/dist/core/services/article-service.js.map +1 -1
- package/dist/core/services/ft-client.d.ts.map +1 -1
- package/dist/core/services/ft-client.js +2 -1
- package/dist/core/services/ft-client.js.map +1 -1
- package/dist/core/services/glossary.d.ts.map +1 -1
- package/dist/core/services/glossary.js +18 -10
- package/dist/core/services/glossary.js.map +1 -1
- package/dist/core/services/interfaces/cache.d.ts +1 -1
- package/dist/core/services/interfaces/cache.d.ts.map +1 -1
- package/dist/core/services/maps-registry.d.ts +0 -1
- package/dist/core/services/maps-registry.d.ts.map +1 -1
- package/dist/core/services/maps-registry.js +20 -15
- package/dist/core/services/maps-registry.js.map +1 -1
- package/dist/core/services/metadata.d.ts +27 -3
- package/dist/core/services/metadata.d.ts.map +1 -1
- package/dist/core/services/metadata.js +66 -26
- package/dist/core/services/metadata.js.map +1 -1
- package/dist/core/services/search-service.d.ts.map +1 -1
- package/dist/core/services/search-service.js +6 -1
- package/dist/core/services/search-service.js.map +1 -1
- package/dist/core/services/toc-service.d.ts.map +1 -1
- package/dist/core/services/toc-service.js +7 -3
- package/dist/core/services/toc-service.js.map +1 -1
- package/dist/core/services/topic-resolver.d.ts.map +1 -1
- package/dist/core/services/topic-resolver.js +62 -19
- package/dist/core/services/topic-resolver.js.map +1 -1
- package/dist/core/tools/get-article.d.ts.map +1 -1
- package/dist/core/tools/get-article.js +30 -18
- package/dist/core/tools/get-article.js.map +1 -1
- package/dist/core/tools/get-toc.d.ts.map +1 -1
- package/dist/core/tools/get-toc.js +4 -0
- package/dist/core/tools/get-toc.js.map +1 -1
- package/dist/core/tools/glossary-lookup.d.ts.map +1 -1
- package/dist/core/tools/glossary-lookup.js +2 -1
- package/dist/core/tools/glossary-lookup.js.map +1 -1
- package/dist/core/tools/search.d.ts.map +1 -1
- package/dist/core/tools/search.js +24 -7
- package/dist/core/tools/search.js.map +1 -1
- package/dist/core/types.d.ts +42 -10
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/utils/ft-metadata.d.ts +10 -2
- package/dist/core/utils/ft-metadata.d.ts.map +1 -1
- package/dist/core/utils/ft-metadata.js +10 -2
- package/dist/core/utils/ft-metadata.js.map +1 -1
- package/dist/platforms/node/cache.d.ts +1 -1
- package/dist/platforms/node/cache.d.ts.map +1 -1
- package/dist/platforms/node/cache.js.map +1 -1
- package/dist/platforms/node/config.d.ts.map +1 -1
- package/dist/platforms/node/config.js +3 -5
- package/dist/platforms/node/config.js.map +1 -1
- package/dist/platforms/node/http-server.d.ts.map +1 -1
- package/dist/platforms/node/http-server.js +21 -7
- package/dist/platforms/node/http-server.js.map +1 -1
- package/dist/transport/http-handler.d.ts +37 -7
- package/dist/transport/http-handler.d.ts.map +1 -1
- package/dist/transport/http-handler.js +180 -21
- package/dist/transport/http-handler.js.map +1 -1
- package/package.json +5 -4
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* native request/response types to/from Web Standard objects and
|
|
6
6
|
* call the `handler` function returned by `createHttpHandler`.
|
|
7
7
|
*/
|
|
8
|
-
import { createMcpHandler } from '@modelcontextprotocol/server';
|
|
8
|
+
import { createMcpHandler, InMemoryServerEventBus } from '@modelcontextprotocol/server';
|
|
9
9
|
import { RateLimiter } from './rate-limiter.js';
|
|
10
10
|
import { LLMS_TXT, PayloadTooLargeError, } from './http-types.js';
|
|
11
11
|
// ============================================================================
|
|
@@ -105,8 +105,65 @@ function textResponse(status, body, contentType, extraHeaders = {}) {
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
// ============================================================================
|
|
108
|
-
//
|
|
108
|
+
// Request classification helpers
|
|
109
109
|
// ============================================================================
|
|
110
|
+
/**
|
|
111
|
+
* Whether a parsed body is a `subscriptions/listen` request.
|
|
112
|
+
*
|
|
113
|
+
* These are long-lived SSE streams, not exchanges: they never complete on
|
|
114
|
+
* their own, so shutdown ends them rather than waiting for them.
|
|
115
|
+
*/
|
|
116
|
+
function isSubscriptionListen(parsedBody) {
|
|
117
|
+
return (typeof parsedBody === 'object'
|
|
118
|
+
&& parsedBody !== null
|
|
119
|
+
&& parsedBody.method === 'subscriptions/listen');
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Decrement the in-flight count only once the response body has been fully
|
|
123
|
+
* consumed (or cancelled).
|
|
124
|
+
*
|
|
125
|
+
* In `'auto'`/`'sse'` response mode the SDK resolves `fetch` as soon as the
|
|
126
|
+
* first frame is ready and keeps writing the result into the stream, and the
|
|
127
|
+
* per-request server stays registered as in-flight until that stream ends.
|
|
128
|
+
* Counting only up to `fetch` resolving would therefore let shutdown tear the
|
|
129
|
+
* server down mid-stream and truncate the response.
|
|
130
|
+
*/
|
|
131
|
+
function trackBody(response, done) {
|
|
132
|
+
const source = response.body;
|
|
133
|
+
if (source === null) {
|
|
134
|
+
done();
|
|
135
|
+
return response;
|
|
136
|
+
}
|
|
137
|
+
// `Response.body` is typed as `ReadableStream<any>` in the ambient lib, so
|
|
138
|
+
// the element type has to be re-stated for the pass-through to stay typed.
|
|
139
|
+
const reader = source.getReader();
|
|
140
|
+
const tracked = new ReadableStream({
|
|
141
|
+
async pull(controller) {
|
|
142
|
+
try {
|
|
143
|
+
const { done: finished, value } = await reader.read();
|
|
144
|
+
if (finished) {
|
|
145
|
+
controller.close();
|
|
146
|
+
done();
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
controller.enqueue(value);
|
|
150
|
+
}
|
|
151
|
+
catch (err) {
|
|
152
|
+
done();
|
|
153
|
+
controller.error(err);
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
async cancel(reason) {
|
|
157
|
+
done();
|
|
158
|
+
await reader.cancel(reason);
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
return new Response(tracked, {
|
|
162
|
+
status: response.status,
|
|
163
|
+
statusText: response.statusText,
|
|
164
|
+
headers: response.headers,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
110
167
|
/**
|
|
111
168
|
* Create a platform-agnostic HTTP handler for the MCP server.
|
|
112
169
|
*
|
|
@@ -117,32 +174,109 @@ function textResponse(status, body, contentType, extraHeaders = {}) {
|
|
|
117
174
|
* @param config - HTTP handler configuration
|
|
118
175
|
* @param getClientIp - Platform-specific function to extract client IP from a Request
|
|
119
176
|
* @param logger - Optional logger instance
|
|
120
|
-
* @returns An object with:
|
|
121
|
-
* - `handler`: async function that takes a Web Standard Request and returns a Response
|
|
122
|
-
* - `cleanup`: function to stop the rate limiter cleanup interval
|
|
123
177
|
*/
|
|
124
178
|
export function createHttpHandler(createServer, config, getClientIp, logger) {
|
|
125
179
|
const rateLimiter = new RateLimiter(config.rateLimitRpm, 60_000);
|
|
126
180
|
const cleanupIntervalId = setInterval(() => { rateLimiter.cleanup(); }, 5 * 60_000);
|
|
127
|
-
|
|
128
|
-
// envelope traffic on the modern path, and 2025-era requests through the
|
|
129
|
-
// SDK's stateless legacy fallback. Legacy responses stream over SSE, which
|
|
130
|
-
// the 2025 Streamable HTTP binding already requires clients to accept.
|
|
131
|
-
const mcpHandler = createMcpHandler(() => createServer(), {
|
|
181
|
+
const handlerOptions = {
|
|
132
182
|
legacy: 'stateless',
|
|
133
183
|
responseMode: config.responseMode,
|
|
134
184
|
onerror: (err) => {
|
|
135
185
|
logger?.error(`MCP handler error: ${err.message}`);
|
|
136
186
|
},
|
|
187
|
+
};
|
|
188
|
+
// Two entries over one factory and one event bus, split by lifetime rather
|
|
189
|
+
// than by protocol era.
|
|
190
|
+
//
|
|
191
|
+
// `McpHttpHandler.close()` does two things at once: it completes the open
|
|
192
|
+
// `subscriptions/listen` streams, and it aborts every in-flight modern
|
|
193
|
+
// exchange (which the client sees as HTTP 499). Graceful shutdown needs the
|
|
194
|
+
// first immediately — those sockets are what would otherwise keep
|
|
195
|
+
// `http.Server.close()` from ever returning — and the second only after the
|
|
196
|
+
// drain window. One handler cannot offer both moments, and the SDK exposes no
|
|
197
|
+
// narrower door: `bus` is shared configuration, the listen router behind it
|
|
198
|
+
// is not reachable on its own.
|
|
199
|
+
//
|
|
200
|
+
// So subscriptions get their own entry. Sharing `bus` keeps them subscribed
|
|
201
|
+
// to the same change-event stream the exchange leg publishes on, which is
|
|
202
|
+
// what makes the split invisible to clients.
|
|
203
|
+
const bus = new InMemoryServerEventBus((err) => {
|
|
204
|
+
logger?.error(`MCP event bus error: ${err.message}`);
|
|
137
205
|
});
|
|
206
|
+
// Ordinary traffic: 2026-07-28 envelope requests on the modern path, and
|
|
207
|
+
// 2025-era requests through the SDK's stateless legacy fallback. Legacy
|
|
208
|
+
// responses stream over SSE, which the 2025 Streamable HTTP binding already
|
|
209
|
+
// requires clients to accept.
|
|
210
|
+
const exchanges = createMcpHandler(() => createServer(), { ...handlerOptions, bus });
|
|
211
|
+
// `subscriptions/listen` only. Same factory, same bus, same options — it
|
|
212
|
+
// differs solely in when it is closed.
|
|
213
|
+
const subscriptions = createMcpHandler(() => createServer(), { ...handlerOptions, bus });
|
|
138
214
|
// Prevent the interval from keeping the process alive (Node.js-specific,
|
|
139
215
|
// but calling .unref() is harmless on platforms that lack it).
|
|
140
216
|
if (typeof cleanupIntervalId === 'object' && 'unref' in cleanupIntervalId) {
|
|
141
217
|
cleanupIntervalId.unref();
|
|
142
218
|
}
|
|
219
|
+
// ------------------------------------------------------------------------
|
|
220
|
+
// Shutdown bookkeeping
|
|
221
|
+
// ------------------------------------------------------------------------
|
|
222
|
+
/** Exchanges past dispatch whose response body has not been consumed yet. */
|
|
223
|
+
let inFlight = 0;
|
|
224
|
+
const drainWaiters = new Set();
|
|
225
|
+
function enterExchange() {
|
|
226
|
+
inFlight++;
|
|
227
|
+
let left = false;
|
|
228
|
+
return () => {
|
|
229
|
+
if (left) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
left = true;
|
|
233
|
+
inFlight--;
|
|
234
|
+
if (inFlight === 0) {
|
|
235
|
+
for (const wake of drainWaiters) {
|
|
236
|
+
wake();
|
|
237
|
+
}
|
|
238
|
+
drainWaiters.clear();
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
/** Resolves `true` once nothing is in flight, `false` if `timeoutMs` runs out. */
|
|
243
|
+
async function drain(timeoutMs) {
|
|
244
|
+
if (inFlight === 0) {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
let timer;
|
|
248
|
+
const expired = new Promise((resolve) => {
|
|
249
|
+
timer = setTimeout(() => { resolve(false); }, timeoutMs);
|
|
250
|
+
});
|
|
251
|
+
const drained = new Promise((resolve) => {
|
|
252
|
+
drainWaiters.add(() => { resolve(true); });
|
|
253
|
+
});
|
|
254
|
+
try {
|
|
255
|
+
return await Promise.race([drained, expired]);
|
|
256
|
+
}
|
|
257
|
+
finally {
|
|
258
|
+
clearTimeout(timer);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
143
261
|
function cleanup() {
|
|
144
262
|
clearInterval(cleanupIntervalId);
|
|
145
|
-
void
|
|
263
|
+
void subscriptions.close();
|
|
264
|
+
void exchanges.close();
|
|
265
|
+
}
|
|
266
|
+
async function shutdown(timeoutMs = config.shutdownTimeoutMs) {
|
|
267
|
+
clearInterval(cleanupIntervalId);
|
|
268
|
+
// 1. Subscription streams end now — they would never drain on their own.
|
|
269
|
+
// Closing their handler completes each one properly rather than just
|
|
270
|
+
// dropping the socket, and frees the connections the HTTP server is
|
|
271
|
+
// waiting on.
|
|
272
|
+
await subscriptions.close();
|
|
273
|
+
// 2. Give exchanges already past dispatch their window to answer.
|
|
274
|
+
if (!(await drain(timeoutMs))) {
|
|
275
|
+
logger?.warning(`Shutdown drain timed out after ${String(timeoutMs)}ms with ${String(inFlight)} request(s) in flight`);
|
|
276
|
+
}
|
|
277
|
+
// 3. Only now may the exchange leg go: this is the step that would have
|
|
278
|
+
// answered 499 to everything still running.
|
|
279
|
+
await exchanges.close();
|
|
146
280
|
}
|
|
147
281
|
async function handler(request) {
|
|
148
282
|
// Use hardcoded base URL to prevent Host header injection
|
|
@@ -172,17 +306,20 @@ export function createHttpHandler(createServer, config, getClientIp, logger) {
|
|
|
172
306
|
}
|
|
173
307
|
// MCP endpoint
|
|
174
308
|
if (pathname === '/mcp') {
|
|
175
|
-
return await handleMcp(request,
|
|
309
|
+
return await handleMcp(request, config, corsHeaders, {
|
|
310
|
+
exchanges,
|
|
311
|
+
subscriptions,
|
|
312
|
+
enterExchange,
|
|
313
|
+
...(logger !== undefined && { logger }),
|
|
314
|
+
});
|
|
176
315
|
}
|
|
177
316
|
// 404 fallback
|
|
178
317
|
return jsonResponse(404, { error: 'Not found' }, corsHeaders);
|
|
179
318
|
}
|
|
180
|
-
return { handler, cleanup };
|
|
319
|
+
return { handler, cleanup, shutdown };
|
|
181
320
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
// ============================================================================
|
|
185
|
-
async function handleMcp(request, mcpHandler, config, corsHeaders, logger) {
|
|
321
|
+
async function handleMcp(request, config, corsHeaders, deps) {
|
|
322
|
+
const { logger } = deps;
|
|
186
323
|
// Read body (with size enforcement)
|
|
187
324
|
let bodyText;
|
|
188
325
|
try {
|
|
@@ -194,6 +331,14 @@ async function handleMcp(request, mcpHandler, config, corsHeaders, logger) {
|
|
|
194
331
|
}
|
|
195
332
|
throw err;
|
|
196
333
|
}
|
|
334
|
+
// A POST with no body is a client error, but it cannot be left to the SDK to
|
|
335
|
+
// say so: reading the body above consumed the stream, and the entry answers
|
|
336
|
+
// an absent `parsedBody` by cloning the request to re-read it — which throws
|
|
337
|
+
// on a used body and surfaces as 500. GET and DELETE carry no body by
|
|
338
|
+
// design and are unaffected.
|
|
339
|
+
if (request.method === 'POST' && bodyText.length === 0) {
|
|
340
|
+
return jsonResponse(400, { error: 'Empty request body' }, corsHeaders);
|
|
341
|
+
}
|
|
197
342
|
try {
|
|
198
343
|
// Parse body if present. Reading it above consumed the request stream, so
|
|
199
344
|
// the parsed value must be handed to the MCP handler explicitly.
|
|
@@ -206,14 +351,28 @@ async function handleMcp(request, mcpHandler, config, corsHeaders, logger) {
|
|
|
206
351
|
return jsonResponse(400, { error: 'Invalid JSON in request body' }, corsHeaders);
|
|
207
352
|
}
|
|
208
353
|
}
|
|
209
|
-
//
|
|
210
|
-
//
|
|
211
|
-
|
|
354
|
+
// A subscription stream is not an exchange: it stays open until the client
|
|
355
|
+
// or the server ends it. It goes to the entry that shutdown closes first,
|
|
356
|
+
// and it is excluded from the drain — waiting on something that never
|
|
357
|
+
// finishes would burn the whole window.
|
|
358
|
+
const listen = isSubscriptionListen(parsedBody);
|
|
359
|
+
const entry = listen ? deps.subscriptions : deps.exchanges;
|
|
360
|
+
const release = listen ? undefined : deps.enterExchange();
|
|
361
|
+
let webRes;
|
|
362
|
+
try {
|
|
363
|
+
// The entry classifies the era itself and builds a fresh server per
|
|
364
|
+
// request from the factory it was given.
|
|
365
|
+
webRes = await entry.fetch(request, { parsedBody });
|
|
366
|
+
}
|
|
367
|
+
catch (err) {
|
|
368
|
+
release?.();
|
|
369
|
+
throw err;
|
|
370
|
+
}
|
|
212
371
|
// Add CORS + security headers to the response
|
|
213
372
|
for (const [key, value] of Object.entries(corsHeaders)) {
|
|
214
373
|
webRes.headers.set(key, value);
|
|
215
374
|
}
|
|
216
|
-
return webRes;
|
|
375
|
+
return release === undefined ? webRes : trackBody(webRes, release);
|
|
217
376
|
}
|
|
218
377
|
catch (err) {
|
|
219
378
|
logger?.error(`MCP handler error: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-handler.js","sourceRoot":"","sources":["../../src/transport/http-handler.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"http-handler.js","sourceRoot":"","sources":["../../src/transport/http-handler.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAExF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,oBAAoB,GAIrB,MAAM,iBAAiB,CAAC;AAEzB,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,mEAAmE;AACnE,MAAM,gBAAgB,GAA2B;IAC/C,wBAAwB,EAAE,SAAS;IACnC,iBAAiB,EAAE,MAAM;IACzB,eAAe,EAAE,UAAU;CAC5B,CAAC;AAEF,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc;IACd,eAAe;IACf,YAAY;IACZ,UAAU;IACV,sBAAsB;IACtB,gBAAgB;IAChB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
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@get-technology-inc/jamf-docs-mcp-server",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "MCP Server for accessing Jamf Documentation (learn.jamf.com)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
"test:all": "vitest run test/unit && vitest run test/integration && vitest run test/e2e",
|
|
21
21
|
"test:coverage": "vitest run --coverage",
|
|
22
22
|
"test:inspector": "npx @modelcontextprotocol/inspector node dist/index.js",
|
|
23
|
-
"lint": "eslint src/**/*.ts",
|
|
23
|
+
"lint": "eslint 'src/**/*.ts' 'test/**/*.ts' 'app-ui/**/*.ts' 'scripts/**/*.mjs'",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
25
|
"clean": "rm -rf dist",
|
|
26
26
|
"prepublishOnly": "npm run build",
|
|
27
27
|
"build:app-ui": "node scripts/build-app-ui.mjs",
|
|
28
|
-
"typecheck:app-ui": "tsc --noEmit -p app-ui/tsconfig.json"
|
|
28
|
+
"typecheck:app-ui": "tsc --noEmit -p app-ui/tsconfig.json",
|
|
29
|
+
"typecheck:test": "tsc --noEmit -p test/tsconfig.json"
|
|
29
30
|
},
|
|
30
31
|
"keywords": [
|
|
31
32
|
"mcp",
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
}
|
|
87
88
|
},
|
|
88
89
|
"engines": {
|
|
89
|
-
"node": ">=
|
|
90
|
+
"node": ">=20"
|
|
90
91
|
},
|
|
91
92
|
"files": [
|
|
92
93
|
"dist",
|