# @modelcontextprotocol/client

> Model Context Protocol implementation for TypeScript - Client package

Latest version **2.3.1** (published 2026-10-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @modelcontextprotocol/client
pnpm add @modelcontextprotocol/client
yarn add @modelcontextprotocol/client
bun add @modelcontextprotocol/client
```

## Health

**Score 80/100 (A)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.3.1 |
| Published | 2026-10-05 |
| First published | 2026-04-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 7 |
| Unpacked size | 6.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 13511 |
| Author | Anthropic, PBC |
| Maintainers | jspahrsummers, pcarleton, fweinberger, thedsp, ochafik-ant |
| Keywords | modelcontextprotocol, mcp, client |

## Links

- npm: https://www.npmjs.com/package/@modelcontextprotocol/client
- Repository: https://github.com/modelcontextprotocol/typescript-sdk
- Homepage: https://modelcontextprotocol.io
- Issues: https://github.com/modelcontextprotocol/typescript-sdk/issues
- npm.io page: https://npm.io/package/@modelcontextprotocol/client

## Dependencies (7)

- [zod](https://npm.io/package/zod.md) ^4.2.0
- [jose](https://npm.io/package/jose.md) ^6.1.3
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.5
- [eventsource](https://npm.io/package/eventsource.md) ^3.0.2
- [pkce-challenge](https://npm.io/package/pkce-challenge.md) ^5.0.0
- [eventsource-parser](https://npm.io/package/eventsource-parser.md) ^3.0.8
- [@modelcontextprotocol/core](https://npm.io/package/@modelcontextprotocol/core.md) 2.3.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 2.3.1 (latest) — 2026-10-05
- 2.3.0 — 2026-10-02
- 2.2.0 — 2026-09-28
- 2.1.0 — 2026-09-23
- 2.0.0 — 2026-07-27
- 2.0.0-beta.5 — 2026-07-21
- 2.0.0-beta.4 — 2026-07-13
- 2.0.0-beta.3 — 2026-07-09
- 2.0.0-beta.2 — 2026-07-02
- 2.0.0-beta.1 — 2026-06-30
- 2.0.0-alpha.4 — 2026-06-30
- 2.0.0-alpha.3 — 2026-06-25
- 2.0.0-alpha.2 — 2026-04-01

## README

# `@modelcontextprotocol/client`

The MCP (Model Context Protocol) TypeScript client SDK. Build MCP clients that connect to MCP servers.

> **This is v2 of the MCP TypeScript SDK, the stable release line**, implementing the [2026-07-28 MCP spec](https://modelcontextprotocol.io/specification/2026-07-28). It replaces the single `@modelcontextprotocol/sdk` package from v1. Start with the [documentation](https://ts.sdk.modelcontextprotocol.io/v2/); coming from v1, see the [migration guide](https://ts.sdk.modelcontextprotocol.io/v2/migration/upgrade-to-v2). Found a problem? [Open an issue](https://github.com/modelcontextprotocol/typescript-sdk/issues/new?template=v2-feedback.yml).

## Install

```bash
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](https://github.com/modelcontextprotocol/typescript-sdk#readme)** — overview, package layout, examples
- **[Client guide](https://ts.sdk.modelcontextprotocol.io/v2/clients/connect)** — connecting, calling tools, OAuth, and middleware
- **[API reference](https://ts.sdk.modelcontextprotocol.io/v2/)**
- **[MCP specification](https://modelcontextprotocol.io)**

---
_Source: https://npm.io/package/@modelcontextprotocol/client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
