@modelcontextprotocol/sdk
1.32.2 · 23 Oct 2026MIT93.3M / weekRepositoryHomepagenpmAtom feed
1.32.2 is the newest release of 1.x.
In short
15 new10 changed
Security
2 advisories affect 1.0.0; 1.32.0 fixes them
- HighModel Context Protocol (MCP) TypeScript SDK does not enable DNS rebinding protection by defaultGHSA-w48q-cv73-mx4w · 2 Dec 2025Fixed in 1.24.0
- ModerateMCP TypeScript client SDK: HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodiesGHSA-6prh-2h8m-c8cw · 20 Oct 2026Fixed in 1.32.0
Release note
We're excited to announce the first stable release of the Model Context Protocol (MCP) TypeScript SDK! This release provides a complete implementation of the MCP specification, enabling seamless integration between LLM applications and context providers.
Features
Core Protocol Implementation
Full implementation of MCP protocol v2024-11-05
Robust client and server capabilities with promise-based async support
Type-safe request/response handling using Zod schemas
Support for all core MCP primitives:
Prompts and prompt templates
Resources and resource templates
Tools with JSON Schema validation
Progress tracking and notifications
Logging with severity levels
Transport Layer Support
Standard input/output (stdio) transport
Server-Sent Events (SSE) transport
Client Features
Simple, intuitive client API
Automatic protocol negotiation
Request timeout handling
Progress tracking
Error handling with typed exceptions
Server Features
Flexible request handler registration
Built-in capability negotiation
Request context management
Support for experimental capabilities
Automatic request/response routing
Basic Usage
Creating a Client
import { Client } from "@modelcontextprotocol/sdk/client";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio";
const client = new Client(
{ name: "example-client", version: "1.0.0" },
{ capabilities: { sampling: {} } }
);
const transport = new StdioClientTransport({
command: "path/to/server",
});
await client.connect(transport);
const resources = await client.listResources();Creating a Server
import { Server } from "@modelcontextprotocol/sdk/server";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio";
const server = new Server(
{ name: "example-server", version: "1.0.0" },
{ capabilities: { resources: {} } }
);
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
resources: [
{ uri: "file:///example.txt", name: "Example Resource" }
]
}));
const transport = new StdioServerTransport();
await server.connect(transport);Requirements
Node.js 18.0.0 or later
TypeScript 5.0 or later (for development)
Breaking Changes
This is the initial stable release, establishing the baseline API for future versions.
License
MIT License
For more information:
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.