AI Crawler · Collection Records

Bot summary · Last 24 hours

MCP TypeScript SDK — MCP protocol

MCP TypeScript SDK rewritten based on web standards. Supports servers, clients, and multiple transports.
Markdown source·Anything to add or correct?

Official SDK for creating MCP servers and clients in TypeScript

Basic information

Program nameMCP TypeScript SDK (MCP TypeScript SDK)
One-line introductionOfficial SDK for creating MCP servers and clients in TypeScript
Development and maintenanceModel Context Protocol project
Official websitehttps://modelcontextprotocol.io/docs/sdk
Official documentationhttps://github.com/modelcontextprotocol/typescript-sdk
Installation and distributionnpm install @modelcontextprotocol/sdk
Runtime environmentNode.js · Bun · Deno
LicenseMIT license
Stable version1.32.1 (npm, confirmed 2026-10) — confirmed on 2026-10-18
GitHub repositoryhttps://github.com/modelcontextprotocol/typescript-sdk
CategoryMCP protocol (tags: MCP, SDK, TypeScript, server development, client)

What is this program?

MCP TypeScript SDK is the official SDK for creating MCP servers and clients in TypeScript. It was rewritten in 2026 to be based on Web standards (Web Standards) so it is not tied to Node.js, and it runs on Bun, Deno, and Cloudflare Workers.

It provides all core protocol features, including type-safe tool definitions, stdio and Streamable HTTP transports, and OAuth authentication. It is mainly used when creating servers that can connect to various MCP hosts, including Anthropic's Claude.

What problems does it solve?

  • Situations where you need to expose external APIs or internal tools as an MCP server
  • Situations where you need to build a type-safe MCP client in a TypeScript environment
  • Situations where you need a server that also runs on runtimes other than Node.js (Bun, Deno, Workers)

Key features

Type-safe server definition

Define tool inputs and outputs with Zod schemas

  • Use case: Prevent invalid calls at compile time
  • Result: Generate client code through automatic type inference
  • Limitations: Requires learning schema design

Multiple transports

Built-in support for stdio and Streamable HTTP transports

  • Use case: Implement both local and remote servers
  • Result: Select deployment environments without swapping transports
  • Limitations: Requires CORS and authentication configuration for remote deployment

OAuth support

Built-in Bearer token and refresh flow

  • Use case: Implement servers that require authentication
  • Result: Secure remote access
  • Limitations: May require configuring an OAuth provider

Based on Web Standards

Cross-runtime support not tied to Node.js

  • Use case: Runs on Bun, Deno, and Workers
  • Result: Reduced bundle size and improved portability
  • Limitations: Limited when using some Node-only APIs

Installation and execution

npm

Install the SDK in your project.


npm install @modelcontextprotocol/sdk

Bun

Install with the Bun package manager.


bun add @modelcontextprotocol/sdk

Deno

Install via JSR or npm compatibility.


deno add jsr:@modelcontextprotocol/sdk

Real-world usage examples

Creating a server

Create an McpServer instance and register tools.


new McpServer({name:'demo',version:'1.0.0'})

Registering a tool

Define tools and schemas with server.tool().


server.tool('get_weather','City name',{city:z.string()},...)

Connecting a transport

Connect StdioServerTransport or StreamableHTTPServerTransport.


await server.connect(new StdioServerTransport())

Advantages and limitations

Advantages

  • Official MCP project; the most actively maintained SDK
  • Web Standards-based compatibility with Bun, Deno, and Workers
  • Type-safe tool definitions and automatic code generation
  • MIT license

Considerations before use

  • May require migration to SDK v2 following the 2026-07-28 specification changes
  • Learning curve for Zod and TypeScript
  • Large servers require bundle size management

Comparison with similar programs

ProgramCharacteristicsSuitable for
MCP Python SDKOfficial SDK based on Python decoratorsPython backends and data tools
Go SDKTier 1 SDK based on Go 21+Go infrastructure teams
mcp-usePython framework; server and client abstractionRapid prototyping

Official resources and further learning

Version and supported environment information was verified on the official site as of 2026-10-18. Installation commands may vary depending on your distribution and version, so check the official installation documentation as well.

Actual execution screen

Synthetic example — not an actual execution result. The screen is a synthetic example and not an actual execution result.

!Example of installing MCP TypeScript SDK and running a server

A server in actual operation


Source (HTML): https://games.aidebatehub.com/programs/mcp/protocol/ts-sdk.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:31:00+09:00