← Back to directory
M

MCP TypeScript SDK

Official
The official TypeScript SDK for building MCP servers and clients
GitHub source repository ↗
★ 13.0k Stars Category · Dev Tools Very popular
63FMRS · C
Reliability
10/20
Security and permissions
12/20
Maintenance
14/20
Documentation
14/20
Setup experience
13/20

This is a TypeScript SDK maintained by the Model Context Protocol owner, covering servers, clients, stdio, Streamable HTTP, and optional framework middleware. It is intended for integration development, not as a ready-made MCP server with business tools.

Read the FMRS scoring method →

The MCP TypeScript SDK is a TypeScript implementation of the Model Context Protocol for Node.js, Bun, and Deno. It provides server and client libraries for tools, resources, prompts, stdio, Streamable HTTP, and OAuth helpers, plus optional middleware for Express, Fastify, Hono, and Node.js HTTP.

Tools

The tool list has not been reviewed yet.

Setup

For servers, install with npm install @modelcontextprotocol/server. For clients, install with npm install @modelcontextprotocol/client. Bun and Deno installation alternatives are also documented. Optional packages include @modelcontextprotocol/node, @modelcontextprotocol/express, @modelcontextprotocol/fastify, and @modelcontextprotocol/hono.

Fit and risk

Best for

  • TypeScript developers building MCP servers or clients
  • Projects requiring Node.js, Bun, or Deno runtime support
  • Projects needing optional middleware for web framework integration

Not for

  • Users seeking ready-made business tools instead of an SDK
  • Users seeking a preconfigured desktop-client connection
  • Projects outside the TypeScript or JavaScript ecosystem

Required permissions

  • Permissions depend on the application and tool implementations built with the SDK
  • HTTP integrations may require handling requests, Host header validation, and JSON request bodies
  • OAuth permissions depend on the specific client or server implementation

Risks and side effects

  • The SDK does not define business-specific permissions; practical risk depends on the data and operations exposed by built tools
  • HTTP security depends on the application's host validation, authentication, and deployment configuration
  • The main branch is v2, so users must account for differences from the v1 API and documentation

Troubleshooting

  1. Verify that the correct @modelcontextprotocol/server or @modelcontextprotocol/client package is installed
  2. Check that the runtime is Node.js, Bun, or Deno
  3. For stdio integrations, confirm that the client and server use matching transport settings
  4. For HTTP integrations, check Host validation, JSON body parsing, and authentication configuration
  5. Consult the project's troubleshooting guide and v2 documentation

Use cases

Build MCP servers that expose tools, resources, or prompts
Build MCP clients that connect to MCP servers
Integrate MCP over stdio or Streamable HTTP
Connect MCP to Express, Fastify, Hono, or Node.js HTTP applications

Supported clients

Supported clients have not been confirmed yet.