home / mcp / express mcp server

Express MCP Server

Expose your Express endpoints as MCP tools with zero configuration, schema preservation, and streaming support

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bowen31337-expressjs_mcp": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

You can expose your Express endpoints as MCP tools, either by mounting them directly in your app or by running a lightweight HTTP gateway. This lets you preserve OpenAPI v3 schemas and existing Express authentication, while enabling real-time streaming, easy testing, and flexible deployment.

How to use

Connect to MCP endpoints from your preferred MCP client to discover available tools and invoke them. You can run a native MCP server that talks to your Express app, or mount MCP functionality directly in your app. The client will see your endpoints as describable tools with preserved schemas and authentication behavior.

How to install

Prerequisites: ensure you have Node.js installed on your machine. You may also use a package manager like npm, pnpm, or yarn.

Option 1 — Install from npm (recommended) via public CLI or local usage:

# Install globally
npm install -g expressjs-mcp

# Or with pnpm
pnpm add -g expressjs-mcp

# Use with npx (no installation required)
npx expressjs-mcp init

Option 2 — Clone and build locally:

git clone https://github.com/bowen31337/expressjs_mcp.git
cd expressjs_mcp
pnpm install && pnpm build

Configuration and usage examples

You can connect to MCP endpoints in two primary ways: via HTTP to a remote MCP gateway or via a local stdio setup that runs alongside your app.

{
  "type": "http",
  "name": "expressjs_mcp",
  "url": "http://localhost:3000/mcp",
  "args": []
}
{
  "type": "stdio",
  "name": "expressjs_mcp",
  "command": "npx",
  "args": ["expressjs-mcp","--url","http://localhost:3000/mcp"]
}

Streaming and testing

MCP supports streaming responses such as HTTP chunked streams, Server-Sent Events (SSE), and NDJSON. You can test connectivity and tool invocation from your MCP client after your Express server is running and MCP is mounted at the configured path.

Quick test steps you can perform in your environment once your server is up: