Debuly
MCP TypeScript SDK logo

MCP TypeScript SDK

Official TypeScript SDK for building Model Context Protocol servers and clients that run on Node.js, Bun and Deno.

Open source

What is MCP TypeScript SDK?

The MCP TypeScript SDK is the official TypeScript implementation of the Model Context Protocol, the open protocol for plugging AI applications into the data sources and tools they need. You build a server that offers tools, resources and prompts, and any MCP host such as Claude Code, VS Code or Cursor can connect to it and let a model call them. Version 2, the current stable line, implements the 2026-07-28 spec and ships as separate packages including @modelcontextprotocol/server and @modelcontextprotocol/client, plus adapters for Express, Fastify, Hono and Node. Tool inputs are declared with a schema such as Zod, and the SDK validates each call before your handler runs. A full stdio server fits in one file, and client packages let you build applications that talk to MCP servers. The older v1 line, published as @modelcontextprotocol/sdk, gets bug fixes and security updates only. It is free open-source software installed from npm.

Use cases

  • Build an MCP server in TypeScript
  • Expose an internal API to AI assistants
  • Write an MCP client application
  • Add MCP to an Express or Hono app
  • Run an MCP server on Cloudflare Workers
  • Upgrade a project from SDK v1 to v2

Who it's for

  • TypeScript developers
  • JavaScript developers
  • AI engineers
  • Backend teams

Why use MCP TypeScript SDK

  • A tool is a name, a schema and a handler, so you do not hand-write protocol messages.
  • Zod-style input schemas validate every call before your code runs, which cuts defensive checks.
  • Framework adapters let you add an MCP endpoint to the Express, Hono or Fastify app you already run.
  • The same toolkit covers servers and clients, so one team can build both sides of an integration.
  • A codemod package and migration guide reduce the work of moving from v1 to v2.

MCP TypeScript SDK features

  • McpServer class with registerTool for defining tools
  • Resources and prompts alongside tools
  • Input validation against Zod schemas before handlers run
  • stdio and Streamable HTTP serving
  • Separate client package for talking to MCP servers
  • Adapters for Express, Fastify, Hono and Node HTTP
  • Runs on Node.js, Bun and Deno
  • Sessions and authorization helpers
  • Codemod package for migrating from v1
  • Generated API reference for all packages

MCP TypeScript SDK integrations

  • Claude Code
  • VS Code
  • Cursor
  • GitHub Copilot
  • Express
  • Fastify
  • Hono
  • Zod

How to get started with MCP TypeScript SDK

  1. Install @modelcontextprotocol/server with npm, and add the client or an adapter package if you need one.
  2. Create an McpServer, then register tools with an input schema and an async handler.
  3. Serve it over stdio with serveStdio, or over HTTP through the Express, Hono, Fastify or Node adapter.
  4. Register the launch command in a host such as VS Code, Claude Code or Cursor.
  5. Ask the assistant a question and approve the tool call it proposes.

MCP TypeScript SDK limitations

  • v2 ships as separate packages and replaces the single v1 package, so existing projects must migrate
  • v1 documents the 2025-11-25 spec and gets only fixes and security updates
  • A stdio server must log to stderr because stdout carries the protocol
  • It is a developer library, not a hosted service or end-user app

MCP TypeScript SDK pricing

MCP TypeScript SDK is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

MCP TypeScript SDK alternatives

The main MCP TypeScript SDK alternatives listed on Debuly are MCP Python SDK, FastMCP, Letta, LMQL, Agno and Bult. The table compares pricing and platforms; order is A–Z.

MCP TypeScript SDK compared with its alternatives
ToolPricingStarting pricePlatforms
MCP TypeScript SDKOpen source—API, CLI
AgnoOpen source—API, Web, Self-hosted, CLI
BultFree trial$5/moWeb, CLI, MCP
FastMCPOpen source—Python, CLI, API
LettaFreemium$20/moCLI, Web, API
LMQLOpen source—Python, CLI, Web, Self-hosted
MCP Python SDKOpen source—API, CLI
  1. Agno

    Python framework and AgentOS runtime for building agents, teams and workflows, then serving them as an API with a control plane.

  2. Bult

    Deployment platform for Node.js, Python and AI apps with Git deploys, one-click templates, an AI copilot and an MCP server for agents.

  3. FastMCP

    Python framework for building Model Context Protocol servers, clients and interactive apps, with managed hosting via Prefect Horizon.

  4. Letta

    Platform, formerly MemGPT, for building stateful AI agents with persistent memory, from a terminal app, SDK or API.

  5. LMQL

    Programming language from ETH Zurich for LLM prompting that adds Python control flow, typed variables and hard output constraints.

  6. MCP Python SDK

    The official open-source Python library for writing Model Context Protocol servers and clients that give LLM apps access to tools and data.

MCP TypeScript SDK FAQ

What is the MCP TypeScript SDK?

It is the official TypeScript library for the Model Context Protocol. You use it to build servers that expose tools, resources and prompts and clients that connect to MCP servers.

How much does the MCP TypeScript SDK cost?

Nothing. The SDK is open source and installed from npm, and the documentation lists no pricing or paid plans.

Is the MCP TypeScript SDK open source?

Yes. It is developed in the modelcontextprotocol/typescript-sdk repository on GitHub, and the packages are free to install.

Which runtimes does it support?

The v2 docs say the SDK runs on Node.js, Bun and Deno, with adapters for Express, Hono, Fastify and Cloudflare Workers.

What is the difference between v1 and v2?

v2 is the current stable line implementing the 2026-07-28 spec as separate server and client packages. v1 is the single @modelcontextprotocol/sdk package in maintenance mode, receiving fixes for at least six months after the v2 release.

Does it work with Claude Code, VS Code and Cursor?

Yes. Any host that can launch a command and talk over stdio can use a server built with the SDK, and the docs show registering one in VS Code with Copilot, Claude Code and Cursor.

What are alternatives to the MCP TypeScript SDK?

Alternatives include the MCP Python SDK, FastMCP and other language SDKs, depending on which language you build in.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

Image credits

  • Logo: from ts.sdk.modelcontextprotocol.io · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.