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

  • E2B

    SDK / Tool

    Open-source secure sandboxes where AI agents run code — the de facto execution layer for agent apps.

    • sandbox
    • code-execution
    • sdk
    • agents
  • FastMCP

    SDK / Tool

    Pythonic framework for building MCP servers — decorators, type hints, and zero boilerplate.

    • framework
    • python
    • mcp
    • type-driven
  • Anthropic's official TypeScript SDK for building agentic applications.

    • official
    • sdk
    • typescript
    • anthropic