Package Exports
- @modelcontextprotocol/client
- @modelcontextprotocol/client/_shims
- @modelcontextprotocol/client/stdio
- @modelcontextprotocol/client/validators/ajv
- @modelcontextprotocol/client/validators/cf-worker
Readme
@modelcontextprotocol/client
The MCP (Model Context Protocol) TypeScript client SDK. Build MCP clients that connect to MCP servers.
[!WARNING] This is an alpha release. Expect breaking changes until v2 stabilizes. We're publishing early to gather feedback — please try it and open issues — but we can't guarantee API stability yet. We'll aim to minimize disruption between alphas.
[!NOTE] This is v2 of the MCP TypeScript SDK. It replaces the monolithic
@modelcontextprotocol/sdkpackage from v1. See the migration guide if you're coming from v1.
Install
npm install @modelcontextprotocol/client@alphaTypeScript ≥6.0 no longer auto-includes @types/* — add "types": ["node"] to your tsconfig.json compilerOptions (the published .d.mts references Buffer).
Documentation
- Repository README — overview, package layout, examples
- Client guide — connecting, calling tools, OAuth, and middleware
- API reference
- MCP specification