untappd-mcp 2.2.4 → 2.3.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "MCP server for Untappd — beers, breweries, venues, check-ins, wishlists, and your friend feed",
10
- "version": "2.2.4"
10
+ "version": "2.3.0"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "Untappd",
16
16
  "source": "./",
17
17
  "description": "MCP server for Untappd — search beers/breweries/venues, read profiles/check-ins/wishlists, and post check-ins, toasts, and comments",
18
- "version": "2.2.4",
18
+ "version": "2.3.0",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "untappd-mcp",
3
3
  "displayName": "Untappd",
4
- "version": "2.2.4",
4
+ "version": "2.3.0",
5
5
  "description": "MCP server for Untappd — search beers/breweries/venues, read check-ins and wishlists, and post check-ins, toasts, and comments",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/README.md CHANGED
@@ -43,7 +43,7 @@ Copy `.env.example` to `.env` and fill it in for local use.
43
43
  ### Confirmations
44
44
 
45
45
  Every write asks you to confirm it first. A client that can show a confirmation
46
- prompt (Claude Code) shows one. Elsewhere the write takes two calls: the first
46
+ prompt (Claude Code) shows one (unless `MCP_CONFIRM_ELICITATION=off`). Elsewhere the write takes two calls: the first
47
47
  does nothing and returns a preview of the exact request plus a `confirmToken`,
48
48
  and only a repeat call with the same arguments and that token performs it. A
49
49
  token works once, for that tool and those arguments only; change anything and
@@ -51,7 +51,8 @@ the call is refused with a fresh preview.
51
51
 
52
52
  | variable | default | |
53
53
  |---|---|---|
54
- | `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. An unrecognised value is treated as `refuse`. |
54
+ | `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`. |
55
+ | `MCP_CONFIRM_ELICITATION` | `on` | `off` never shows a confirmation prompt, so every client gets the `MCP_CONFIRM_MODE` behaviour. Set it for a client that says it can show prompts but never does (the write hangs — opencode 2.0.x). Any other value is treated as `on`, with a warning on stderr. |
55
56
  | `MCP_CONFIRM_TTL_SECONDS` | `600` | How long a token stays valid. |
56
57
  | `MCP_CONFIRM_SECRET` | random per process | Signing key; set it only if tokens must survive a server restart. |
57
58
 
package/dist/bundle.js CHANGED
@@ -58029,6 +58029,7 @@ function escapeKey(key) {
58029
58029
  var DEFAULT_REQUEST_KEY = "confirmation";
58030
58030
  var DEFAULT_CONFIRMATION_LABEL = "Confirm this action should proceed.";
58031
58031
  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";
58032
+ var DISABLED_NOTE = "Nothing was done because confirmation prompts are turned off for this server, and this action is never taken without one";
58032
58033
  var STATE_PREFIX = "mcpu.confirm.v1.";
58033
58034
  function bindingKey(binding) {
58034
58035
  if (binding.ttlSeconds !== void 0 && !(Number.isFinite(binding.ttlSeconds) && binding.ttlSeconds > 0)) {
@@ -58101,6 +58102,15 @@ ${JSON.stringify(preview, null, 2)}`,
58101
58102
  };
58102
58103
  const response = inputResponse(ctx.mcpReq.inputResponses, requestKey);
58103
58104
  const accepted = acceptedContent(ctx.mcpReq.inputResponses, requestKey, confirmationSchema);
