myhotlunchbox-mcp 1.2.3 → 1.2.5
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +2 -1
- package/dist/bundle.js +103 -28
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "MCP server for My Hot Lunchbox — order school lunches, manage students, and track payments via natural language",
|
|
10
|
-
"version": "1.2.
|
|
10
|
+
"version": "1.2.5"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "My Hot Lunchbox",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "MCP server for My Hot Lunchbox — school lunch calendar, ordering, and payments. Signs in server-side with the parent account credentials.",
|
|
18
|
-
"version": "1.2.
|
|
18
|
+
"version": "1.2.5",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myhotlunchbox-mcp",
|
|
3
3
|
"displayName": "My Hot Lunchbox",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.5",
|
|
5
5
|
"description": "MCP server for My Hot Lunchbox — order school lunches, manage students, and track payments via natural language",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Hall",
|
package/README.md
CHANGED
|
@@ -87,7 +87,8 @@ changing any argument between the two calls is refused (`DRAFT_CHANGED`).
|
|
|
87
87
|
|
|
88
88
|
| variable | default | |
|
|
89
89
|
|---|---|---|
|
|
90
|
-
| `MCP_CONFIRM_MODE` | `ask-user` | What a write does on a client that cannot show a confirmation prompt (claude.ai, Claude Desktop). `ask-user`: two steps — the first call does nothing and returns a preview plus a token, and the model must get your approval in chat before calling again with it. `auto`: the same two steps, but the model may use the token after reviewing the preview itself. `refuse`: writes are refused on such clients. A client that can show prompts (Claude Code) always gets the real prompt
|
|
90
|
+
| `MCP_CONFIRM_MODE` | `ask-user` | What a write does on a client that cannot show a confirmation prompt (claude.ai, Claude Desktop). `ask-user`: two steps — the first call does nothing and returns a preview plus a token, and the model must get your approval in chat before calling again with it. `auto`: the same two steps, but the model may use the token after reviewing the preview itself. `refuse`: writes are refused on such clients. A client that can show prompts (Claude Code) always gets the real prompt, unless `MCP_CONFIRM_ELICITATION=off`. An unrecognised value is treated as `refuse`. |
|
|
91
|
+
| `MCP_CONFIRM_ELICITATION` | `on` | `off` never sends a confirmation prompt, so every client gets the `MCP_CONFIRM_MODE` path. Set it for a client that declares it can show prompts but never does (the gated call hangs — opencode 2.0.x). Any other value stays `on`, with a stderr warning. |
|
|
91
92
|
| `MCP_CONFIRM_TTL_SECONDS` | `600` | How long a token stays valid. |
|
|
92
93
|
| `MCP_CONFIRM_SECRET` | random per process | Signing key; set it only if tokens must survive a server restart. |
|
|
93
94
|
|
package/dist/bundle.js
CHANGED
|
@@ -24342,7 +24342,7 @@ var OAuthTokenRevocationRequestSchema = z.object({
|
|
|
24342
24342
|
token_type_hint: z.string().optional()
|
|
24343
24343
|
}).strip();
|
|
24344
24344
|
|
|
24345
|
-
// node_modules/@modelcontextprotocol/server/dist/src-
|
|
24345
|
+
// node_modules/@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs
|
|
24346
24346
|
var z2 = __toESM(require_v4(), 1);
|
|
24347
24347
|
var BRANDS = /* @__PURE__ */ Symbol.for("mcp.sdk.errorBrands");
|
|
24348
24348
|
function stampErrorBrands(instance, ctor) {
|
|
@@ -26586,7 +26586,8 @@ function build() {
|
|
|
26586
26586
|
ListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),
|
|
26587
26587
|
ReadResourceResultResponseSchema: wireResultResponse(z2.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),
|
|
26588
26588
|
CompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),
|
|
26589
|
-
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)
|
|
26589
|
+
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1),
|
|
26590
|
+
SubscriptionsListenResultResponseSchema: wireResultResponse(SubscriptionsListenResultSchema$1)
|
|
26590
26591
|
};
|
|
26591
26592
|
}
|
|
26592
26593
|
var memo;
|
|
@@ -27094,6 +27095,9 @@ function isSpecRequestMethod(method) {
|
|
|
27094
27095
|
function isSpecNotificationMethod(method) {
|
|
27095
27096
|
return ALL_CODECS.some((codec2) => codec2.hasNotificationMethod(method));
|
|
27096
27097
|
}
|
|
27098
|
+
function isExtensionReusedRequestMethod(method) {
|
|
27099
|
+
return method === "tasks/get" || method === "tasks/cancel";
|
|
27100
|
+
}
|
|
27097
27101
|
var ALL_CODECS = [rev2025Codec, rev2026Codec];
|
|
27098
27102
|
function isPlainObject$3(value) {
|
|
27099
27103
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -28102,6 +28106,8 @@ var Protocol = class {
|
|
|
28102
28106
|
_transport;
|
|
28103
28107
|
_requestMessageId = 0;
|
|
28104
28108
|
_requestHandlers = /* @__PURE__ */ new Map();
|
|
28109
|
+
/** Methods registered with an explicit schema; the era gate in `_onrequest` reads it for the Tasks extension names. */
|
|
28110
|
+
_customSchemaRequestMethods = /* @__PURE__ */ new Set();
|
|
28105
28111
|
_requestHandlerAbortControllers = /* @__PURE__ */ new Map();
|
|
28106
28112
|
_notificationHandlers = /* @__PURE__ */ new Map();
|
|
28107
28113
|
_responseHandlers = /* @__PURE__ */ new Map();
|
|
@@ -28385,7 +28391,7 @@ var Protocol = class {
|
|
|
28385
28391
|
return;
|
|
28386
28392
|
}
|
|
28387
28393
|
}
|
|
28388
|
-
if (isSpecRequestMethod(request.method) && !codec2.hasRequestMethod(request.method)) {
|
|
28394
|
+
if (isSpecRequestMethod(request.method) && !codec2.hasRequestMethod(request.method) && !(isExtensionReusedRequestMethod(request.method) && this._customSchemaRequestMethods.has(request.method))) {
|
|
28389
28395
|
sendErrorResponse(ProtocolErrorCode.MethodNotFound, "Method not found");
|
|
28390
28396
|
return;
|
|
28391
28397
|
}
|
|
@@ -28518,8 +28524,11 @@ var Protocol = class {
|
|
|
28518
28524
|
}
|
|
28519
28525
|
request(request, schemaOrOptions, maybeOptions) {
|
|
28520
28526
|
const codec2 = this._resolveOutboundCodec(request.method);
|
|
28527
|
+
if (isStandardSchema(schemaOrOptions)) {
|
|
28528
|
+
if (!isExtensionReusedRequestMethod(request.method)) this._assertOutboundRequestInEra(codec2, request.method);
|
|
28529
|
+
return this._requestWithSchemaViaCodec(codec2, request, schemaOrOptions, maybeOptions);
|
|
28530
|
+
}
|
|
28521
28531
|
this._assertOutboundRequestInEra(codec2, request.method);
|
|
28522
|
-
if (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec2, request, schemaOrOptions, maybeOptions);
|
|
28523
28532
|
const validate2 = codecResultValidator(codec2, request.method);
|
|
28524
28533
|
if (validate2 === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);
|
|
28525
28534
|
return this._requestWithSchemaViaCodec(codec2, request, validate2, schemaOrOptions);
|
|
@@ -28763,6 +28772,8 @@ var Protocol = class {
|
|
|
28763
28772
|
return maybeHandler(parsed.data, ctx);
|
|
28764
28773
|
};
|
|
28765
28774
|
else throw new TypeError("setRequestHandler: handler is required");
|
|
28775
|
+
if (typeof schemasOrHandler === "function") this._customSchemaRequestMethods.delete(method);
|
|
28776
|
+
else this._customSchemaRequestMethods.add(method);
|
|
28766
28777
|
this._requestHandlers.set(method, this._wrapHandler(method, stored));
|
|
28767
28778
|
}
|
|
28768
28779
|
/**
|
|
@@ -28792,6 +28803,7 @@ var Protocol = class {
|
|
|
28792
28803
|
*/
|
|
28793
28804
|
removeRequestHandler(method) {
|
|
28794
28805
|
this._requestHandlers.delete(method);
|
|
28806
|
+
this._customSchemaRequestMethods.delete(method);
|
|
28795
28807
|
}
|
|
28796
28808
|
/**
|
|
28797
28809
|
* Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
|
|
@@ -36034,7 +36046,7 @@ var Ajv = import_ajv.Ajv;
|
|
|
36034
36046
|
// node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs
|
|
36035
36047
|
import process2 from "node:process";
|
|
36036
36048
|
|
|
36037
|
-
// node_modules/@modelcontextprotocol/server/dist/mcp-
|
|
36049
|
+
// node_modules/@modelcontextprotocol/server/dist/mcp-DIH4cS6P.mjs
|
|
36038
36050
|
var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
|
|
36039
36051
|
function isCompletable(schema) {
|
|
36040
36052
|
return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
|
|
@@ -36099,7 +36111,7 @@ var StdioListenRouter = class {
|
|
|
36099
36111
|
_serverCapabilities;
|
|
36100
36112
|
/**
|
|
36101
36113
|
* The serving instance's identity, stamped onto the graceful-close
|
|
36102
|
-
* results' `_meta` (the spec's `
|
|
36114
|
+
* results' `_meta` (the spec's `SubscriptionsListenResultMetaObject` extends
|
|
36103
36115
|
* `ResultMetaObject`). Handed over together with the capabilities.
|
|
36104
36116
|
*/
|
|
36105
36117
|
_serverInfo;
|
|
@@ -36431,6 +36443,11 @@ var Server = class extends Protocol {
|
|
|
36431
36443
|
if (modernProtocolVersions(this._supportedProtocolVersions).length > 0) this.setRequestHandler("server/discover", () => this._ondiscover());
|
|
36432
36444
|
if (this._capabilities.logging) this._registerLoggingHandler();
|
|
36433
36445
|
}
|
|
36446
|
+
/** Attaches to the given transport; rejects while this instance is connected to another one. */
|
|
36447
|
+
async connect(transport) {
|
|
36448
|
+
if (this.transport !== void 0) throw new SdkError(SdkErrorCode.AlreadyConnected, "Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");
|
|
36449
|
+
await super.connect(transport);
|
|
36450
|
+
}
|
|
36434
36451
|
/**
|
|
36435
36452
|
* Registers the built-in `logging/setLevel` request handler.
|
|
36436
36453
|
*
|
|
@@ -36984,21 +37001,41 @@ var Server = class extends Protocol {
|
|
|
36984
37001
|
function discoverAdvertisedCapabilities(capabilities) {
|
|
36985
37002
|
return { ...capabilities };
|
|
36986
37003
|
}
|
|
37004
|
+
function toolInputElementCount(value, max) {
|
|
37005
|
+
let count = 0;
|
|
37006
|
+
const stack = [value];
|
|
37007
|
+
while (stack.length > 0) {
|
|
37008
|
+
const node2 = stack.pop();
|
|
37009
|
+
if (node2 === null || typeof node2 !== "object") continue;
|
|
37010
|
+
if (Array.isArray(node2)) for (const child of node2) {
|
|
37011
|
+
if (++count > max) return count;
|
|
37012
|
+
if (child !== null && typeof child === "object") stack.push(child);
|
|
37013
|
+
}
|
|
37014
|
+
else for (const key in node2) {
|
|
37015
|
+
if (!Object.prototype.hasOwnProperty.call(node2, key)) continue;
|
|
37016
|
+
if (++count > max) return count;
|
|
37017
|
+
const child = node2[key];
|
|
37018
|
+
if (child !== null && typeof child === "object") stack.push(child);
|
|
37019
|
+
}
|
|
37020
|
+
}
|
|
37021
|
+
return count;
|
|
37022
|
+
}
|
|
37023
|
+
function resolveMaxToolInputElements(value) {
|
|
37024
|
+
if (value === void 0 || value === Infinity) return void 0;
|
|
37025
|
+
if (typeof value !== "number" || Number.isNaN(value) || value < 1) throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(value)}`);
|
|
37026
|
+
return value;
|
|
37027
|
+
}
|
|
36987
37028
|
var McpServer = class {
|
|
36988
37029
|
/**
|
|
36989
37030
|
* The underlying {@linkcode Server} instance, useful for advanced operations like sending notifications.
|
|
36990
37031
|
*/
|
|
36991
37032
|
server;
|
|
37033
|
+
_maxToolInputElements;
|
|
36992
37034
|
_registeredResources = {};
|
|
36993
37035
|
_registeredResourceTemplates = {};
|
|
36994
37036
|
_registeredTools = {};
|
|
36995
37037
|
_registeredPrompts = {};
|
|
36996
|
-
/**
|
|
36997
|
-
* Per-tool JSON-converted `inputSchema`, memoized so the SEP-2243
|
|
36998
|
-
* registration-time scan and the pre-dispatch validation step share one
|
|
36999
|
-
* conversion instead of paying it twice per request under the
|
|
37000
|
-
* per-request-factory `createMcpHandler` model.
|
|
37001
|
-
*/
|
|
37038
|
+
/** Per-tool JSON-converted `inputSchema`, filled on first use by `toolInputSchemaJson()`. */
|
|
37002
37039
|
_toolInputSchemaJson = {};
|
|
37003
37040
|
/**
|
|
37004
37041
|
* The JSON-serialized `inputSchema` of a registered tool, or `undefined`
|
|
@@ -37023,6 +37060,7 @@ var McpServer = class {
|
|
|
37023
37060
|
}
|
|
37024
37061
|
constructor(serverInfo, options) {
|
|
37025
37062
|
this.server = new Server(serverInfo, options);
|
|
37063
|
+
this._maxToolInputElements = resolveMaxToolInputElements(options?.maxToolInputElements);
|
|
37026
37064
|
if (options?.capabilities?.tools) this.setToolRequestHandlers();
|
|
37027
37065
|
if (options?.capabilities?.resources) this.setResourceRequestHandlers();
|
|
37028
37066
|
if (options?.capabilities?.prompts) this.setPromptRequestHandlers();
|
|
@@ -37095,7 +37133,7 @@ var McpServer = class {
|
|
|
37095
37133
|
name,
|
|
37096
37134
|
title: tool.title,
|
|
37097
37135
|
description: tool.description,
|
|
37098
|
-
inputSchema: tool.inputSchema ?
|
|
37136
|
+
inputSchema: tool.inputSchema ? convertListedInputSchema(name, tool.inputSchema) : EMPTY_OBJECT_JSON_SCHEMA,
|
|
37099
37137
|
annotations: tool.annotations,
|
|
37100
37138
|
icons: tool.icons,
|
|
37101
37139
|
execution: tool.execution,
|
|
@@ -37140,6 +37178,7 @@ var McpServer = class {
|
|
|
37140
37178
|
* Validates tool input arguments against the tool's input schema.
|
|
37141
37179
|
*/
|
|
37142
37180
|
async validateToolInput(tool, args, toolName) {
|
|
37181
|
+
if (this._maxToolInputElements !== void 0 && toolInputElementCount(args, this._maxToolInputElements) > this._maxToolInputElements) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid arguments for tool ${toolName}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);
|
|
37143
37182
|
if (!tool.inputSchema) return;
|
|
37144
37183
|
const parseResult = await validateStandardSchema(tool.inputSchema, args ?? {});
|
|
37145
37184
|
if (!parseResult.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${parseResult.error}`);
|
|
@@ -37414,20 +37453,19 @@ var McpServer = class {
|
|
|
37414
37453
|
}
|
|
37415
37454
|
_createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, icons, execution, scopeChallenge, _meta, handler) {
|
|
37416
37455
|
validateAndWarnToolName(name);
|
|
37417
|
-
if (inputSchema !== void 0) try {
|
|
37418
|
-
const json2 = standardSchemaToJsonSchema(inputSchema, "input");
|
|
37419
|
-
this._toolInputSchemaJson[name] = json2;
|
|
37420
|
-
const scan = scanXMcpHeaderDeclarations(json2);
|
|
37421
|
-
if (!scan.valid) console.warn(`[mcp-sdk] tool '${name}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${scan.reason}`);
|
|
37422
|
-
} catch {
|
|
37423
|
-
}
|
|
37424
37456
|
let currentHandler = handler;
|
|
37457
|
+
let outputSchemaJson;
|
|
37425
37458
|
const registeredTool = {
|
|
37426
37459
|
title,
|
|
37427
37460
|
description,
|
|
37428
37461
|
inputSchema,
|
|
37429
37462
|
outputSchema,
|
|
37430
|
-
outputSchemaJson
|
|
37463
|
+
get outputSchemaJson() {
|
|
37464
|
+
return outputSchemaJson ??= convertOutputSchemaJson(registeredTool.outputSchema);
|
|
37465
|
+
},
|
|
37466
|
+
set outputSchemaJson(value) {
|
|
37467
|
+
outputSchemaJson = value;
|
|
37468
|
+
},
|
|
37431
37469
|
annotations,
|
|
37432
37470
|
icons,
|
|
37433
37471
|
execution,
|
|
@@ -37554,6 +37592,12 @@ var EMPTY_OBJECT_JSON_SCHEMA = {
|
|
|
37554
37592
|
type: "object",
|
|
37555
37593
|
properties: {}
|
|
37556
37594
|
};
|
|
37595
|
+
function convertListedInputSchema(name, inputSchema) {
|
|
37596
|
+
const json2 = standardSchemaToJsonSchema(inputSchema, "input");
|
|
37597
|
+
const scan = scanXMcpHeaderDeclarations(json2);
|
|
37598
|
+
if (!scan.valid) console.warn(`[mcp-sdk] tool '${name}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${scan.reason}`);
|
|
37599
|
+
return json2;
|
|
37600
|
+
}
|
|
37557
37601
|
function convertOutputSchemaJson(outputSchema) {
|
|
37558
37602
|
if (outputSchema === void 0) return void 0;
|
|
37559
37603
|
try {
|
|
@@ -37566,7 +37610,7 @@ function createPromptHandler(name, argsSchema, callback) {
|
|
|
37566
37610
|
if (argsSchema) {
|
|
37567
37611
|
const typedCallback = callback;
|
|
37568
37612
|
return async (args, ctx) => {
|
|
37569
|
-
const parseResult = await validateStandardSchema(argsSchema, args);
|
|
37613
|
+
const parseResult = await validateStandardSchema(argsSchema, args ?? {});
|
|
37570
37614
|
if (!parseResult.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid arguments for prompt ${name}: ${parseResult.error}`);
|
|
37571
37615
|
return typedCallback(parseResult.data, ctx);
|
|
37572
37616
|
};
|
|
@@ -57958,6 +58002,7 @@ function escapeKey(key) {
|
|
|
57958
58002
|
var DEFAULT_REQUEST_KEY = "confirmation";
|
|
57959
58003
|
var DEFAULT_CONFIRMATION_LABEL = "Confirm this action should proceed.";
|
|
57960
58004
|
var UNSUPPORTED_NOTE = "Nothing was done because this client cannot show a confirmation prompt (it declares no MCP elicitation capability), and this action is never taken without one";
|
|
58005
|
+
var DISABLED_NOTE = "Nothing was done because confirmation prompts are turned off for this server, and this action is never taken without one";
|
|
57961
58006
|
var STATE_PREFIX = "mcpu.confirm.v1.";
|
|
57962
58007
|
function bindingKey(binding) {
|
|
57963
58008
|
if (binding.ttlSeconds !== void 0 && !(Number.isFinite(binding.ttlSeconds) && binding.ttlSeconds > 0)) {
|
|
@@ -58030,6 +58075,15 @@ ${JSON.stringify(preview, null, 2)}`,
|
|
|
58030
58075
|
};
|
|
58031
58076
|
const response = inputResponse(ctx.mcpReq.inputResponses, requestKey);
|
|
58032
58077
|
const accepted = acceptedContent(ctx.mcpReq.inputResponses, requestKey, confirmationSchema);
|
|
58078
|
+
if (options.elicitation === false) {
|
|
58079
|
+
return textResult({
|
|
58080
|
+
confirmed: false,
|
|
58081
|
+
dispatched: false,
|
|
58082
|
+
action: options.action,
|
|
58083
|
+
reason: "confirmation-unsupported",
|
|
58084
|
+
note: options.unsupportedNote ? `${DISABLED_NOTE}. ${options.unsupportedNote}` : `${DISABLED_NOTE}.`
|
|
58085
|
+
});
|
|
58086
|
+
}
|
|
58033
58087
|
if (response.kind === "missing") {
|
|
58034
58088
|
if (callerAcceptsFormElicitation(ctx) === false) {
|
|
58035
58089
|
return textResult({
|
|
@@ -58224,7 +58278,7 @@ async function tokenConfirmation(action, fb) {
|
|
|
58224
58278
|
}
|
|
58225
58279
|
async function requireConfirmationWithFallback(ctx, options) {
|
|
58226
58280
|
const { tokenFallback, ...confirmation } = options;
|
|
58227
|
-
if (tokenFallback && callerAcceptsFormElicitation(ctx) === false) {
|
|
58281
|
+
if (tokenFallback && (options.elicitation === false || callerAcceptsFormElicitation(ctx) === false)) {
|
|
58228
58282
|
return tokenConfirmation(options.action, tokenFallback);
|
|
58229
58283
|
}
|
|
58230
58284
|
return requireConfirmation(ctx, confirmation);
|
|
@@ -58375,6 +58429,20 @@ function readConfirmMode(env = process.env) {
|
|
|
58375
58429
|
}
|
|
58376
58430
|
return "refuse";
|
|
58377
58431
|
}
|
|
58432
|
+
function readConfirmElicitation(env = process.env) {
|
|
58433
|
+
const raw = readEnvVar("MCP_CONFIRM_ELICITATION", { env })?.trim().toLowerCase();
|
|
58434
|
+
if (!raw || raw === "on")
|
|
58435
|
+
return "on";
|
|
58436
|
+
if (raw === "off")
|
|
58437
|
+
return "off";
|
|
58438
|
+
const key = `elicitation:${raw}`;
|
|
58439
|
+
if (!warned.has(key)) {
|
|
58440
|
+
warned.add(key);
|
|
58441
|
+
process.stderr.write(`MCP_CONFIRM_ELICITATION="${raw}" is not one of on, off; treating it as on.
|
|
58442
|
+
`);
|
|
58443
|
+
}
|
|
58444
|
+
return "on";
|
|
58445
|
+
}
|
|
58378
58446
|
function readConfirmTtl(env) {
|
|
58379
58447
|
const raw = readEnvVar("MCP_CONFIRM_TTL_SECONDS", { env })?.trim();
|
|
58380
58448
|
if (!raw)
|
|
@@ -58419,6 +58487,7 @@ function spentTokenStoreFromEnv(env = process.env) {
|
|
|
58419
58487
|
}
|
|
58420
58488
|
var CONFIRM_TOKEN_AUTO_INSTRUCTION = "Nothing has been done yet. Review this preview; if it is what was intended, call again with the same arguments plus confirmToken. (This server runs with MCP_CONFIRM_MODE=auto, so the user's approval in chat is not required.)";
|
|
58421
58489
|
var REFUSE_HINT = "Set MCP_CONFIRM_MODE=ask-user on the server to allow two-step confirmation instead.";
|
|
58490
|
+
var ELICITATION_OFF_HINT = "MCP_CONFIRM_ELICITATION=off on the server turns confirmation prompts off.";
|
|
58422
58491
|
var BAD_TTL_HINT = "MCP_CONFIRM_TTL_SECONDS on the server is not a positive whole number of seconds; fix it to allow two-step confirmation.";
|
|
58423
58492
|
function boundArgs(args) {
|
|
58424
58493
|
if (args === null || typeof args !== "object" || Array.isArray(args) || !("confirmToken" in args))
|
|
@@ -58432,10 +58501,13 @@ function confirmationFromEnv(options) {
|
|
|
58432
58501
|
const spent = callerSpent ?? spentTokenStoreFromEnv(env);
|
|
58433
58502
|
const mode = readConfirmMode(env);
|
|
58434
58503
|
const ttlSeconds = readConfirmTtl(env);
|
|
58504
|
+
const elicitationOff = readConfirmElicitation(env) === "off";
|
|
58435
58505
|
const bound = args === void 0 ? void 0 : boundArgs(args);
|
|
58436
|
-
const
|
|
58506
|
+
const bindingAdded = bound === void 0 || rest.binding ? rest : { ...rest, binding: { key: confirmKeyFromEnv(env), args: bound, ttlSeconds: ttlSeconds ?? DEFAULT_TTL_SECONDS2 } };
|
|
58507
|
+
const confirmation = elicitationOff ? { ...bindingAdded, elicitation: false } : bindingAdded;
|
|
58437
58508
|
if (mode === "refuse" || ttlSeconds === void 0) {
|
|
58438
|
-
const
|
|
58509
|
+
const reason = mode === "refuse" ? REFUSE_HINT : BAD_TTL_HINT;
|
|
58510
|
+
const hint = elicitationOff ? `${ELICITATION_OFF_HINT} ${reason}` : reason;
|
|
58439
58511
|
return {
|
|
58440
58512
|
...confirmation,
|
|
58441
58513
|
unsupportedNote: confirmation.unsupportedNote ? `${confirmation.unsupportedNote} ${hint}` : hint
|
|
@@ -58607,7 +58679,10 @@ function surfaceToolHints(server) {
|
|
|
58607
58679
|
));
|
|
58608
58680
|
}
|
|
58609
58681
|
async function createMcpServer(opts) {
|
|
58610
|
-
const server = new McpServer({ name: opts.name, version: opts.version }, {
|
|
58682
|
+
const server = new McpServer({ name: opts.name, version: opts.version }, {
|
|
58683
|
+
supportedProtocolVersions: [...SERVER_PROTOCOL_VERSIONS],
|
|
58684
|
+
...opts.maxToolInputElements !== void 0 ? { maxToolInputElements: opts.maxToolInputElements } : {}
|
|
58685
|
+
});
|
|
58611
58686
|
if (opts.surfaceHints !== false)
|
|
58612
58687
|
surfaceToolHints(server);
|
|
58613
58688
|
if (opts.banner !== void 0) {
|
|
@@ -59884,7 +59959,7 @@ var MhlbClient = class {
|
|
|
59884
59959
|
};
|
|
59885
59960
|
|
|
59886
59961
|
// src/version.ts
|
|
59887
|
-
var VERSION = "1.2.
|
|
59962
|
+
var VERSION = "1.2.5";
|
|
59888
59963
|
|
|
59889
59964
|
// src/tools/_shared.ts
|
|
59890
59965
|
var CONFIRMS = ` ${CONFIRM_FLOW_SENTENCE}`;
|
|
@@ -60902,7 +60977,7 @@ await runMcp({
|
|
|
60902
60977
|
});
|
|
60903
60978
|
/*! Bundled license information:
|
|
60904
60979
|
|
|
60905
|
-
@modelcontextprotocol/server/dist/src-
|
|
60980
|
+
@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs:
|
|
60906
60981
|
(*!
|
|
60907
60982
|
* content-type
|
|
60908
60983
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Single source of truth for the server version; release-please rewrites it. */
|
|
2
|
-
export const VERSION = '1.2.
|
|
2
|
+
export const VERSION = '1.2.5'; // x-release-please-version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myhotlunchbox-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"mcpName": "io.github.chrischall/myhotlunchbox-mcp",
|
|
5
5
|
"description": "My Hot Lunchbox MCP server for Claude — developed and maintained by AI (Claude Code)",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"capture:writes": "node scripts/capture-writes.mjs"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@chrischall/mcp-utils": "^2.
|
|
49
|
-
"@modelcontextprotocol/server": "^2.
|
|
48
|
+
"@chrischall/mcp-utils": "^2.15.0",
|
|
49
|
+
"@modelcontextprotocol/server": "^2.3.0",
|
|
50
50
|
"dotenv": "^18.0.0",
|
|
51
51
|
"zod": "^4.6.5"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@modelcontextprotocol/client": "^2.
|
|
54
|
+
"@modelcontextprotocol/client": "^2.3.0",
|
|
55
55
|
"@types/node": "^26.0.0",
|
|
56
56
|
"@vitest/coverage-v8": "^5.0.0",
|
|
57
57
|
"esbuild": "^0.28.0",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/myhotlunchbox-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.2.
|
|
9
|
+
"version": "1.2.5",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "myhotlunchbox-mcp",
|
|
14
|
-
"version": "1.2.
|
|
14
|
+
"version": "1.2.5",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|