RepoPilot

modelcontextprotocol / typescript-sdk

Search modelcontextprotocol/typescript-sdk

GitHub

Get started

Taken from the repository's own files on 22 Oct 2026. RepoPilot has not run these commands.

Prerequisites

Commands

No scripts found at the top level of the repository. Check package.json .

Install and use

README.md

Server

npm install @modelcontextprotocol/server
# or
bun add @modelcontextprotocol/server
# or
deno add npm:@modelcontextprotocol/server

Client

npm install @modelcontextprotocol/client
# or
bun add @modelcontextprotocol/client
# or
deno add npm:@modelcontextprotocol/client

Optional middleware packages

The SDK also publishes optional “middleware” packages that help you wire MCP into a specific runtime or web framework (for example Express, Fastify, Hono, or Node.js http).

These packages are intentionally thin adapters and should not introduce additional MCP features or business logic. See packages/middleware/README.md for details.

# Node.js HTTP (IncomingMessage/ServerResponse) Streamable HTTP transport:
npm install @modelcontextprotocol/node

# Express integration:
npm install @modelcontextprotocol/express express

# Fastify integration:
npm install @modelcontextprotocol/fastify fastify

# Hono integration:
npm install @modelcontextprotocol/hono hono

Open README.md

Developing

CONTRIBUTING.md

Running Examples

See examples/README.md for the full list of runnable examples — one self-verifying client/server pair per directory.

Quick start:

# Run any story's server
pnpm --filter @mcp-examples/tools server -- --http --port 3000

# Run its client (in another terminal)
pnpm --filter @mcp-examples/tools client -- --http http://127.0.0.1:3000/

# Run every story over every transport × era leg
pnpm run:examples

Read the rest of CONTRIBUTING.md