ClaudeMap

MCP TypeScript SDK

Official TypeScript SDK for building MCP servers and clients.

SDKs & Toolingofficialmcpsdktypescript

Official TypeScript SDK for building MCP servers and clients. Maintained by the modelcontextprotocol organisation; the canonical implementation alongside the Python SDK.

What it does

  • The official TypeScript/JavaScript SDK for building MCP clients and servers, maintained by modelcontextprotocol
  • High-level McpServer API plus low-level Server/Client for full protocol control
  • Zod-based tool and resource schema definitions with typed inputs/outputs
  • Transports: stdio, Streamable HTTP, SSE (legacy) — swap without touching handler code
  • What most production TypeScript MCP servers are built on

When to use it

The starting point for writing your own MCP server in TypeScript, or a client that embeds MCP support in an app. Pair with the MCP Inspector for testing during development.

Getting started

npm install @modelcontextprotocol/sdk
# Node 18+ required. Minimal server:

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new McpServer({ name: "my-server", version: "1.0.0" });
// register tools, resources, prompts...
await server.connect(new StdioServerTransport());

Things to know

Protocol versioning moves fast — pin the SDK version and check the spec changelog when clients fail to handshake. ESM-first: CommonJS setups hit import-path gotchas. The high-level API covers common cases; exotic transports push you to the low-level layer quickly.

Repository

modelcontextprotocol/typescript-sdk

Charted

Related on the map

  • Harness Bridge

    SDK / Tool

    A local launcher that points Claude Code and seven other coding harnesses at any OpenAI-, Anthropic- or Responses-compatible endpoint — without editing a single config file.

    • launcher
    • local-models
    • cli
    • menu-bar
  • Claude for Siri

    SDK / Tool

    Answers macOS Spotlight and Siri prompts with your signed-in Claude Code account — an experimental macOS 27 model-delegation provider.

    • macos
    • siri
    • spotlight
    • model-delegation
  • Extract your own local chat history from ten AI coding assistants into one normalized JSONL — for fine-tuning, analytics, or backing up years of conversations. Standard library only.

    • cli
    • data-export
    • jsonl
    • backup