Repolode
modelcontextprotocol

modelcontextprotocol/typescript-sdk

The official TypeScript SDK for building Model Context Protocol servers and clients that give LLM applications standardized context.

Stars
13,620
Forks
2,543
Open issues
601
Last commit
20 hours ago

What is it?

The Model Context Protocol (MCP) lets applications supply context to LLMs in a standard way, separating context provision from the model interaction itself. This repository is the official TypeScript implementation of the MCP specification, with separate packages for building servers (@modelcontextprotocol/server) and clients (@modelcontextprotocol/client).

The server package covers tools, resources and prompts, Streamable HTTP and stdio transports, and auth helpers. The client package provides transports, high-level helpers and OAuth support. Tool and prompt schemas use Standard Schema, so libraries such as Zod v4, Valibot or ArkType can be used.

The SDK runs on Node.js, Bun and Deno. Optional middleware packages adapt it to Express, Fastify, Hono and the Node.js HTTP module, and the repository includes runnable examples.

Key features

  • 01Build MCP servers with tools, resources and prompts.
  • 02Build MCP clients with transports, high-level helpers and OAuth support.
  • 03Supports Streamable HTTP and stdio transports.
  • 04Schemas work with Standard Schema libraries such as Zod v4 and Valibot.
  • 05Runs on Node.js, Bun and Deno.
  • 06Optional middleware for Express, Fastify, Hono and Node.js HTTP.

Use cases

  • Exposing internal APIs or data sources as tools for AI assistants.
  • Building a TypeScript client that connects an app to MCP servers.
  • Wiring an MCP server into an existing Express or Fastify backend.

Quick start

  1. 1

    Install the server package with npm

    npm install @modelcontextprotocol/server
  2. 2

    Build your first server by following the tutorial in the README

Things to know

  • License is listed as NOASSERTION in metadata; the README states Apache-2.0 for new contributions with existing code under MIT.
  • Current main branch is v2, and v1.x receives only bug fixes and security updates for a limited time after the v2 release.

Topics

FAQ

What is typescript-sdk?
The official TypeScript SDK for building Model Context Protocol servers and clients that give LLM applications standardized context. The Model Context Protocol (MCP) lets applications supply context to LLMs in a standard way, separating context provision from the model interaction itself. This repository is the official TypeScript implementation of the MCP specification, with separate packages for building servers (@modelcontextprotocol/server) and clients (@modelcontextprotocol/client).
Is typescript-sdk free to use? What license does it have?
typescript-sdk is open source under the Other license. Check the license terms before using it in commercial products.
Is typescript-sdk still maintained?
Actively maintained. The last commit to typescript-sdk was on Oct 20, 2026.
What can I use typescript-sdk for?
Exposing internal APIs or data sources as tools for AI assistants. Building a TypeScript client that connects an app to MCP servers. Wiring an MCP server into an existing Express or Fastify backend.
How do I install typescript-sdk?
Install the server package with npm: npm install @modelcontextprotocol/server Build your first server by following the tutorial in the README
Where can I get typescript-sdk?
The source code and installation instructions are on GitHub: https://github.com/modelcontextprotocol/typescript-sdk

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects