MCP TypeScript SDK
Not yet source-checkedOfficial TypeScript SDK for building Model Context Protocol servers and clients.
Machine-drafted from the vendor's site · not yet source-checkedProfile updated Link checked How we rate
In short
The official TypeScript SDK for building Model Context Protocol servers and clients. It supports Node.js, Bun, and Deno with OAuth and HTTP transports.
TypeScript and Node.js developers building MCP servers to expose internal APIs or data to Claude Desktop, Cursor and other MCP-aware agents, or building agent apps that consume MCP tools.
Non-JavaScript stacks, teams that want a no-code tool-builder UI, or anyone looking for a hosted MCP marketplace rather than an SDK to write servers with.
The MCP TypeScript SDK is the official Model Context Protocol implementation for the JavaScript/TypeScript ecosystem, maintained by the Model Context Protocol organization alongside SDKs for Python, Kotlin, C#, Java, Ruby, Swift, Rust and others. It gives developers a batteries-included toolkit for building both MCP servers (which expose tools, resources and prompts to LLM hosts like Claude Desktop, Cursor, Zed, VS Code and Windsurf) and MCP clients (which consume those servers from inside an agent or app).
The v2 line implements the 2026-07-28 MCP specification. Server helpers cover tool registration, structured input/output validation via Standard Schema (Zod, Valibot, ArkType), resource templates with URI-style routing, prompt libraries, sampling requests back to the host model, and progress/notification streams. Transport support includes stdio for local process-based servers and Streamable HTTP for remote/hosted servers, with drop-in middleware for Express, Fastify, Hono and the raw Node HTTP module, plus first-class runtime support for Node.js, Bun and Deno. Built-in OAuth 2.1 helpers handle authorization for hosted servers, and the client library ships transport implementations, session helpers and typed request/response objects.
Typical workflows: wrapping an internal REST or GraphQL API as a locally installed MCP server so Claude Desktop or Cursor can call it as tools; publishing a hosted Streamable-HTTP server behind OAuth that any MCP-aware agent can attach to; writing an agent that discovers and invokes third-party MCP servers; or scaffolding integration tests against a live MCP server using the client's in-memory transport. Documentation, tutorials and runnable examples live at ts.sdk.modelcontextprotocol.io.
If you are writing MCP servers in TypeScript, this is the SDK to start with — full stop. The reference-implementation status matters because MCP is still evolving, and lagging a spec revision is a real risk with community ports. The v2 rewrite around Standard Schema and pluggable HTTP middleware is a big quality-of-life step over v1.
— The AI Tool Bible editorial team
Pros
- ✅ Official reference implementation — tracks new MCP spec revisions faster than community SDKs
- ✅ Covers both server and client sides in one package family, so agents and tools share types
- ✅ Standard Schema support means you can bring Zod, Valibot or ArkType instead of a proprietary validator
- ✅ Middleware adapters for Express, Fastify, Hono and node:http make hosted deployment straightforward
- ✅ First-class Node, Bun and Deno runtime support
- ✅ Built-in OAuth 2.1 helpers remove most of the auth boilerplate for remote servers
- ✅ Apache 2.0 / MIT licensing is friendly for commercial and closed-source use
Cons
- ⚠️ MCP itself is young and the spec still shifts — v2 (2026-07-28) is a breaking change from v1 servers
- ⚠️ Documentation is improving but examples still lag Python SDK coverage for advanced patterns
- ⚠️ TypeScript-only — teams on Go, Rust or PHP need a different SDK or a thin wrapper
- ⚠️ Streamable HTTP transport is newer than stdio and has fewer battle-tested production references
- ⚠️ You still write, deploy and secure the server yourself; the SDK does not provide hosting or a registry
Facts
- API available
- Yes
- Open source
- Yes (license: NOASSERTION)
- GitHub stars
- 13,675 (checked Oct 29, 2026)
- Last GitHub push
- Oct 28, 2026
- First commit
- Sep 2024
- Package downloads (30 d)
- 37,298,999 · npm @modelcontextprotocol/server · checked Oct 16, 2026
Where this tool sits
Use cases
Frequently asked
- Is the MCP TypeScript SDK free to use?
- Yes, it is free and open source. New contributions are licensed under Apache 2.0, while older code is under the MIT license.
- Which runtimes and frameworks are supported?
- It supports Node.js, Bun, and Deno. For HTTP servers, it offers middleware for Express, Fastify, Hono, and the raw Node HTTP module.
- Can I use it to build MCP clients?
- Yes, the SDK includes a client library with transport implementations, session helpers, and typed request/response objects for consuming MCP servers.
- Does it support authentication for hosted servers?
- Yes, built-in OAuth 2.1 helpers handle authorization for hosted servers, allowing secure access for MCP-aware agents.
- What validation libraries are supported for inputs?
- It uses Standard Schema for structured input/output validation, supporting libraries like Zod, Valibot, and ArkType.
- Is it suitable for non-JavaScript developers?
- No, it is best for TypeScript and Node.js developers. Non-JavaScript stacks should look for other SDKs like Python, Kotlin, or Rust.