Model Context Protocol implementation for TypeScript - Client package
- Types
- ESM
- CJS
- License
- MIT
- Install Size
- 6.6 MB(14.3 MB)
- Vulns
- 0
- Published
$
npm install @modelcontextprotocol/client@modelcontextprotocol/client
The MCP (Model Context Protocol) TypeScript client SDK. Build MCP clients that connect to MCP servers.
v2 is the stable release line, implementing the 2026-07-28 MCP spec. Migrating from v1? Start with the migration guide.
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
TypeScript ≥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