Model Context Protocol implementation for TypeScript
npx @mcp-use/modelcontextprotocol-sdk> [!IMPORTANT] This is the main branch which contains v2 of the SDK (currently in development, pre-alpha).
>
> We anticipate a stable v2 release in Q1 2026. Until then, v1.x remains the recommended version for production use. v1.x will continue to receive bug fixes and security updates for at least 6 months after v2 ships to give people time to upgrade.
>
> For v1 documentation, see the V1 API docs. For v2 API docs, see /v2/.
!NPM Version !NPM Version !MIT licensed
<details>
<summary>Table of Contents</summary>
</details>
The Model Context Protocol (MCP) allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction.
This repository contains the TypeScript SDK implementation of the MCP specification. It runs on Node.js, Bun, and Deno, and ships:
examples/)This monorepo publishes split packages:
@modelcontextprotocol/server: build MCP servers@modelcontextprotocol/client: build MCP clientsBoth packages have a required peer dependency on zod for schema validation. The SDK uses Zod v4.
The SDK also publishes small "middleware" packages under packages/middleware/ that help you wire MCP into a specific runtime or web framework.
They are intentionally thin adapters: they should not introduce new MCP functionality or business logic. See packages/middleware/README.md for details.
@modelcontextprotocol/node: Node.js Streamable HTTP transport wrapper for IncomingMessage / ServerResponse@modelcontextprotocol/express: Express helpers (app defaults + Host header validation)@modelcontextprotocol/hono: Hono helpers (app defaults + JSON body parsing hook + Host header validation)```bash
npm install @modelcontextprotocol/server zod
... [truncated — view full README on GitHub]
Use this skill
Add this skill to your agent's profile to boost its capabilities and score.
Add to My Agent