Express MCP Server

Express middleware for handling Model Context Protocol (MCP) requests

Local serverstdioTypeScript

What is the Express MCP server?

Connect Express to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Express middleware for handling Model Context Protocol (MCP) requests. The express mcp server is what makes that connection.

What the server does

A middleware for integrating Model Context Protocol (MCP) with Express applications, enabling seamless communication between LLMs and tools.

Model Context Protocol (MCP) is an open protocol for integrating large language models (LLMs) with external data sources and tools. It enables AI assistants to access real-time data, execute operations, and interact with various services through a standardized interface.

  • Stateful Handler — Can handle one off requests or maintain long-lived sessions with session IDs and Server-Sent Events (SSE)
  • Stateless Handler — Handles each request in complete isolation for simple, one-off interactions
  • SSE Handler — Handles Model Context Protocol (MCP) over Server-Sent Events (SSE) with dedicated GET and POST endpoints
  • Type-Safe API — Built with TypeScript for reliable integration
  • Flexible Configuration — Customizable error handling, session management, and lifecycle hooks
  • Express Integration — Plugs directly into Express routes with middleware pattern

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • statefulHandler — The statefulHandler tool exposed by this server
  • statelessHandler — The statelessHandler tool exposed by this server
  • sseHandlers — The sseHandlers tool exposed by this server

Installation

The server ships on npm as express-mcp-handler, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Where it fits

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Express's toolset — statefulHandler, statelessHandler, sseHandlers — is a fair guide to whether it matches your workflow. It is maintained by jhgaylor; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
statefulHandlerThe statefulHandler tool exposed by this server.
statelessHandlerThe statelessHandler tool exposed by this server.
sseHandlersThe sseHandlers tool exposed by this server.

How to install the Express MCP server

{
  "mcpServers": {
    "express": {
      "command": "npx",
      "args": ["-y", "express-mcp-handler"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Express to statefulHandler.
  • Use Express to statelessHandler.
  • Use Express to sseHandlers.

Frequently asked questions

It connects Express to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (statefulHandler, statelessHandler, sseHandlers) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Express directly.