JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21253
  • Score
    100M100P100Q133245F
  • License MIT

Model Context Protocol implementation for TypeScript - Client package

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 a beta release. The API surface is settling but breaking changes remain possible until v2 stabilizes. Please try it and open issues — feedback during the beta directly shapes the stable release.

[!NOTE] This is v2 of the MCP TypeScript SDK. It replaces the monolithic @modelcontextprotocol/sdk package from v1. See the migration guide if you're coming from v1.

Install

npm install @modelcontextprotocol/client@beta

TypeScript ≥6.0 no longer auto-includes @types/* — add "types": ["node"] to your tsconfig.json compilerOptions (the published .d.mts references Buffer).

Documentation