
@modelcontextprotocol/sdk
Updated todayMCP TypeScript SDK
[!IMPORTANT] This is the
mainbranch — v2 of the SDK (@modelcontextprotocol/server,@modelcontextprotocol/client), implementing the 2026-07-28 MCP spec.Have feedback? Please open a v2 issue — it is the most useful thing you can do for the SDK right now. The v2 documentation starts with a ten-minute server tutorial.
v2 is the stable release line, released alongside the 2026-07-28 spec. v1.x continues to receive bug fixes and security updates for at least 6 months after v2's release. v1 documentation: ts.sdk.modelcontextprotocol.io · v2:
/v2/.
[!WARNING] We're limiting pull requests to 1 per new contributor while v2 settles after the 2026-07-28 spec release.
Issues are the most useful feedback right now — we'll reopen PRs as v2 stabilizes.
Table of Contents
Overview
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:
- MCP server libraries (tools/resources/prompts, Streamable HTTP, stdio, auth helpers)
- MCP client libraries (transports, high-level helpers, OAuth helpers)
- Optional middleware packages for specific runtimes/frameworks (Express, Fastify, Hono, Node.js HTTP)
- Runnable examples (under
examples/)
Packages
This monorepo publishes split packages:
@modelcontextprotocol/server: build MCP servers@modelcontextprotocol/client: build MCP clients
Tool and prompt schemas use Standard Schema — bring Zod v4, Valibot, ArkType, or any compatible library.
Middleware packages (optional)
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 forIncomingMessage/ServerResponse@modelcontextprotocol/express: Express helpers (app defaults + Host header validation)@modelcontextprotocol/fastify: Fastify helpers (app defaults + Host header validation)@modelcontextprotocol/hono: Hono helpers (app defaults + JSON body parsing hook + Host header validation)
Installation
Server
Related servers

n8n
Updated todayby n8n-io
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

mcp-server-fetch
OfficialUpdated 14d agoA Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

@modelcontextprotocol/server-everything
OfficialUpdated 14d agoMCP server that exercises all the features of the MCP protocol