typescript-sdk/examples/custom-methods
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

custom-methods

Bidirectional custom (non-spec) JSON-RPC methods: the server handles a vendor-prefixed acme/search request via server.setRequestHandler and emits acme/searchProgress notifications via ctx.mcpReq.notify; the client sends the typed request via client.request(method, schema) and receives the typed notifications via client.setNotificationHandler('acme/searchProgress', { params }).

pnpm tsx examples/custom-methods/client.ts