← Back to directory
M

MCP TypeScript SDK

Official
Framework / SDK
The official TypeScript SDK for building MCP servers and clients

This is a framework for building MCP servers or agents, not a server you connect a client to.

Category
Dev Tools #74 of 438
Stars
★ 13.6k Very popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Node.js · Bun · Deno
Credentials
No credential needed
License
Other / unspecified
Last commit
63FMRS · C

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.

Strongest · Documentation 14/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
12/20
Maintenance
14/20
Documentation
14/20
Setup experience
13/20
Why each score
Reliability 10/20
The README presents a plausible path for creating a server, registering a tool, and connecting over stdio, and it references HTTP, client support, examples, and troubleshooting. However, no cached manifest, source files, CI workflows, or committed test evidence are provided, so initialization, tool-list consistency, error handling, and dependency control cannot be statically verified. The score is therefore capped below 12 and reduced for missing reviewable evidence on key paths.
Security and permissions 12/20
The README identifies stdio, Streamable HTTP, authentication and OAuth helpers, and Host-header validation in several middleware packages, making major security boundaries visible. It does not provide source evidence for permission scopes, credential storage, data flows, dangerous-operation confirmation, or default network behavior. No obvious malicious or red-line default side effect is shown, but the missing evidence limits confidence.
Maintenance 14/20
The repository is not archived; the README identifies v2 as the stable line, promises v1 security updates for at least six months, and describes Apache-2.0 licensing for new contributions with existing MIT code. Public issues and documentation provide maintenance entry points. Release cadence, commit activity, dependency-update practice, vulnerability response, and explicit maintainer ownership are not supplied, so a high score is not justified.
Documentation 14/20
The README provides installation paths for Node.js, Bun, and Deno; server and client tutorials; API documentation; a documentation site; troubleshooting; OAuth; HTTP and stdio guidance; and example links. It does not sufficiently document parameter limits, operational constraints, costs, credential lifecycle, or common security failures, and the supplied material does not verify the examples or test outcomes.
Setup experience 13/20
Installation commands cover npm, Bun, and Deno, with separate server, client, and middleware guidance; the minimal stdio server example is concise. There is no complete mainstream-client configuration example, authentication setup, or verifiable connection result, and the optional middleware choices add complexity. The setup is therefore usable but not highly turnkey.

Test out of dateListed 2026-07-29

Read the FMRS scoring method →

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

Setup

Before you start

Runtime:Node.js · Bun · Deno

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.

Check that it works

After installing @modelcontextprotocol/server, run the README's greet example; a connected client should list a tool named greet, and calling it returns text like "Hello, <name>!".

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

Things to try

Once connected, you can ask your AI assistant things like:

  • Write a minimal MCP server using @modelcontextprotocol/server that exposes a greet tool.
  • Hook my MCP server into HTTP using the Express middleware package.
  • Write an MCP client that connects to that server and lists its tools.

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

Overview

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.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 63.3k · Tools 2 Compare with this →

Source revision 9bc40e903fde Data synced 2026-10-19 Read the FMRS scoring method