typescript-sdk/examples/mrtr
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-06 21:03:15 +01:00
..
client.ts Implement MCP 2026-07-28 (#2286) 2026-06-26 14:01:10 +01:00
package.json Use protected HTTP wiring in examples and guides (#2445) 2026-07-06 21:03:15 +01:00
README.md Implement MCP 2026-07-28 (#2286) 2026-06-26 14:01:10 +01:00
server.ts Use protected HTTP wiring in examples and guides (#2445) 2026-07-06 21:03:15 +01:00

mrtr (multi-round-trip requests)

A write-once deploy tool that requests client input by returning inputRequired(...) instead of pushing a server→client request (protocol revision 2026-07-28). State between rounds is carried in requestState, which the example HMAC-protects and verifies via the ServerOptions.requestState.verify hook (a wire-level -32602 on tamper).

The client drives both the default auto-fulfilment mode (your existing elicitation/create handler is dispatched for you and callTool() returns a plain CallToolResult) and manual mode (autoFulfill: false + allowInputRequired: true).

pnpm tsx examples/mrtr/client.ts