@cyanheads/mcp-ts-core 0.11.4 → 0.11.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/AGENTS.md +2 -2
- package/CLAUDE.md +2 -2
- package/README.md +1 -1
- package/changelog/0.11.x/0.11.5.md +28 -0
- package/changelog/template.md +55 -16
- package/dist/logs/combined.log +22 -0
- package/dist/logs/error.log +18 -0
- package/dist/logs/interactions.log +0 -0
- package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.js +67 -4
- package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
- package/dist/mcp-server/transports/http/sessionStore.d.ts +25 -2
- package/dist/mcp-server/transports/http/sessionStore.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/sessionStore.js +58 -4
- package/dist/mcp-server/transports/http/sessionStore.js.map +1 -1
- package/package.json +1 -1
- package/skills/api-canvas/SKILL.md +2 -2
- package/skills/design-mcp-server/SKILL.md +4 -2
- package/skills/git-wrapup/SKILL.md +3 -3
- package/templates/.github/CODE_OF_CONDUCT.md +28 -0
- package/templates/.github/CONTRIBUTING.md +50 -0
- package/templates/.github/SECURITY.md +24 -0
- package/templates/changelog/template.md +55 -16
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Package:** `@cyanheads/mcp-ts-core`
|
|
4
|
-
**Version:** 0.11.
|
|
4
|
+
**Version:** 0.11.5
|
|
5
5
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
6
6
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
|
|
7
7
|
**Zod:** ^4.4.3
|
|
@@ -22,7 +22,7 @@ This package serves two consumer paths. When making changes, know which audience
|
|
|
22
22
|
| **Direct package import** — existing project pulls in the package | `bun add @cyanheads/mcp-ts-core` → `import { createApp, tool, z } from '@cyanheads/mcp-ts-core'` | Public API surface (`src/`) — existing consumers feel changes immediately on upgrade |
|
|
23
23
|
| **Init-scaffolded server** — fresh project bootstrapped from this repo's templates | `bunx @cyanheads/mcp-ts-core init [name]` copies `templates/` into the new directory | `templates/` — only affects newly scaffolded servers, not existing ones |
|
|
24
24
|
|
|
25
|
-
Both paths share the same public API. Init copies starter `package.json`, configs (`tsconfig`, `biome.json`, `vitest.config.ts`, `devcheck.config.json`, `bunfig.toml`), `.env.example`, `Dockerfile`, `LICENSE`, `.gitattributes`, `CLAUDE.md`/`AGENTS.md`, example definitions and tests, framework `scripts/`, and external-audience `skills/`. `_`-prefixed files (e.g. `_.gitignore`) drop the prefix on copy. Existing files are never overwritten; `init` without a name scaffolds in place (upgrade flow). After init, consult the `setup` skill.
|
|
25
|
+
Both paths share the same public API. Init copies starter `package.json`, configs (`tsconfig`, `biome.json`, `vitest.config.ts`, `devcheck.config.json`, `bunfig.toml`), `.env.example`, `Dockerfile`, `LICENSE`, `.gitattributes`, `CLAUDE.md`/`AGENTS.md`, `.github/` (issue forms, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`), example definitions and tests, framework `scripts/`, and external-audience `skills/`. `_`-prefixed files (e.g. `_.gitignore`) drop the prefix on copy. Existing files are never overwritten; `init` without a name scaffolds in place (upgrade flow). After init, consult the `setup` skill.
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Package:** `@cyanheads/mcp-ts-core`
|
|
4
|
-
**Version:** 0.11.
|
|
4
|
+
**Version:** 0.11.5
|
|
5
5
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
6
6
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
|
|
7
7
|
**Zod:** ^4.4.3
|
|
@@ -22,7 +22,7 @@ This package serves two consumer paths. When making changes, know which audience
|
|
|
22
22
|
| **Direct package import** — existing project pulls in the package | `bun add @cyanheads/mcp-ts-core` → `import { createApp, tool, z } from '@cyanheads/mcp-ts-core'` | Public API surface (`src/`) — existing consumers feel changes immediately on upgrade |
|
|
23
23
|
| **Init-scaffolded server** — fresh project bootstrapped from this repo's templates | `bunx @cyanheads/mcp-ts-core init [name]` copies `templates/` into the new directory | `templates/` — only affects newly scaffolded servers, not existing ones |
|
|
24
24
|
|
|
25
|
-
Both paths share the same public API. Init copies starter `package.json`, configs (`tsconfig`, `biome.json`, `vitest.config.ts`, `devcheck.config.json`, `bunfig.toml`), `.env.example`, `Dockerfile`, `LICENSE`, `.gitattributes`, `CLAUDE.md`/`AGENTS.md`, example definitions and tests, framework `scripts/`, and external-audience `skills/`. `_`-prefixed files (e.g. `_.gitignore`) drop the prefix on copy. Existing files are never overwritten; `init` without a name scaffolds in place (upgrade flow). After init, consult the `setup` skill.
|
|
25
|
+
Both paths share the same public API. Init copies starter `package.json`, configs (`tsconfig`, `biome.json`, `vitest.config.ts`, `devcheck.config.json`, `bunfig.toml`), `.env.example`, `Dockerfile`, `LICENSE`, `.gitattributes`, `CLAUDE.md`/`AGENTS.md`, `.github/` (issue forms, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`), example definitions and tests, framework `scripts/`, and external-audience `skills/`. `_`-prefixed files (e.g. `_.gitignore`) drop the prefix on copy. Existing files are never overwritten; `init` without a name scaffolds in place (upgrade flow). After init, consult the `setup` skill.
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
7
7
|
|
|
8
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx)
|
|
9
9
|
|
|
10
10
|
[](https://modelcontextprotocol.io/) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Server-initiated requests survive the stateful HTTP request boundary, so ctx.elicit completes over Streamable HTTP instead of stranding the handler; init scaffolds the .github community-health files."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
agent-notes: |
|
|
6
|
+
An `init` run — including in place, since `init` only skips files that already
|
|
7
|
+
exist — now writes `.github/CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, and
|
|
8
|
+
`SECURITY.md`. `SECURITY.md` ships a `[your-contact-email]` placeholder and
|
|
9
|
+
`CONTRIBUTING.md` a commented-out PR-policy line; fill both in.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# 0.11.5 — 2026-08-12
|
|
13
|
+
|
|
14
|
+
## Added
|
|
15
|
+
|
|
16
|
+
- **`.github/` community-health files scaffold with `init`** — `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, and `SECURITY.md` under `templates/.github/`, alongside the issue forms already there. This repo gains its own two and enables blank issues, so a report fitting neither form has a path.
|
|
17
|
+
|
|
18
|
+
## Changed
|
|
19
|
+
|
|
20
|
+
- **`changelog/template.md`'s authoring guide states the length ceiling** — bullet shape, ~40 words or two sentences, a list of what to cut, and a worked example of the same fact at both sizes. `templates/changelog/template.md` mirrors it and `git-wrapup` 1.10 carries the matching tone rule.
|
|
21
|
+
- **`api-canvas` 2.1** — the dataframe trio ships together wherever canvas is integrated: `dataframe_query` and `dataframe_describe` are both required, and `dataframe_drop` is opt-in behind a server env var, registered via `disabledTool()` while the flag is off.
|
|
22
|
+
- **`design-mcp-server` 2.21** — a server name must not overclaim breadth on either axis (one provider's API is not aggregation; one jurisdiction belongs in the name), and the tool prefix is a separate identifier that a later repo rename need not move.
|
|
23
|
+
- **`bun run test:package` typechecks, builds, and tests a scaffold installed from the packed tarball**, offline, so an undeclared template import can no longer resolve through the repository. A packaging test also pins `--omit=peer` onto both Dockerfiles' production install and OTEL add.
|
|
24
|
+
|
|
25
|
+
## Fixed
|
|
26
|
+
|
|
27
|
+
- **`ctx.elicit` completes over stateful Streamable HTTP.** Server-initiated requests now carry a session-unique wire ID registered on the `SessionStore`, so a response arriving on a later POST reaches the `Server` awaiting it rather than the fresh per-request instance handling that POST.
|
|
28
|
+
- **A terminated or stale HTTP session settles its pending server requests** with a `ConnectionClosed` error, instead of leaving the handler awaiting a response that can no longer arrive.
|
package/changelog/template.md
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
# to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
|
|
5
5
|
# with a concrete date.
|
|
6
6
|
|
|
7
|
-
# Required. One-line GitHub Release-style headline. 350 character cap
|
|
8
|
-
# Default short and scannable. Don't pad, don't stitch
|
|
9
|
-
#
|
|
10
|
-
#
|
|
7
|
+
# Required. One-line GitHub Release-style headline. 350 character cap — a
|
|
8
|
+
# ceiling, not a target. Default short and scannable. Don't pad, don't stitch
|
|
9
|
+
# unrelated changes with commas/semicolons into an inventory — pick the
|
|
10
|
+
# headline, like a tag's theme line. Quotes required: unquoted YAML treats
|
|
11
|
+
# `: ` inside the value as a key separator and fails GitHub's strict parser.
|
|
11
12
|
summary: ""
|
|
12
13
|
|
|
13
14
|
# Set `true` when consumers must change code to upgrade: API removals,
|
|
@@ -24,9 +25,10 @@ security: false
|
|
|
24
25
|
|
|
25
26
|
# Optional free-form notes for maintenance agents processing this release.
|
|
26
27
|
# Not rendered in CHANGELOG — consumed by agents running `maintenance` on
|
|
27
|
-
# downstream servers.
|
|
28
|
-
#
|
|
29
|
-
#
|
|
28
|
+
# downstream servers. ADOPTION STEPS ONLY — new files to create, fields to
|
|
29
|
+
# populate, one-time migration steps. Never a second rendering of the body:
|
|
30
|
+
# if a body bullet already says it, name the bullet's symbol instead of
|
|
31
|
+
# re-explaining. Omit the field entirely when there's nothing to say.
|
|
30
32
|
# agent-notes: |
|
|
31
33
|
# <instructions for downstream maintenance agents>
|
|
32
34
|
---
|
|
@@ -41,17 +43,54 @@ security: false
|
|
|
41
43
|
each bullet with the symbol or concept name in **bold** so they can skip
|
|
42
44
|
what's irrelevant and zoom in on what's not.
|
|
43
45
|
|
|
44
|
-
Tone: terse, fact-dense, not verbose.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
Tone: terse, fact-dense, not verbose. Bullet shape: **symbol** + what
|
|
47
|
+
changed + at most one consumer-facing caveat. One sentence by default, two
|
|
48
|
+
when the second carries weight — a bullet past ~40 words or three sentences
|
|
49
|
+
is wrong. The depth lives one hop away: the linked issue carries the why,
|
|
50
|
+
the commit diff carries the how. The changelog names what changed and what
|
|
51
|
+
a consumer does about it; a reader who wants mechanism opens the link.
|
|
52
|
+
|
|
53
|
+
Model length on THIS guide, never on the previous entry — entries modeled
|
|
54
|
+
on entries compound.
|
|
55
|
+
|
|
56
|
+
Cut (each has shipped as a wall of text; these are the cruft):
|
|
57
|
+
- History/justification narration — how the bug worked, why the old
|
|
58
|
+
behavior was wrong. One short clause at most; the issue carries the story.
|
|
59
|
+
- Design-rationale defense — "chosen over Y because…", "guarding the
|
|
60
|
+
getter is not enough…". That is the author arguing with a reviewer;
|
|
61
|
+
reviewers read the PR, not the changelog.
|
|
62
|
+
- Defensive unchanged-clauses — "X is unchanged", "byte-identical to
|
|
63
|
+
<prev>". Keep one only where its absence would cause a real misread,
|
|
64
|
+
as a short parenthetical.
|
|
65
|
+
- Edge-case inventories — marker lists, not-flagged lists, escape tables.
|
|
66
|
+
Tests and the issue carry those.
|
|
67
|
+
- Mechanism walkthroughs (JSDoc, CLAUDE.md/AGENTS.md, or the relevant
|
|
68
|
+
skill own those), ceremonial framings ("This release introduces…"),
|
|
69
|
+
backwards-compat paragraphs, file-by-file test enumerations. Prefer
|
|
70
|
+
code/symbol names over English re-explanations.
|
|
71
|
+
|
|
72
|
+
Verified ≠ included: the every-claim-verified-from-the-diff rule bounds
|
|
73
|
+
the TRUTH of what you write, never the AMOUNT.
|
|
74
|
+
|
|
75
|
+
Example — same fact, right size:
|
|
76
|
+
|
|
77
|
+
TOO LONG: **`fetchWithTimeout`'s `timeoutMs` bounds the whole exchange**
|
|
78
|
+
(#341). `fetch` resolves once headers arrive and the deadline was
|
|
79
|
+
cleared as the helper returned, so a peer that answered promptly and
|
|
80
|
+
then stalled the stream held the request open indefinitely. A 2xx
|
|
81
|
+
carrying a body now comes back as a passthrough wrapper that disarms
|
|
82
|
+
the deadline when the body closes, errors, or is cancelled; …
|
|
83
|
+
[+90 more words of mechanism and edge cases]
|
|
84
|
+
|
|
85
|
+
RIGHT: **`fetchWithTimeout`'s `timeoutMs` now bounds the whole
|
|
86
|
+
exchange, not just the headers** (#341). A stalled body aborts with
|
|
87
|
+
the same `Timeout` error; the returned `Response` is a wrapper, so
|
|
88
|
+
identity assertions (`toBe(response)`) no longer hold.
|
|
52
89
|
|
|
53
90
|
Narrative intro: skip by default. Add one short sentence only when the
|
|
54
|
-
release theme genuinely needs framing the bullets can't carry.
|
|
91
|
+
release theme genuinely needs framing the bullets can't carry. When many
|
|
92
|
+
bullets share one upgrade consequence, state it ONCE — intro line or
|
|
93
|
+
agent-notes — never per bullet.
|
|
55
94
|
|
|
56
95
|
Sections: Keep a Changelog order — Added, Changed, Deprecated, Removed,
|
|
57
96
|
Fixed, Security. Include only sections with entries; delete the rest
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{"level":50,"time":1786587207192,"env":"testing","version":"0.0.0-test","pid":55811,"requestId":"f2329fff-5675-4e20-960b-3b89dc4de0cd","timestamp":"2026-08-13T02:13:27.191Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"stdio-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"ac8ab5b7edb731c9268df12778d666f1","toolName":"auto_echo","errorData":{"taskId":"ac8ab5b7edb731c9268df12778d666f1","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: stdio-failure","originalStack":"Error: intentional task failure: stdio-failure\n at Object.handler (file:///Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:27)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:28)"},"stack":"McpError: intentional task failure: stdio-failure\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","msg":"Error in auto-task:auto_echo: intentional task failure: stdio-failure"}
|
|
2
|
+
{"level":50,"time":1786587214226,"env":"testing","version":"0.0.0-test","pid":55811,"requestId":"34d06d74-cbc7-4bf9-8697-a1c1efa30498","timestamp":"2026-08-13T02:13:34.225Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"97339f846d164bf6b822c6f3ab7879d1","toolName":"long_control","errorData":{"taskId":"97339f846d164bf6b822c6f3ab7879d1","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
3
|
+
{"level":50,"time":1786587215689,"env":"testing","version":"0.0.0-test","pid":55851,"requestId":"f8a9296e-ecad-4d89-ae36-03d8bb7146ad","timestamp":"2026-08-13T02:13:35.689Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"http-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"7e268ea849fb4c9ee67c0e840eb95eb0","toolName":"auto_echo","errorData":{"taskId":"7e268ea849fb4c9ee67c0e840eb95eb0","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: http-failure","originalStack":"Error: intentional task failure: http-failure\n at Object.handler (file:///Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:27)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:28)"},"stack":"McpError: intentional task failure: http-failure\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","msg":"Error in auto-task:auto_echo: intentional task failure: http-failure"}
|
|
4
|
+
{"level":50,"time":1786587222871,"env":"testing","version":"0.0.0-test","pid":55851,"requestId":"fffc253c-74ab-4fd3-a5dd-c14886196ac9","timestamp":"2026-08-13T02:13:42.871Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"49568958ba8bf82f6caa9b5f23878b74","toolName":"long_control","errorData":{"taskId":"49568958ba8bf82f6caa9b5f23878b74","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
5
|
+
{"level":40,"time":1786587223309,"env":"testing","version":"0.11.5","pid":55897,"transport":"http","requestId":"266NX-DRMYK","timestamp":"2026-08-13T02:13:43.308Z","operation":"TransportManager.start","component":"HttpTransportSetup","msg":"MCP_ALLOWED_ORIGINS is not set — CORS is wildcard for CLI clients; browser Origin headers are restricted to loopback. Set MCP_ALLOWED_ORIGINS for production deployments accepting remote browser origins."}
|
|
6
|
+
{"level":40,"time":1786587225201,"env":"testing","version":"0.11.5","pid":55897,"component":"HttpTransport","requestId":"B4121-8CUXS","timestamp":"2026-08-13T02:13:45.201Z","operation":"HttpRpcRequest","sessionId":"not-a-real-session-1786587225200","msg":"Session validation failed - invalid or hijacked session"}
|
|
7
|
+
{"level":50,"time":1786587228488,"env":"testing","version":"0.0.0-test","pid":55927,"requestId":"V7FDF-DP0S4","timestamp":"2026-08-13T02:13:48.487Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"164b0f5396d7e66484798e20df0a0aa4f90881c3349d8de0b6789f8f88d6b843","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"164b0f5396d7e66484798e20df0a0aa4f90881c3349d8de0b6789f8f88d6b843","toolName":"scoped_echo","requestId":"V7FDF-DP0S4","timestamp":"2026-08-13T02:13:48.487Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
8
|
+
{"level":50,"time":1786587228499,"env":"testing","version":"0.0.0-test","pid":55927,"requestId":"0PT9F-IS96K","timestamp":"2026-08-13T02:13:48.499Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"da1df465acb6d1da47f6afb0929d334fb251d35318426f1752254efb488e61d6","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"da1df465acb6d1da47f6afb0929d334fb251d35318426f1752254efb488e61d6","toolName":"scoped_echo","requestId":"0PT9F-IS96K","timestamp":"2026-08-13T02:13:48.499Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
9
|
+
{"level":50,"time":1786587230922,"env":"testing","version":"0.0.0-test","pid":55943,"requestId":"5X7AN-6XKAS","timestamp":"2026-08-13T02:13:50.918Z","operation":"HandleToolRequest","critical":false,"errorCode":-32602,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"1e6b675822dbe8b61a4020e2582bc88c5937b1e1afd9003e8d2145d6c92ca457","toolName":"session_elicitation_probe","errorData":{"reason":"elicitation_response_invalid","issues":[{"path":"value","code":"invalid_type"}],"sessionId":"1e6b675822dbe8b61a4020e2582bc88c5937b1e1afd9003e8d2145d6c92ca457","toolName":"session_elicitation_probe","requestId":"5X7AN-6XKAS","timestamp":"2026-08-13T02:13:50.918Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"Elicitation response content does not match the requested schema.","originalStack":"McpError: Elicitation response content does not match the requested schema.\n at invalidParams (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:78:58)\n at assertElicitedContent (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:26:11)\n at Object.formFn [as elicit] (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:69:13)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async Object.handler (file:///Users/casey/Developer/github/mcp-ts-core/tests/fixtures/http-protocol-session-server.js:50:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:212:28\n at async measureToolExecution (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:194:12)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:306:28\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32"},"stack":"McpError: Elicitation response content does not match the requested schema.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:session_elicitation_probe: Elicitation response content does not match the requested schema."}
|
|
10
|
+
{"level":50,"time":1786587230935,"env":"testing","version":"0.0.0-test","pid":55943,"requestId":"0J4GZ-52X01","timestamp":"2026-08-13T02:13:50.931Z","operation":"HandleToolRequest","critical":false,"errorCode":-32603,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"06ba48d957a5497eebd1bcdc46f35f99c8c46e65439e3035231c2717e2f15e3f","toolName":"session_elicitation_probe","errorData":{"sessionId":"06ba48d957a5497eebd1bcdc46f35f99c8c46e65439e3035231c2717e2f15e3f","toolName":"session_elicitation_probe","requestId":"0J4GZ-52X01","timestamp":"2026-08-13T02:13:50.931Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"MCP error -32602: Client refused the elicitation request.","originalStack":"McpError: MCP error -32602: Client refused the elicitation request.\n at McpError.fromError (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js:2048:16)\n at Server._onresponse (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:490:36)\n at _transport.onmessage (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:234:22)\n at Object.deliver (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:55:29)\n at SessionStore.routeServerResponse (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/sessionStore.js:208:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:626:38\n at Array.filter (<anonymous>)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:623:39\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)"},"stack":"McpError: MCP error -32602: Client refused the elicitation request.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:session_elicitation_probe: MCP error -32602: Client refused the elicitation request."}
|
|
11
|
+
{"level":50,"time":1786587231021,"env":"testing","version":"0.0.0-test","pid":55943,"requestId":"IKG5Z-ZRC90","timestamp":"2026-08-13T02:13:51.017Z","operation":"HandleToolRequest","critical":false,"errorCode":-32004,"originalErrorType":"AbortError","finalErrorType":"McpError","sessionId":"9cfa68fd06bea3003fbcdae970efafd4b54ea5b49bc2bfe9a888099e37741295","toolName":"session_cancellable_tool","errorData":{"sessionId":"9cfa68fd06bea3003fbcdae970efafd4b54ea5b49bc2bfe9a888099e37741295","toolName":"session_cancellable_tool","requestId":"IKG5Z-ZRC90","timestamp":"2026-08-13T02:13:51.017Z","operation":"HandleToolRequest","originalErrorName":"AbortError","originalMessage":"AbortError: cancel tool request","originalStack":"AbortError: AbortError: cancel tool request\n at new DOMException (node:internal/per_context/domexception:79:18)\n at SessionStore.cancelRequest (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/sessionStore.js:166:29)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:644:30\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:358:20\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:312:16\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)\n at async cors2 (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:76:5)"},"stack":"McpError: AbortError: cancel tool request\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
|
12
|
+
{"level":50,"time":1786587241316,"env":"testing","version":"0.0.0-test","pid":56023,"requestId":"61be143c-7657-453e-9110-30352866c484","timestamp":"2026-08-13T02:14:01.316Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"stdio-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"ee8662227fa5467d4a1a989958fdfc01","toolName":"auto_echo","errorData":{"taskId":"ee8662227fa5467d4a1a989958fdfc01","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: stdio-failure","originalStack":"Error: intentional task failure: stdio-failure\n at handler (/Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:31)\n at async runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:42)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: intentional task failure: stdio-failure\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:auto_echo: intentional task failure: stdio-failure"}
|
|
13
|
+
{"level":50,"time":1786587248382,"env":"testing","version":"0.0.0-test","pid":56023,"requestId":"3dfac909-5392-47a9-88e8-60d1aac7998d","timestamp":"2026-08-13T02:14:08.381Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"3ee3f4f482e0a099831113580b27ae78","toolName":"long_control","errorData":{"taskId":"3ee3f4f482e0a099831113580b27ae78","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
14
|
+
{"level":50,"time":1786587249679,"env":"testing","version":"0.0.0-test","pid":56062,"requestId":"30fc1d93-3755-4a5b-8c10-7950ed90a37e","timestamp":"2026-08-13T02:14:09.678Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"http-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"bdbb37189f0f574e0ba253b84fe59eb3","toolName":"auto_echo","errorData":{"taskId":"bdbb37189f0f574e0ba253b84fe59eb3","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: http-failure","originalStack":"Error: intentional task failure: http-failure\n at handler (/Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:31)\n at async runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:42)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: intentional task failure: http-failure\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:auto_echo: intentional task failure: http-failure"}
|
|
15
|
+
{"level":50,"time":1786587256826,"env":"testing","version":"0.0.0-test","pid":56062,"requestId":"d6aebeb6-8df3-41da-9c88-8245392951f5","timestamp":"2026-08-13T02:14:16.825Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"1dc5de9df5f2813bc528625ebcb26f02","toolName":"long_control","errorData":{"taskId":"1dc5de9df5f2813bc528625ebcb26f02","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
16
|
+
{"level":40,"time":1786587257067,"env":"testing","version":"0.11.5","pid":56106,"transport":"http","requestId":"R4G2X-O8783","timestamp":"2026-08-13T02:14:17.067Z","operation":"TransportManager.start","component":"HttpTransportSetup","msg":"MCP_ALLOWED_ORIGINS is not set — CORS is wildcard for CLI clients; browser Origin headers are restricted to loopback. Set MCP_ALLOWED_ORIGINS for production deployments accepting remote browser origins."}
|
|
17
|
+
{"level":40,"time":1786587258863,"env":"testing","version":"0.11.5","pid":56106,"component":"HttpTransport","requestId":"IN1UL-B7JW5","timestamp":"2026-08-13T02:14:18.863Z","operation":"HttpRpcRequest","sessionId":"not-a-real-session-1786587258862","msg":"Session validation failed - invalid or hijacked session"}
|
|
18
|
+
{"level":50,"time":1786587260986,"env":"testing","version":"0.0.0-test","pid":56135,"requestId":"1O3E3-DP8AC","timestamp":"2026-08-13T02:14:20.986Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"0a72407c6557c4b3a331a8213ac870a88349344596bf8981a51db854f105e588","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"0a72407c6557c4b3a331a8213ac870a88349344596bf8981a51db854f105e588","toolName":"scoped_echo","requestId":"1O3E3-DP8AC","timestamp":"2026-08-13T02:14:20.986Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
19
|
+
{"level":50,"time":1786587260994,"env":"testing","version":"0.0.0-test","pid":56135,"requestId":"CBMKP-O20TK","timestamp":"2026-08-13T02:14:20.994Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"9b0f4cf27f3fc78bc5d7e088047c8fc5204c88edcb5b4d9f03380a5e2684e9ca","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"9b0f4cf27f3fc78bc5d7e088047c8fc5204c88edcb5b4d9f03380a5e2684e9ca","toolName":"scoped_echo","requestId":"CBMKP-O20TK","timestamp":"2026-08-13T02:14:20.994Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
20
|
+
{"level":50,"time":1786587262572,"env":"testing","version":"0.0.0-test","pid":56148,"requestId":"RXKXK-ZNGJF","timestamp":"2026-08-13T02:14:22.569Z","operation":"HandleToolRequest","critical":false,"errorCode":-32602,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"6d95cfc46799cee8ec354ea235bbc0047af16776fd1d30ebd05272161da3b9ff","toolName":"session_elicitation_probe","errorData":{"reason":"elicitation_response_invalid","issues":[{"path":"value","code":"invalid_type"}],"sessionId":"6d95cfc46799cee8ec354ea235bbc0047af16776fd1d30ebd05272161da3b9ff","toolName":"session_elicitation_probe","requestId":"RXKXK-ZNGJF","timestamp":"2026-08-13T02:14:22.569Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"Elicitation response content does not match the requested schema.","originalStack":"McpError: Elicitation response content does not match the requested schema.\n at invalidParams (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:78:62)\n at assertElicitedContent (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:26:11)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:69:13)\n at async handler (/Users/casey/Developer/github/mcp-ts-core/tests/fixtures/http-protocol-session-server.js:50:30)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:212:34)\n at async measureToolExecution (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:194:25)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:306:34)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)"},"stack":"McpError: Elicitation response content does not match the requested schema.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_elicitation_probe: Elicitation response content does not match the requested schema."}
|
|
21
|
+
{"level":50,"time":1786587262580,"env":"testing","version":"0.0.0-test","pid":56148,"requestId":"X47C9-0LGGG","timestamp":"2026-08-13T02:14:22.578Z","operation":"HandleToolRequest","critical":false,"errorCode":-32603,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"f50b3cf6fc2f019ba54811c9b2aa89309eec20d4c11220d01ef05a4e5edad963","toolName":"session_elicitation_probe","errorData":{"sessionId":"f50b3cf6fc2f019ba54811c9b2aa89309eec20d4c11220d01ef05a4e5edad963","toolName":"session_elicitation_probe","requestId":"X47C9-0LGGG","timestamp":"2026-08-13T02:14:22.578Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"MCP error -32602: Client refused the elicitation request.","originalStack":"McpError: MCP error -32602: Client refused the elicitation request.\n at fromError (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js:2048:20)\n at _onresponse (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:490:36)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:234:22)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:55:18)\n at routeServerResponse (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/sessionStore.js:208:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:626:38)\n at filter (native:1:11)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:623:39)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:358:26)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:312:22)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:76:11)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/hono-base.js:307:31)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: MCP error -32602: Client refused the elicitation request.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_elicitation_probe: MCP error -32602: Client refused the elicitation request."}
|
|
22
|
+
{"level":50,"time":1786587262653,"env":"testing","version":"0.0.0-test","pid":56148,"requestId":"5KYGH-LMTHY","timestamp":"2026-08-13T02:14:22.651Z","operation":"HandleToolRequest","critical":false,"errorCode":-32004,"originalErrorType":"AbortError","finalErrorType":"McpError","sessionId":"3d74267a99633ef41a291060a6a52f06aa50143237ad9d1dc58aab9f50d0ae34","toolName":"session_cancellable_tool","errorData":{"sessionId":"3d74267a99633ef41a291060a6a52f06aa50143237ad9d1dc58aab9f50d0ae34","toolName":"session_cancellable_tool","requestId":"5KYGH-LMTHY","timestamp":"2026-08-13T02:14:22.651Z","operation":"HandleToolRequest","originalErrorName":"AbortError","originalMessage":"AbortError: cancel tool request"},"stack":"McpError: AbortError: cancel tool request\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{"level":50,"time":1786587207192,"env":"testing","version":"0.0.0-test","pid":55811,"requestId":"f2329fff-5675-4e20-960b-3b89dc4de0cd","timestamp":"2026-08-13T02:13:27.191Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"stdio-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"ac8ab5b7edb731c9268df12778d666f1","toolName":"auto_echo","errorData":{"taskId":"ac8ab5b7edb731c9268df12778d666f1","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: stdio-failure","originalStack":"Error: intentional task failure: stdio-failure\n at Object.handler (file:///Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:27)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:28)"},"stack":"McpError: intentional task failure: stdio-failure\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","msg":"Error in auto-task:auto_echo: intentional task failure: stdio-failure"}
|
|
2
|
+
{"level":50,"time":1786587214226,"env":"testing","version":"0.0.0-test","pid":55811,"requestId":"34d06d74-cbc7-4bf9-8697-a1c1efa30498","timestamp":"2026-08-13T02:13:34.225Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"97339f846d164bf6b822c6f3ab7879d1","toolName":"long_control","errorData":{"taskId":"97339f846d164bf6b822c6f3ab7879d1","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
3
|
+
{"level":50,"time":1786587215689,"env":"testing","version":"0.0.0-test","pid":55851,"requestId":"f8a9296e-ecad-4d89-ae36-03d8bb7146ad","timestamp":"2026-08-13T02:13:35.689Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"http-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"7e268ea849fb4c9ee67c0e840eb95eb0","toolName":"auto_echo","errorData":{"taskId":"7e268ea849fb4c9ee67c0e840eb95eb0","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: http-failure","originalStack":"Error: intentional task failure: http-failure\n at Object.handler (file:///Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:27)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:28)"},"stack":"McpError: intentional task failure: http-failure\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)","msg":"Error in auto-task:auto_echo: intentional task failure: http-failure"}
|
|
4
|
+
{"level":50,"time":1786587222871,"env":"testing","version":"0.0.0-test","pid":55851,"requestId":"fffc253c-74ab-4fd3-a5dd-c14886196ac9","timestamp":"2026-08-13T02:13:42.871Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"49568958ba8bf82f6caa9b5f23878b74","toolName":"long_control","errorData":{"taskId":"49568958ba8bf82f6caa9b5f23878b74","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at ToolRegistry.runAutoTaskHandler (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
5
|
+
{"level":50,"time":1786587228488,"env":"testing","version":"0.0.0-test","pid":55927,"requestId":"V7FDF-DP0S4","timestamp":"2026-08-13T02:13:48.487Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"164b0f5396d7e66484798e20df0a0aa4f90881c3349d8de0b6789f8f88d6b843","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"164b0f5396d7e66484798e20df0a0aa4f90881c3349d8de0b6789f8f88d6b843","toolName":"scoped_echo","requestId":"V7FDF-DP0S4","timestamp":"2026-08-13T02:13:48.487Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
6
|
+
{"level":50,"time":1786587228499,"env":"testing","version":"0.0.0-test","pid":55927,"requestId":"0PT9F-IS96K","timestamp":"2026-08-13T02:13:48.499Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"da1df465acb6d1da47f6afb0929d334fb251d35318426f1752254efb488e61d6","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"da1df465acb6d1da47f6afb0929d334fb251d35318426f1752254efb488e61d6","toolName":"scoped_echo","requestId":"0PT9F-IS96K","timestamp":"2026-08-13T02:13:48.499Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:42)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
7
|
+
{"level":50,"time":1786587230922,"env":"testing","version":"0.0.0-test","pid":55943,"requestId":"5X7AN-6XKAS","timestamp":"2026-08-13T02:13:50.918Z","operation":"HandleToolRequest","critical":false,"errorCode":-32602,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"1e6b675822dbe8b61a4020e2582bc88c5937b1e1afd9003e8d2145d6c92ca457","toolName":"session_elicitation_probe","errorData":{"reason":"elicitation_response_invalid","issues":[{"path":"value","code":"invalid_type"}],"sessionId":"1e6b675822dbe8b61a4020e2582bc88c5937b1e1afd9003e8d2145d6c92ca457","toolName":"session_elicitation_probe","requestId":"5X7AN-6XKAS","timestamp":"2026-08-13T02:13:50.918Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"Elicitation response content does not match the requested schema.","originalStack":"McpError: Elicitation response content does not match the requested schema.\n at invalidParams (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:78:58)\n at assertElicitedContent (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:26:11)\n at Object.formFn [as elicit] (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:69:13)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async Object.handler (file:///Users/casey/Developer/github/mcp-ts-core/tests/fixtures/http-protocol-session-server.js:50:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:212:28\n at async measureToolExecution (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:194:12)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:306:28\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32"},"stack":"McpError: Elicitation response content does not match the requested schema.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:session_elicitation_probe: Elicitation response content does not match the requested schema."}
|
|
8
|
+
{"level":50,"time":1786587230935,"env":"testing","version":"0.0.0-test","pid":55943,"requestId":"0J4GZ-52X01","timestamp":"2026-08-13T02:13:50.931Z","operation":"HandleToolRequest","critical":false,"errorCode":-32603,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"06ba48d957a5497eebd1bcdc46f35f99c8c46e65439e3035231c2717e2f15e3f","toolName":"session_elicitation_probe","errorData":{"sessionId":"06ba48d957a5497eebd1bcdc46f35f99c8c46e65439e3035231c2717e2f15e3f","toolName":"session_elicitation_probe","requestId":"0J4GZ-52X01","timestamp":"2026-08-13T02:13:50.931Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"MCP error -32602: Client refused the elicitation request.","originalStack":"McpError: MCP error -32602: Client refused the elicitation request.\n at McpError.fromError (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js:2048:16)\n at Server._onresponse (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:490:36)\n at _transport.onmessage (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:234:22)\n at Object.deliver (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:55:29)\n at SessionStore.routeServerResponse (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/sessionStore.js:208:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:626:38\n at Array.filter (<anonymous>)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:623:39\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)"},"stack":"McpError: MCP error -32602: Client refused the elicitation request.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:session_elicitation_probe: MCP error -32602: Client refused the elicitation request."}
|
|
9
|
+
{"level":50,"time":1786587231021,"env":"testing","version":"0.0.0-test","pid":55943,"requestId":"IKG5Z-ZRC90","timestamp":"2026-08-13T02:13:51.017Z","operation":"HandleToolRequest","critical":false,"errorCode":-32004,"originalErrorType":"AbortError","finalErrorType":"McpError","sessionId":"9cfa68fd06bea3003fbcdae970efafd4b54ea5b49bc2bfe9a888099e37741295","toolName":"session_cancellable_tool","errorData":{"sessionId":"9cfa68fd06bea3003fbcdae970efafd4b54ea5b49bc2bfe9a888099e37741295","toolName":"session_cancellable_tool","requestId":"IKG5Z-ZRC90","timestamp":"2026-08-13T02:13:51.017Z","operation":"HandleToolRequest","originalErrorName":"AbortError","originalMessage":"AbortError: cancel tool request","originalStack":"AbortError: AbortError: cancel tool request\n at new DOMException (node:internal/per_context/domexception:79:18)\n at SessionStore.cancelRequest (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/sessionStore.js:166:29)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:644:30\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:358:20\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)\n at async file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:312:16\n at async dispatch (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:17)\n at async cors2 (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:76:5)"},"stack":"McpError: AbortError: cancel tool request\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32\n at async wrappedHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:32)","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
|
10
|
+
{"level":50,"time":1786587241316,"env":"testing","version":"0.0.0-test","pid":56023,"requestId":"61be143c-7657-453e-9110-30352866c484","timestamp":"2026-08-13T02:14:01.316Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"stdio-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"ee8662227fa5467d4a1a989958fdfc01","toolName":"auto_echo","errorData":{"taskId":"ee8662227fa5467d4a1a989958fdfc01","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: stdio-failure","originalStack":"Error: intentional task failure: stdio-failure\n at handler (/Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:31)\n at async runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:42)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: intentional task failure: stdio-failure\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:auto_echo: intentional task failure: stdio-failure"}
|
|
11
|
+
{"level":50,"time":1786587248382,"env":"testing","version":"0.0.0-test","pid":56023,"requestId":"3dfac909-5392-47a9-88e8-60d1aac7998d","timestamp":"2026-08-13T02:14:08.381Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"3ee3f4f482e0a099831113580b27ae78","toolName":"long_control","errorData":{"taskId":"3ee3f4f482e0a099831113580b27ae78","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
12
|
+
{"level":50,"time":1786587249679,"env":"testing","version":"0.0.0-test","pid":56062,"requestId":"30fc1d93-3755-4a5b-8c10-7950ed90a37e","timestamp":"2026-08-13T02:14:09.678Z","operation":"auto-task:auto_echo","input":{"fail":true,"value":"http-failure"},"critical":false,"errorCode":-32603,"originalErrorType":"Error","finalErrorType":"McpError","taskId":"bdbb37189f0f574e0ba253b84fe59eb3","toolName":"auto_echo","errorData":{"taskId":"bdbb37189f0f574e0ba253b84fe59eb3","toolName":"auto_echo","originalErrorName":"Error","originalMessage":"intentional task failure: http-failure","originalStack":"Error: intentional task failure: http-failure\n at handler (/Users/casey/Developer/github/mcp-ts-core/tests/fixtures/task-protocol-server.js:60:31)\n at async runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:253:42)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: intentional task failure: http-failure\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:auto_echo: intentional task failure: http-failure"}
|
|
13
|
+
{"level":50,"time":1786587256826,"env":"testing","version":"0.0.0-test","pid":56062,"requestId":"d6aebeb6-8df3-41da-9c88-8245392951f5","timestamp":"2026-08-13T02:14:16.825Z","operation":"auto-task:long_control","input":{"mode":"timeout"},"critical":false,"errorCode":-32004,"originalErrorType":"symbolEncountered","finalErrorType":"McpError","taskId":"1dc5de9df5f2813bc528625ebcb26f02","toolName":"long_control","errorData":{"taskId":"1dc5de9df5f2813bc528625ebcb26f02","toolName":"long_control","originalErrorName":"symbolEncountered","originalMessage":"Symbol(AUTO_TASK_TIMEOUT)"},"stack":"McpError: Symbol(AUTO_TASK_TIMEOUT)\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at runAutoTaskHandler (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/tool-registration.js:266:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in auto-task:long_control: Symbol(AUTO_TASK_TIMEOUT)"}
|
|
14
|
+
{"level":50,"time":1786587260986,"env":"testing","version":"0.0.0-test","pid":56135,"requestId":"1O3E3-DP8AC","timestamp":"2026-08-13T02:14:20.986Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"0a72407c6557c4b3a331a8213ac870a88349344596bf8981a51db854f105e588","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"0a72407c6557c4b3a331a8213ac870a88349344596bf8981a51db854f105e588","toolName":"scoped_echo","requestId":"1O3E3-DP8AC","timestamp":"2026-08-13T02:14:20.986Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
15
|
+
{"level":50,"time":1786587260994,"env":"testing","version":"0.0.0-test","pid":56135,"requestId":"CBMKP-O20TK","timestamp":"2026-08-13T02:14:20.994Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"9b0f4cf27f3fc78bc5d7e088047c8fc5204c88edcb5b4d9f03380a5e2684e9ca","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"9b0f4cf27f3fc78bc5d7e088047c8fc5204c88edcb5b4d9f03380a5e2684e9ca","toolName":"scoped_echo","requestId":"CBMKP-O20TK","timestamp":"2026-08-13T02:14:20.994Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:285:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
16
|
+
{"level":50,"time":1786587262572,"env":"testing","version":"0.0.0-test","pid":56148,"requestId":"RXKXK-ZNGJF","timestamp":"2026-08-13T02:14:22.569Z","operation":"HandleToolRequest","critical":false,"errorCode":-32602,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"6d95cfc46799cee8ec354ea235bbc0047af16776fd1d30ebd05272161da3b9ff","toolName":"session_elicitation_probe","errorData":{"reason":"elicitation_response_invalid","issues":[{"path":"value","code":"invalid_type"}],"sessionId":"6d95cfc46799cee8ec354ea235bbc0047af16776fd1d30ebd05272161da3b9ff","toolName":"session_elicitation_probe","requestId":"RXKXK-ZNGJF","timestamp":"2026-08-13T02:14:22.569Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"Elicitation response content does not match the requested schema.","originalStack":"McpError: Elicitation response content does not match the requested schema.\n at invalidParams (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:78:62)\n at assertElicitedContent (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:26:11)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/elicitation.js:69:13)\n at async handler (/Users/casey/Developer/github/mcp-ts-core/tests/fixtures/http-protocol-session-server.js:50:30)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:212:34)\n at async measureToolExecution (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/performance.js:194:25)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:306:34)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)"},"stack":"McpError: Elicitation response content does not match the requested schema.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_elicitation_probe: Elicitation response content does not match the requested schema."}
|
|
17
|
+
{"level":50,"time":1786587262580,"env":"testing","version":"0.0.0-test","pid":56148,"requestId":"X47C9-0LGGG","timestamp":"2026-08-13T02:14:22.578Z","operation":"HandleToolRequest","critical":false,"errorCode":-32603,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"f50b3cf6fc2f019ba54811c9b2aa89309eec20d4c11220d01ef05a4e5edad963","toolName":"session_elicitation_probe","errorData":{"sessionId":"f50b3cf6fc2f019ba54811c9b2aa89309eec20d4c11220d01ef05a4e5edad963","toolName":"session_elicitation_probe","requestId":"X47C9-0LGGG","timestamp":"2026-08-13T02:14:22.578Z","operation":"HandleToolRequest","originalErrorName":"McpError","originalMessage":"MCP error -32602: Client refused the elicitation request.","originalStack":"McpError: MCP error -32602: Client refused the elicitation request.\n at fromError (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js:2048:20)\n at _onresponse (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:490:36)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:234:22)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:55:18)\n at routeServerResponse (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/sessionStore.js:208:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:626:38)\n at filter (native:1:11)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:623:39)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:358:26)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:312:22)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:76:11)\n at async dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/hono-base.js:307:31)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: MCP error -32602: Client refused the elicitation request.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_elicitation_probe: MCP error -32602: Client refused the elicitation request."}
|
|
18
|
+
{"level":50,"time":1786587262653,"env":"testing","version":"0.0.0-test","pid":56148,"requestId":"5KYGH-LMTHY","timestamp":"2026-08-13T02:14:22.651Z","operation":"HandleToolRequest","critical":false,"errorCode":-32004,"originalErrorType":"AbortError","finalErrorType":"McpError","sessionId":"3d74267a99633ef41a291060a6a52f06aa50143237ad9d1dc58aab9f50d0ae34","toolName":"session_cancellable_tool","errorData":{"sessionId":"3d74267a99633ef41a291060a6a52f06aa50143237ad9d1dc58aab9f50d0ae34","toolName":"session_cancellable_tool","requestId":"5KYGH-LMTHY","timestamp":"2026-08-13T02:14:22.651Z","operation":"HandleToolRequest","originalErrorName":"AbortError","originalMessage":"AbortError: cancel tool request"},"stack":"McpError: AbortError: cancel tool request\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:334:26)\n at async executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:34)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at async <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:114:46)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpTransport.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"httpTransport.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAaH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMlF,OAAO,EAGL,YAAY,EACb,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,oCAAoC,CAAC;AAqOhG;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAAC,SAAS,SAAS,MAAM,GAAG,gBAAgB,EAC7E,aAAa,EAAE,gBAAgB,EAC/B,aAAa,EAAE,cAAc,EAC7B,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC;IAAE,GAAG,EAAE,IAAI,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,CAAC,CA8mBpF"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @module src/mcp-server/transports/http/httpTransport
|
|
11
11
|
*/
|
|
12
12
|
import { StreamableHTTPTransport } from '@hono/mcp';
|
|
13
|
+
import { isJSONRPCErrorResponse, isJSONRPCRequest, isJSONRPCResultResponse, } from '@modelcontextprotocol/sdk/types.js';
|
|
13
14
|
import { Hono } from 'hono';
|
|
14
15
|
import { cors } from 'hono/cors';
|
|
15
16
|
import { config } from '../../../config/index.js';
|
|
@@ -22,7 +23,7 @@ import { protectedResourceMetadataHandler } from '../../../mcp-server/transports
|
|
|
22
23
|
import { createRobotsTxtHandler } from '../../../mcp-server/transports/http/robotsTxt.js';
|
|
23
24
|
import { createServerCardHandler } from '../../../mcp-server/transports/http/serverCard.js';
|
|
24
25
|
import { generateSecureSessionId } from '../../../mcp-server/transports/http/sessionIdUtils.js';
|
|
25
|
-
import { SessionStore } from '../../../mcp-server/transports/http/sessionStore.js';
|
|
26
|
+
import { SessionStore, } from '../../../mcp-server/transports/http/sessionStore.js';
|
|
26
27
|
import { logger } from '../../../utils/internal/logger.js';
|
|
27
28
|
import { requestContextService } from '../../../utils/internal/requestContext.js';
|
|
28
29
|
import { createCounter, createObservableGauge } from '../../../utils/telemetry/metrics.js';
|
|
@@ -30,11 +31,53 @@ import { createCounter, createObservableGauge } from '../../../utils/telemetry/m
|
|
|
30
31
|
* Extends the base StreamableHTTPTransport to include a session ID.
|
|
31
32
|
*/
|
|
32
33
|
class McpSessionTransport extends StreamableHTTPTransport {
|
|
34
|
+
sessionStore;
|
|
33
35
|
sessionId;
|
|
34
|
-
|
|
36
|
+
pendingServerRequests = new Set();
|
|
37
|
+
constructor(sessionId, sessionStore) {
|
|
35
38
|
super();
|
|
39
|
+
this.sessionStore = sessionStore;
|
|
36
40
|
this.sessionId = sessionId;
|
|
37
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Rewrites outbound server-request IDs into the durable session namespace.
|
|
44
|
+
* Every per-request SDK Server starts its request counter at zero; without
|
|
45
|
+
* this bridge concurrent elicitations collide and a response POST reaches a
|
|
46
|
+
* different Server instance than the one holding the response handler.
|
|
47
|
+
*/
|
|
48
|
+
async send(message, options) {
|
|
49
|
+
if (!isJSONRPCRequest(message) || !this.sessionStore) {
|
|
50
|
+
await super.send(message, options);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const registration = this.sessionStore.registerServerRequest(this.sessionId, (response) => {
|
|
54
|
+
this.settleServerRequest(registration);
|
|
55
|
+
this.onmessage?.({ ...response, id: message.id });
|
|
56
|
+
});
|
|
57
|
+
if (!registration)
|
|
58
|
+
throw new Error('Cannot send a server request after its session ended.');
|
|
59
|
+
this.pendingServerRequests.add(registration);
|
|
60
|
+
try {
|
|
61
|
+
await super.send({ ...message, id: registration.requestId }, options);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
this.settleServerRequest(registration);
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async close() {
|
|
69
|
+
for (const registration of this.pendingServerRequests)
|
|
70
|
+
registration.unregister();
|
|
71
|
+
this.pendingServerRequests.clear();
|
|
72
|
+
await super.close();
|
|
73
|
+
}
|
|
74
|
+
/** Drops a route from both the session registry and this transport's pending set. */
|
|
75
|
+
settleServerRequest(registration) {
|
|
76
|
+
if (!registration)
|
|
77
|
+
return;
|
|
78
|
+
registration.unregister();
|
|
79
|
+
this.pendingServerRequests.delete(registration);
|
|
80
|
+
}
|
|
38
81
|
}
|
|
39
82
|
/** Max time (ms) we wait for per-request transport/server close to complete
|
|
40
83
|
* before giving up and logging a failure. Silent hangs here accumulate
|
|
@@ -518,10 +561,12 @@ export async function createHttpApp(serverFactory, parentContext, manifest) {
|
|
|
518
561
|
// Parse once for the small amount of protocol state the per-request SDK
|
|
519
562
|
// server cannot retain itself. Hono caches body parsing, so the transport
|
|
520
563
|
// still receives the same body below. Malformed JSON remains the SDK's job.
|
|
564
|
+
let parsedRpcBody;
|
|
521
565
|
let rpcMessages = [];
|
|
522
566
|
if (c.req.method === 'POST') {
|
|
523
567
|
try {
|
|
524
568
|
const rawBody = await c.req.json();
|
|
569
|
+
parsedRpcBody = rawBody;
|
|
525
570
|
const messages = Array.isArray(rawBody) ? rawBody : [rawBody];
|
|
526
571
|
rpcMessages = messages.filter((message) => typeof message === 'object' && message !== null);
|
|
527
572
|
}
|
|
@@ -565,6 +610,24 @@ export async function createHttpApp(serverFactory, parentContext, manifest) {
|
|
|
565
610
|
}, 400);
|
|
566
611
|
}
|
|
567
612
|
const sessionId = providedSessionId ?? generateSecureSessionId();
|
|
613
|
+
// A response to a server-initiated request arrives on a new POST and would
|
|
614
|
+
// otherwise be delivered to a fresh SDK Server with no matching response
|
|
615
|
+
// handler. Route recognized responses through the durable session registry
|
|
616
|
+
// and strip them before normal SDK dispatch. An emptied batch still goes to
|
|
617
|
+
// the transport rather than short-circuiting here: it owns the Accept and
|
|
618
|
+
// Content-Type checks, and returns the same 202 every other
|
|
619
|
+
// response/notification POST does.
|
|
620
|
+
let transportBody = parsedRpcBody;
|
|
621
|
+
if (sessionStore && parsedRpcBody !== undefined) {
|
|
622
|
+
const messages = Array.isArray(parsedRpcBody) ? parsedRpcBody : [parsedRpcBody];
|
|
623
|
+
const unrouted = messages.filter((message) => {
|
|
624
|
+
if (!isJSONRPCResultResponse(message) && !isJSONRPCErrorResponse(message))
|
|
625
|
+
return true;
|
|
626
|
+
return !sessionStore.routeServerResponse(sessionId, message);
|
|
627
|
+
});
|
|
628
|
+
if (unrouted.length !== messages.length)
|
|
629
|
+
transportBody = unrouted;
|
|
630
|
+
}
|
|
568
631
|
// The cancellation notification is handled by a different SDK Server
|
|
569
632
|
// instance than the original request. Mirror it into the durable session
|
|
570
633
|
// registry before passing it to the SDK so the original handler's merged
|
|
@@ -581,7 +644,7 @@ export async function createHttpApp(serverFactory, parentContext, manifest) {
|
|
|
581
644
|
sessionStore.cancelRequest(sessionId, requestId, typeof reason === 'string' ? reason : undefined);
|
|
582
645
|
}
|
|
583
646
|
}
|
|
584
|
-
const transport = new McpSessionTransport(sessionId);
|
|
647
|
+
const transport = new McpSessionTransport(sessionId, sessionStore);
|
|
585
648
|
trackPerRequestInstance(transport, 'transport');
|
|
586
649
|
let server;
|
|
587
650
|
let closePromise;
|
|
@@ -596,7 +659,7 @@ export async function createHttpApp(serverFactory, parentContext, manifest) {
|
|
|
596
659
|
server = await serverFactory(sessionStore?.createProtocolSessionHooks(sessionId));
|
|
597
660
|
trackPerRequestInstance(server, 'server');
|
|
598
661
|
await server.connect(transport);
|
|
599
|
-
const response = await transport.handleRequest(c);
|
|
662
|
+
const response = await transport.handleRequest(c, transportBody);
|
|
600
663
|
if (response) {
|
|
601
664
|
// Only register the session in the store AFTER a successful response.
|
|
602
665
|
// This avoids minting sessions for requests that fail protocol
|