What is MCP TypeScript SDK?
MCP TypeScript SDK is Build MCP servers and clients in TypeScript on Node.js, Bun or Deno. The repository ships both halves of the protocol: server libraries for exposing capabilities, and client libraries for connecting to and consuming them. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in TypeScript and licensed Apache-2.0 for new contributions, with existing code under MIT.
Overview
The MCP TypeScript SDK is the official TypeScript implementation of the Model Context Protocol, the standard that lets an application supply an LLM with context — tools it can call, resources it can read, and prompts it can reuse — separately from the model interaction itself. The repository ships both halves of the protocol: server libraries for exposing capabilities, and client libraries for connecting to and consuming them.
It is published as a monorepo of split packages. `@modelcontextprotocol/server` is what you install to build a server; `@modelcontextprotocol/client` is what you install to build a client. Both run on Node.js, Bun and Deno. Tool and prompt schemas are declared through Standard Schema, so you can bring Zod v4, Valibot, ArkType or any other compatible validation library rather than being tied to one.
Alongside the two core packages the project publishes deliberately thin middleware adapters — `@modelcontextprotocol/node`, `/express`, `/fastify` and `/hono` — that wire the Streamable HTTP transport into a specific runtime or web framework without adding protocol features of their own. The `main` branch is the v2 line, implementing the 2026-07-28 MCP specification; the v1 generation continues to receive bug and security fixes on its own long-lived branch.
What it does
- Server libraries covering tools, resources and prompts, with stdio and Streamable HTTP transports and auth helpers
- Client libraries with transports, high-level helpers and OAuth helpers for connecting to any MCP server
- Standard Schema support, so tool and prompt schemas can be written in Zod v4, Valibot, ArkType or another compatible library
- Runs on Node.js, Bun and Deno from the same packages
- Optional thin middleware packages for Node's http, Express, Fastify and Hono
- Runnable example client/server pairs in the repository's examples directory
Getting started
Install the server package, register a tool, and connect the server to a transport. The example below is the minimal stdio server from the project README.
Install the server package
Use npm, Bun or Deno — the SDK supports all three runtimes.
npm install @modelcontextprotocol/serverWrite a server that exposes one tool
Create an McpServer, register a tool with a schema and handler, then connect it over stdio.
import { McpServer } from '@modelcontextprotocol/server';
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
import * as z from 'zod/v4';
const server = new McpServer({ name: 'greeting-server', version: '1.0.0' });
server.registerTool(
'greet',
{
description: 'Greet someone by name',
inputSchema: z.object({ name: z.string() })
},
async ({ name }) => ({
content: [{ type: 'text', text: `Hello, ${name}!` }]
})
);
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
}
main();Add a client, or serve over HTTP
Install the client package to connect to a server, list its tools and call them. To serve over Streamable HTTP instead of stdio, add the middleware package for your framework.
npm install @modelcontextprotocol/client
# serving over HTTP with Express:
npm install @modelcontextprotocol/express expressCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Expose an internal API or database to Claude, ChatGPT or any MCP-capable agent as a set of typed tools
- Build an MCP client so your own application can discover and call tools from third-party MCP servers
- Publish a server over Streamable HTTP inside an existing Express, Fastify or Hono service
- Prototype a local integration over stdio before deciding how to host it
How MCP TypeScript SDK compares
MCP TypeScript SDK alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| DeepSeek Harness | ★ 289k | DeepSeek AI's open-source agent harness (dsh), built on Cordis, where models, tools, skills, sessions, sandboxes, storage and the UI are all plugins composed through profiles. |
| AutoGPT | ★ 188k | One of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows. |
| DeerFlow | ★ 86k | ByteDance's open-source super agent harness built on LangGraph: skills, sub-agents, sandboxes, a filesystem and long-term memory for long-horizon research, coding and content tasks. |
| nanobot | ★ 50.5k | Lightweight self-hosted personal AI agent framework in Python, with a WebUI, terminal and chat-app channels, tools, long-term memory, MCP and scheduled automations. |
| LangGraph | ★ 45.6k | A library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints. |
| Agno | ★ 43.3k | A fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production. |
| AgentGPT | ★ 36.3k | AgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser. |
| MCP TypeScript SDK | ★ 13.8k | Build MCP servers and clients in TypeScript on Node.js, Bun or Deno |
