MCP TypeScript SDK
A strong pick. 1st of 9 MCP server frameworks.
The official TypeScript SDK for the Model Context Protocol. It builds both servers and clients, and most other TypeScript MCP frameworks are built on it. Version 2 is now stable (v2.4.0) and split into packages such as @modelcontextprotocol/server. It is the default choice for a new MCP server, though it takes more code than the frameworks built on it and has had a run of security fixes in 2026.
Best for: Teams that want full, first-to-market coverage of the MCP spec and direct control over transports, sessions and auth, on Node.js, Bun, Deno or edge runtimes.
Scores
Overall8.7
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
It is the default MCP server library for TypeScript: official, the most complete, actively maintained, and the base the peers build on. It is held back by boilerplate, the v1-to-v2 migration churn and a 2026 run of security advisories. Teams that want less code may prefer FastMCP or xmcp, but those tools sit on top of this SDK.
- npm downloadsLast4Weeks: Far ahead of every peer
- blog.modelcontextprotocol.io/posts/sdk-betas-2026-07-28: Official Tier 1 SDK on the current spec
- corgea.com/research/cve-2026-111767-111770-111768-mcp-typescript-sdk-cross-session-leak-dos: Recent security issues
GPT-6.2 Sol: 8.8, likely 7.7 to 9.7
The official SDK is the strongest general-purpose pick among these peers for a new project that needs current MCP support, both local and hosted transports, and control over server behavior. MCP Handler offers a quicker fit for a Next.js route, and mcp-use offers more for React-based MCP Apps. HTTP security setup and a short v2 production Track record temper the recommendation.
- github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.4.0: Confirms the current stable server package and its upgrade notes.
- frontmcp.dev/blog/best-typescript-mcp-frameworks: Compares direct SDK use with route adapters and MCP App frameworks.
- github.com/mapbox/mcp-server/blob/main/CHANGELOG.md: Shows real adoption of 2.4.0 and the work involved in a major upgrade.
- labs.cloudsecurityalliance.org/wp-content/uploads/2026/11/CSA_research_note_mcp_transport_trust_gap_20261109-csa-styled.pdf: Documents residual configuration work for HTTP deployments.
Needed by many4.7
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
Building MCP servers is a fast-growing but still specialised job, not something most JS developers do in most projects. The SDK also builds clients and runs on many runtimes, so it covers the whole category rather than one framework. How fast agent tooling spreads keeps the range wide.
- category.job: The job is building MCP servers for AI agents
- blog.modelcontextprotocol.io/posts/sdk-betas-2026-07-28: Runs on Node.js 20+, Bun and Deno, with server and client packages
GPT-6.2 Sol: 4.4, likely 3.3 to 5.7
Building MCP servers is a distinct job within JavaScript and TypeScript, with uses in developer tools, internal integrations, and customer-facing services. The SDK covers local and hosted servers across several runtimes. JetBrains found that 18% of surveyed organizations use an MCP server provided by their CI/CD tool, and the share of JavaScript teams building their own servers is less directly measured.
- blog.jetbrains.com/teamcity/2026/10/state-of-cicd-2026-report: CI/CD survey measures use of MCP servers supplied by vendors.
- frontmcp.dev/blog/best-typescript-mcp-frameworks: Compares runtime support and direct SDK use with framework-specific workflows.
Helps a lot8.1
How well does it do the job for those who need it?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It is the most complete implementation of the spec, with current protocol support, Standard Schema tool schemas, framework adapters and good types. Its limits are boilerplate, manual auth and HTTP setup, and security defaults that needed several rounds of fixes. Higher-level peers are nicer to write but sit on top of this SDK.
- pkgpulse.com/guides/mcp-libraries-nodejs-2026: Calls it flexible with excellent TS support but high boilerplate
- xmcp.dev/blog/xmcp-vs-fastmcp-vs-mcp-sdk: xmcp builds on SDK v2: 2026-07-28 revision, Standard Schema, fallback for older clients
- corgea.com/research/cve-2026-111767-111770-111768-mcp-typescript-sdk-cross-session-leak-dos: v2 dropped a guard against sharing one server across sessions, and its docs showed the unsafe pattern
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 8.7, likely 7.6 to 9.6
Version 2.4.0 has typed tool registration, structured results, clear protocol and SDK errors, and documented entry points for both current and older clients. Versioned examples help coding agents choose the right API across the package split. FastMCP supplies more development tooling, and mcp-use offers a more integrated React workflow for MCP Apps. The available benchmarks cover v1 or an early v2 build, so current performance rankings remain uncertain.
- ts.sdk.modelcontextprotocol.io/v2: Versioned server examples, schema support, transports, testing, and error reference.
- github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.4.0: Confirms the stable server version and records schema behavior changes.
- frontmcp.dev/blog/best-typescript-mcp-frameworks: A competing maintainer tests protocol support and compares framework features.
- github.com/mcp-use/mcp-use/blob/main/benchmark.md: Peer-run tests found quick startup and higher throughput from some alternatives against a v2 beta.
- github.com/desty2k/mcp-benchmark: Independent Streamable HTTP benchmark tests SDK 1.29.0 on synthetic workloads.
Holds up over time8.5
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.5
It is the official Tier 1 SDK of the protocol, with a named lead, 446 commits, 134 releases and 196 contributors. v1 is promised at least six months of fixes after v2. The v1-to-v2 break and the large PR backlog keep it from the top.
- github commitsLastYear / releasesLastYear: 446 commits and 134 releases in the last year
- blog.modelcontextprotocol.io/posts/sdk-betas-2026-07-28: Tier 1 SDK with a named lead, a v1 support window and a codemod
- github openPullRequests: 394 open PRs
GPT-6.2 Sol: 8.5, likely 7.2 to 9.5
The repository recorded 446 commits in a year, tests conformance against two protocol revisions, and continues to patch v1 during the v2 transition. The Linux Foundation hosts MCP through the Agentic AI Foundation, and Anthropic has committed to maintaining core infrastructure. A substantial backlog, unclear release approval coverage, and the work reported by teams migrating existing servers keep the range wide.
- github commitsLastYear, pushedAt, openIssues, openPullRequests: Recent activity alongside 306 open issues and 394 open pull requests.
- github.com/modelcontextprotocol/typescript-sdk/blob/main/ROADMAP.md: Documents conformance testing, v1 maintenance, and tracking for future revisions.
- blog.modelcontextprotocol.io/posts/2025-12-09-mcp-joins-agentic-ai-foundation: Describes foundation governance and Anthropic’s continued infrastructure commitment.
- github.com/mapbox/mcp-server/blob/main/CHANGELOG.md: Reports coordinated changes to server wiring, handler context, and types during migration.
Used widely8.2
How many use it, and is that growing?
Claude Opus 5.5: 9.5, likely 8.5 to 10.0
357M downloads in 4 weeks against 32M a year before is a ratio of about 11, far above the 4.1 median. Much of that is transitive, because most peers and many AI tools install it. Even after that correction it is the most-chosen MCP library by far, with 13.8k stars. The v2 split means these numbers leave out the new packages.
- npm downloadsLast4Weeks: 357M, versus 32M a year ago
- medianDownloadsRatio: Median is 4.1; this project is about 11
- github stars: 13,794 stars, the most in the category
- peers: The next peer by downloads, tmcp, has 17.8M
GPT-6.2 Sol: 6.8, likely 5.2 to 8.4
The v1 package reached 357 million installs in four weeks, up 11.1× year over year against the 4.1× baseline. The repository leads the listed peers in stars and Bluesky links, and a separate October snapshot shows substantial installs of the v2 server package. Automated builds, v1 client installs, and dependencies pulled in by frameworks inflate those totals. With no comparable dependent count in the bundle, the number of projects choosing the server SDK directly remains uncertain.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: The combined v1 package grew 11.1× against the catalog’s 4.1× baseline.
- project note, github stars, bluesky posts, dependents, peers: 13,794 stars and 28 Bluesky posts cover both SDK roles. Ecosyste.ms supplies no count.
- frontmcp.dev/blog/best-typescript-mcp-frameworks: Reports 21.2 million v2 server installs during one October week.
- github.com/punkpeye/fastmcp/blob/main/package.json: FastMCP pulls in the v1 SDK as a dependency.
Vouched for8.5
Who stands behind it being good?
Claude Opus 5.5: 8.5, likely 7.5 to 9.5
Vercel's MCP support, Cloudflare, xmcp and FastMCP all build on it, and independent guides call it the required foundation. These are current backers with something at stake, but there is no developer-survey data for this category yet.
- pkgpulse.com/guides/mcp-libraries-nodejs-2026: Calls it the official, required foundation
- xmcp.dev/blog/xmcp-vs-fastmcp-vs-mcp-sdk: xmcp is built on SDK v2
- bluesky top: A user notes that Vercel's MCP support wraps the SDK
GPT-6.2 Sol: 8.5, likely 7.3 to 9.3
Cloudflare Agents and Vercel MCP Handler integrate SDK v2, and Mapbox moved its own MCP server to 2.4.0. These are current integrations with concrete compatibility and maintenance costs. Developer satisfaction with the current server package remains unmeasured in the sources reviewed.
- developers.cloudflare.com/agents/model-context-protocol/guides/migrate-to-mcp-sdk-v2: Cloudflare documents v2 as the path for new stateless Agents SDK servers.
- github.com/vercel-labs/mcp-handler/blob/main/package.json: Vercel’s adapter declares the v2 server package as a peer dependency.
- github.com/mapbox/mcp-server/blob/main/CHANGELOG.md: Mapbox records its migration to v2 and its subsequent 2.4.0 upgrade.
Safe6.5
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
Nine advisories in 24 months, several high: cross-session leaks, memory exhaustion from requests, and missing checks on the token audience. Fixes shipped quickly, but some protect you only after code changes, and v2 brought back a leak that v1 had fixed. It pulls in 17 dependencies and has no Scorecard. The npm licence is MIT.
- advisories last24Months: 9 advisories, several rated HIGH, published in October 2026
- corgea.com/research/cve-2026-111767-111770-111768-mcp-typescript-sdk-cross-session-leak-dos: Fixes shipped 18 days before disclosure, and some need code changes
- advisories.gitlab.com/pkg/npm/@modelcontextprotocol/sdk: Earlier advisories: ReDoS, DNS rebinding, a shared-instance race
- npm dependencies: 17 direct dependencies
GPT-6.2 Sol: 7.0, likely 5.8 to 8.2
The v2 server package declares the permissive Apache-2.0 license and two direct dependencies, and its release workflow uses npm trusted publishing with provenance. Maintainers shipped fixes for the recent HTTP request and validation advisories before public disclosure. Token audience checks and tool input limits still depend on server configuration. The missing OpenSSF Scorecard and unclear release approval coverage leave some supply-chain uncertainty.
- github.com/modelcontextprotocol/typescript-sdk/blob/v2.4.0/packages/server/package.json: The server manifest declares Apache-2.0 and two direct dependencies.
- github.com/modelcontextprotocol/typescript-sdk/blob/main/LICENSE: Some older contributions remain MIT during the license transition.
- github.com/modelcontextprotocol/typescript-sdk/blob/v2.4.0/.github/workflows/release.yml: The tagged workflow configures OIDC publishing and npm provenance.
- github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-f897-62hf-6gxq: Patched server releases enforce HTTP request and batch limits.
- labs.cloudsecurityalliance.org/wp-content/uploads/2026/11/CSA_research_note_mcp_transport_trust_gap_20261109-csa-styled.pdf: Reviews patched versions and safeguards that require explicit configuration.
- scorecard: The bundle contains no OpenSSF Scorecard result.
Good
- It is the reference implementation, so new spec revisions and features such as Streamable HTTP, tasks and Skills over MCP land here first.
- It is the foundation that FastMCP, xmcp, mcp-handler, Vercel and Cloudflare build on, so skills carry over to those tools.
- v2 accepts tool schemas through Standard Schema (Zod v4, Valibot, ArkType) and ships adapters for Express, Hono and Fastify.
- It is a Tier 1 official SDK with a named lead, very frequent releases and a codemod for the v1-to-v2 migration.
Bad
- It is verbose: HTTP setup, auth and testing are manual compared with FastMCP or xmcp.
- Nine advisories in 24 months, several rated high. Some fixes only protect you after code changes, such as setting the token audience or size limits.
- The v2 package split, the API renames and the ESM-only build make upgrading from v1 a breaking change for existing code.
- The PR backlog is large (394 open PRs, 306 open issues).
The numbers
- npm downloads, 4 weeks
- 357M ×11 in a year
- GitHub stars
- 14k
- Commits, 12 months
- 446
- npm version
- 1.32.2 Oct 2026
- Versions, 12 months
- 21
- Advisories, 24 months
- 9 of 9 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
The official SDK of the Model Context Protocol. It builds clients too. The numbers are of the version 1 package, @modelcontextprotocol/sdk. Version 2 splits it into packages, such as @modelcontextprotocol/server.
Read on 21 November 2026 from GitHub (modelcontextprotocol/typescript-sdk), npm (@modelcontextprotocol/sdk), OSV and the OpenSSF Scorecard.
MCP server frameworks
- 8.7MCP TypeScript SDK
- 7.1Cloudflare Agents SDK
- 7.1mcp-use
- 7.1xmcp
- 7.0MCP Handler
- 6.8tmcp
- 4.9FastMCP (TypeScript)
- 4.0mcp-framework
- 3.5mcp-lite