Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.79 KB

File metadata and controls

42 lines (31 loc) · 1.79 KB

Node.js MCP Client Template

MCP TypeScript SDK 2.0 client template for stdio and Streamable HTTP.

The demo runs one complete workflow against the paired server:

  1. Discover Tools, Resources, and Prompts.
  2. Call search_documents.
  3. Read the selected kb://documents/{documentId} Resource.
  4. Get review_document with 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 dev

The 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

License

MIT