MCP TypeScript SDK
by Model Context Protocol
The official TypeScript SDK — now split into server, client and middleware packages for MCP v2.
Overview
The MCP TypeScript SDK is the official TypeScript and JavaScript implementation of the Model Context Protocol, at 13.1k stars and 2.1k forks on GitHub, and it has just been through a restructuring that anyone following an older tutorial will trip over. Version 2 is now the stable release line and implements the 2026-07-28 MCP specification; instead of the single @modelcontextprotocol/sdk package — whose v1 line sits at 1.30.0, requires Node 18 or newer, and pulls in Zod 3 or 4, Express, Hono, ajv, jose and eventsource — functionality is split into @modelcontextprotocol/server for building servers, @modelcontextprotocol/client for building clients, and a shared @modelcontextprotocol/core, with @modelcontextprotocol/server at 2.0.0 requiring Node 20 or newer and depending only on Zod 4 and core. Transport plumbing moved out into optional middleware packages rather than being bundled into the main dependency tree: @modelcontextprotocol/node wraps the Streamable HTTP transport for Node's own HTTP server, and @modelcontextprotocol/express, @modelcontextprotocol/fastify and @modelcontextprotocol/hono provide framework-specific helpers. The supported runtimes are Node.js, Bun and Deno. The README is organised as Overview, Packages, Installation, Getting Started, Documentation, Contributing and License, with the getting-started example being a minimal stdio server exposing a single greeting tool, and it publishes the support policy explicitly: the v1.x line continues to receive bug fixes and security updates for at least six months after the v2 release, giving existing servers a defined migration window rather than an implicit one. Licensing is MIT for existing code with new contributions under Apache-2.0.
At a Glance
- Topic
- MCP
- Level
- Intermediate
- Format
- Documentation
- Cost
- Free
- Duration
- ~1-2 hours to read the README and ship a first working server; reference use ongoing
- Provider
- Model Context Protocol
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Stand up an MCP server over stdio that exposes a typed tool to any compatible client
- ✓Choose between the v2 split packages and the legacy v1 @modelcontextprotocol/sdk package
- ✓Serve MCP over Streamable HTTP using the Node, Express, Fastify or Hono middleware packages
- ✓Define tool inputs with Zod schemas so arguments are validated before your handler runs
- ✓Build an MCP client that connects to and calls tools on a third-party server
- ✓Understand the v1-to-v2 migration window and what the six-month support policy actually guarantees
- ✓Target Node.js, Bun or Deno without rewriting the server implementation
Highlights
- •Official SDK tracking the 2026-07-28 MCP specification rather than a community reimplementation
- •The v2 package split means a server bundle no longer drags in client code, and vice versa
- •Transport middleware is opt-in per framework (Express, Fastify, Hono, raw Node HTTP) instead of bundled
- •A written support policy — v1.x keeps getting fixes for at least six months post-v2 — which most SDKs never publish
- •Runs on Node, Bun and Deno, so it is not tied to a single runtime's ecosystem
- •13.1k stars, and the implementation most MCP clients and hosts are tested against
Who It’s For
Best For
- ✓TypeScript developers exposing an internal API to Claude or another MCP host
- ✓Teams migrating an existing v1 MCP server onto the v2 package split
- ✓Engineers building an MCP client or host application rather than a server
- ✓Anyone deploying a remote MCP server behind Express, Fastify or Hono
Prerequisites
- •Solid TypeScript and Node.js — the v2 server package requires Node 20 or newer
- •Familiarity with MCP's core concepts of tools, resources and prompts
- •Comfort with Zod or a similar schema library for validating tool inputs
FAQ
What is MCP TypeScript SDK?
The official TypeScript/JavaScript implementation of the Model Context Protocol, and the reference most MCP clients are tested against. It has just been restructured: v2 is the stable line implementing the 2026-07-28 spec, splitting the old monolithic package into separate server, client and core packages plus per-framework transport middleware. Anyone following an older tutorial will hit that change immediately.
Is MCP TypeScript SDK free?
MCP TypeScript SDK is free to access.
What level is MCP TypeScript SDK for?
MCP TypeScript SDK is aimed at a intermediate audience. Recommended background: Solid TypeScript and Node.js — the v2 server package requires Node 20 or newer, Familiarity with MCP's core concepts of tools, resources and prompts, Comfort with Zod or a similar schema library for validating tool inputs.
How long does MCP TypeScript SDK take?
Expect roughly ~1-2 hours to read the README and ship a first working server; reference use ongoing. Most learners work through it at their own pace.
What will I learn from MCP TypeScript SDK?
You'll learn: Stand up an MCP server over stdio that exposes a typed tool to any compatible client; Choose between the v2 split packages and the legacy v1 @modelcontextprotocol/sdk package; Serve MCP over Streamable HTTP using the Node, Express, Fastify or Hono middleware packages; Define tool inputs with Zod schemas so arguments are validated before your handler runs; Build an MCP client that connects to and calls tools on a third-party server; Understand the v1-to-v2 migration window and what the six-month support policy actually guarantees; Target Node.js, Bun or Deno without rewriting the server implementation.
Topics
Sources
This page was written from 4 sources, 3 on domains other than github.com.