MCP Middleware Adapter for Express Servers

by Moe03

12 stars
372 downloads
Not rated
GitHub

About

Run multiple MCP clients on a NodeJS Express server (adapter/middleware)

Details

Author
Moe03
GitHub stars
12
Downloads
372
Categories
Developer Tools

- Express middleware integration with SSE transport
- TypeScript‑friendly tool definition using Zod schemas
- Header‑based authorization support
- Multiple MCP clients on different endpoints
- Lightweight design for deploying and scaling MCP servers
- Simplifies hosting many MCP tools in one process

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Middleware Adapter for Express Servers
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via npm with npm install mcp-express-adapter@latest. Then define tools using the mcpTool helper with Zod schemas, create an MCPClient with an endpoint and tools, mount its middleware on an Express app, and connect to the SSE endpoint (e.g., http://localhost:3000/mcp/sse). To test with Claude Desktop, configure mcpServers using npx -y mcp-express-adapter --host <url>.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp middleware adapter for express servers": {
            "mcp-express-adapter": {
                "command": "npx",
                "args": [
                    "mcp-express-adapter@latest",
                    "--host",
                    "http://localhost:3000/mcp/sse",
                    "--header",
                    "Authorization: Bearer 000000"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-express-adapter": {
        "command": "npx",
        "args": [
            "mcp-express-adapter@latest",
            "--host",
            "http://localhost:3000/mcp/sse",
            "--header",
            "Authorization: Bearer 000000"
        ]
    }
}

MCP Middleware Adapter for Express Servers

- A lightweight adapter for creating MCP (Model Context Protocol) servers using Express.js.

- Sponsored by https://tixaeagents.ai create Text/Voice AI agents in seconds, compatible with MCP servers.

Checklist:

- [x] Express middleware integration SSE support
- [ ] Websocket integration support (Soon but SSE is working great)
- [x] Tool implementation with TypeScript support
- [x] Header-based authorization support
- [x] Multiple MCP clients on different endpoints
- [ ] Prompts support (Soon as it's kinda needless)

Why

- You can't seperately scale up or down your MCP clients (and group some together if they are all light weight) from the main LLM service hosting the chat, if you have 100 people opening playwright, brave, etc MCPs directly with npx on a single server that could easily eat up a lot of memory & bottleneck performance.
- Default way of deploying, updating & maintaining many MCP servers is annoying, this is trying to simplify it.

Installation

```bash
npm install mcp-express-adapter@latest

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.