# MCP TypeScript SDK

CreateWithAI Hub page: https://createwithaihub.com/apis-sdks/mcp-typescript-sdk
Latest version of this file: https://createwithaihub.com/apis-sdks/mcp-typescript-sdk.md

- Type: API / SDK · Category: APIs & SDKs
- Publisher: Model Context Protocol project
- Pricing: Free · License: Apache-2.0

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

The MCP TypeScript SDK is the official implementation of the Model Context Protocol for TypeScript and JavaScript. It ships server libraries (tools, resources, prompts, Streamable HTTP, stdio, auth helpers), client libraries, and thin middleware packages for Express, Fastify, Hono and Node.js HTTP. Version 2 splits the SDK into @modelcontextprotocol/server and @modelcontextprotocol/client packages.

Useful for: Exposing an API or data source to Claude and other MCP clients as an MCP server, or adding MCP client support to your own agent.

## Key features

- Server library for tools, resources and prompts
- Client library with transports and OAuth helpers
- Streamable HTTP and stdio transports
- Middleware packages for Express, Fastify, Hono and Node.js HTTP
- Schemas via Standard Schema (Zod v4, Valibot, ArkType)
- Runs on Node.js, Bun and Deno

## Connection

- SDK language: TypeScript / JS

## Before you start

- Node.js, Bun or Deno

## Install steps from the official documentation

Server package:

```
npm install @modelcontextprotocol/server
```

Client package:

```
npm install @modelcontextprotocol/client
```

## Limitations

- v2 changed package names; v1.x (@modelcontextprotocol/sdk) is on a maintenance branch

## Official links

- Website: https://modelcontextprotocol.io
- Source repository: https://github.com/modelcontextprotocol/typescript-sdk
- Documentation: https://ts.sdk.modelcontextprotocol.io/v2/
- Source: https://github.com/modelcontextprotocol/typescript-sdk (v2 packages, features, install commands, runtimes; not archived)
- Source: https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/packages/server/package.json (license field Apache-2.0)
- Source: https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/LICENSE (Licensing transition from MIT to Apache-2.0)