58105
+ if (options.elicitation === false) {
58106
+ return textResult({
58107
+ confirmed: false,
58108
+ dispatched: false,
58109
+ action: options.action,
58110
+ reason: "confirmation-unsupported",
58111
+ note: options.unsupportedNote ? `${DISABLED_NOTE}. ${options.unsupportedNote}` : `${DISABLED_NOTE}.`
58112
+ });
58113
+ }
58104
58114
  if (response.kind === "missing") {
58105
58115
  if (callerAcceptsFormElicitation(ctx) === false) {
58106
58116
  return textResult({
@@ -58295,7 +58305,7 @@ async function tokenConfirmation(action, fb) {
58295
58305
  }
58296
58306
  async function requireConfirmationWithFallback(ctx, options) {
58297
58307
  const { tokenFallback, ...confirmation } = options;
58298
- if (tokenFallback && callerAcceptsFormElicitation(ctx) === false) {
58308
+ if (tokenFallback && (options.elicitation === false || callerAcceptsFormElicitation(ctx) === false)) {
58299
58309
  return tokenConfirmation(options.action, tokenFallback);
58300
58310
  }
58301
58311
  return requireConfirmation(ctx, confirmation);
@@ -58443,6 +58453,20 @@ function readConfirmMode(env = process.env) {
58443
58453
  }
58444
58454
  return "refuse";
58445
58455
  }
58456
+ function readConfirmElicitation(env = process.env) {
58457
+ const raw = readEnvVar("MCP_CONFIRM_ELICITATION", { env })?.trim().toLowerCase();
58458
+ if (!raw || raw === "on")
58459
+ return "on";
58460
+ if (raw === "off")
58461
+ return "off";
58462
+ const key = `elicitation:${raw}`;
58463
+ if (!warned.has(key)) {
58464
+ warned.add(key);
58465
+ process.stderr.write(`MCP_CONFIRM_ELICITATION="${raw}" is not one of on, off; treating it as on.
58466
+ `);
58467
+ }
58468
+ return "on";
58469
+ }
58446
58470
  function readConfirmTtl(env) {
58447
58471
  const raw = readEnvVar("MCP_CONFIRM_TTL_SECONDS", { env })?.trim();
58448
58472
  if (!raw)
@@ -58487,6 +58511,7 @@ function spentTokenStoreFromEnv(env = process.env) {
58487
58511
  }
58488
58512
  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.)";
58489
58513
  var REFUSE_HINT = "Set MCP_CONFIRM_MODE=ask-user on the server to allow two-step confirmation instead.";
58514
+ var ELICITATION_OFF_HINT = "MCP_CONFIRM_ELICITATION=off on the server turns confirmation prompts off.";
58490
58515
  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.";
58491
58516
  function boundArgs(args) {
58492
58517
  if (args === null || typeof args !== "object" || Array.isArray(args) || !("confirmToken" in args))
@@ -58500,10 +58525,13 @@ function confirmationFromEnv(options) {
58500
58525
  const spent = callerSpent ?? spentTokenStoreFromEnv(env);
58501
58526
  const mode = readConfirmMode(env);
58502
58527
  const ttlSeconds = readConfirmTtl(env);
58528
+ const elicitationOff = readConfirmElicitation(env) === "off";
58503
58529
  const bound = args === void 0 ? void 0 : boundArgs(args);
58504
- const confirmation = bound === void 0 || rest.binding ? rest : { ...rest, binding: { key: confirmKeyFromEnv(env), args: bound, ttlSeconds: ttlSeconds ?? DEFAULT_TTL_SECONDS2 } };
58530
+ const bindingAdded = bound === void 0 || rest.binding ? rest : { ...rest, binding: { key: confirmKeyFromEnv(env), args: bound, ttlSeconds: ttlSeconds ?? DEFAULT_TTL_SECONDS2 } };
58531
+ const confirmation = elicitationOff ? { ...bindingAdded, elicitation: false } : bindingAdded;
58505
58532
  if (mode === "refuse" || ttlSeconds === void 0) {
58506
- const hint = mode === "refuse" ? REFUSE_HINT : BAD_TTL_HINT;
58533
+ const reason = mode === "refuse" ? REFUSE_HINT : BAD_TTL_HINT;
58534
+ const hint = elicitationOff ? `${ELICITATION_OFF_HINT} ${reason}` : reason;
58507
58535
  return {
58508
58536
  ...confirmation,
58509
58537
  unsupportedNote: confirmation.unsupportedNote ? `${confirmation.unsupportedNote} ${hint}` : hint
@@ -58909,7 +58937,7 @@ function toolAnnotations(opts = {}) {
58909
58937
  }
58910
58938
 
58911
58939
  // src/version.ts
58912
- var VERSION = "2.2.4";
58940
+ var VERSION = "2.3.0";
58913
58941
 
58914
58942
  // src/client.ts
58915
58943
  import { dirname as dirname2, join as join4 } from "path";
package/dist/version.js CHANGED
@@ -3,4 +3,4 @@
3
3
  // json's `extra-files`), and `versionSyncTest` guards that it stays equal to
4
4
  // package.json. Import VERSION wherever the version is needed rather than
5
5
  // re-declaring it.
6
- export const VERSION = '2.2.4'; // x-release-please-version
6
+ export const VERSION = '2.3.0'; // x-release-please-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "untappd-mcp",
3
- "version": "2.2.4",
3
+ "version": "2.3.0",
4
4
  "mcpName": "io.github.chrischall/untappd-mcp",
5
5
  "description": "Untappd MCP server for Claude — developed and maintained by AI (Claude Code)",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -45,7 +45,7 @@
45
45
  "typecheck": "tsc -p tsconfig.json --noEmit"
46
46
  },
47
47
  "dependencies": {
48
- "@chrischall/mcp-utils": "^2.14.0",
48
+ "@chrischall/mcp-utils": "^2.15.0",
49
49
  "@modelcontextprotocol/server": "^2.3.0",
50
50
  "ai": "^7.0.19",
51
51
  "dotenv": "^18.0.1",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/chrischall/untappd-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "2.2.4",
9
+ "version": "2.3.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "untappd-mcp",
14
- "version": "2.2.4",
14
+ "version": "2.3.0",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },