MCP TypeScript SDK 2.0 client template for stdio and Streamable HTTP.
The demo runs one complete workflow against the paired server:
- Discover Tools, Resources, and Prompts.
- Call
search_documents. - Read the selected
kb://documents/{documentId}Resource. - Get
review_documentwith the selected document ID.
By default, the stdio example starts @my-mcp-hub/node-mcp-server, while the HTTP example connects
to http://localhost:8401/mcp. Set MCP_SERVER_URL to use another HTTP endpoint, or pass
StdioDemoOptions to runStdioDemo for another executable.
npm install
npm run devThe test suite prefers the sibling node-mcp-server repository when available, falls back to the
published package in isolated environments, and verifies the same workflow over both transports:
npm test
npm run build