typescript-sdk/packages/middleware
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Pavlovschii 75dc7ea6e2
fix(server): reject a modern POST without the required MCP-Protocol-Version header (#2590)
Co-authored-by: Konstantin Konstantinov <konstantin@mach5technology.com>
Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com>
2026-08-17 09:31:47 +03:00
..
express Version Packages (#2555) 2026-07-28 00:52:57 +01:00
fastify Version Packages (#2555) 2026-07-28 00:52:57 +01:00
hono Version Packages (#2555) 2026-07-28 00:52:57 +01:00
node fix(server): reject a modern POST without the required MCP-Protocol-Version header (#2590) 2026-08-17 09:31:47 +03:00
README.md docs: comprehensive GA pass — stable-release wording, released-spec links, install tags (#2566) 2026-07-27 23:32:17 +01:00

Middleware packages

The packages in packages/middleware/* are thin integration layers that help you expose an MCP server in a specific runtime, platform, or web framework.

They intentionally do not add new MCP features or “business logic”. MCP functionality (tools, resources, prompts, transports, auth primitives, etc.) lives in @modelcontextprotocol/server (and other core packages). Middleware packages should primarily:

  • adapt request/response types to the SDK (e.g. Node.js IncomingMessage/ServerResponse)
  • provide small framework helpers (e.g. wiring, body parsing hooks)
  • supply safe defaults for common deployment pitfalls (e.g. localhost DNS rebinding protection)

Packages

  • @modelcontextprotocol/express — Express helpers (app defaults + Host header validation for DNS rebinding protection).
  • @modelcontextprotocol/fastify — Fastify helpers (app defaults + Host header validation).
  • @modelcontextprotocol/hono — Hono helpers (app defaults + JSON body parsing hook + Host header validation).
  • @modelcontextprotocol/node — Node.js Streamable HTTP transport wrapper for IncomingMessage/ServerResponse.

Typical usage

Most servers use:

  • @modelcontextprotocol/server for the MCP server implementation
  • one middleware package for framework/runtime integration (this folder)
  • (optionally) additional platform/framework dependencies (Express, Hono, etc.)