MCP Proxy Server logo

MCP Proxy Server

by ptbsare

The MCP Proxy Server acts as a central hub for Model Context Protocol (MCP) resource servers, connecting to and managing multiple backend MCP servers. It exposes their combined capabilities through a single, unified SSE interface or acts as a single Stdio-based MCP server itself.

View on GitHub

Last updated: N/A

What is MCP Proxy Server?

The MCP Proxy Server is a central hub for managing multiple backend MCP resource servers (both Stdio and SSE types). It aggregates their capabilities and exposes them through a single interface, either as a unified SSE endpoint or as a Stdio-based MCP server.

How to use MCP Proxy Server?

The server can be used either as a Stdio MCP server (configured via command-line execution) or as an SSE MCP server (configured via environment variables and accessed through an SSE endpoint). Configuration is primarily done via environment variables and JSON files in the ./config directory, defining server connections and tool configurations. Clients connect to the proxy server to access the aggregated resources and tools.

Key features of MCP Proxy Server

  • Web UI Management (optional)

  • Granular Tool Control

  • Dual SSE Authentication

  • Improved SSE Session Handling

  • Real-time Install Output

  • Web Terminal (optional)

Use cases of MCP Proxy Server

  • Aggregating multiple MCP servers into a single endpoint.

  • Managing and controlling access to individual tools from different MCP servers.

  • Providing a secure and unified interface for MCP clients.

  • Monitoring the installation progress of Stdio servers.

  • Providing a web-based terminal for direct server interaction (use with caution).

FAQ from MCP Proxy Server

How do I configure the backend MCP servers?

Backend servers are configured in the config/mcp_server.json file, defining their connection details (command, URL, API keys, etc.).

How do I enable the Web Admin UI?

Set the ENABLE_ADMIN_UI environment variable to true and configure the ADMIN_USERNAME and ADMIN_PASSWORD.

How do I secure the SSE endpoint?

Set the MCP_PROXY_SSE_ALLOWED_KEYS environment variable to a comma-separated list of allowed API keys.

Where are Stdio servers installed by default?

If installDirectory is not specified in mcp_server.json, the server is installed in a subdirectory named after the server key within the TOOLS_FOLDER (or ./tools if TOOLS_FOLDER is not set).

How do I run the server in development mode?

Use npm run dev for Stdio mode or ENABLE_ADMIN_UI=true npm run dev:sse for SSE mode.