home / mcp / drunk mcp proxy mcp server
Provides a dynamic MCP proxy gateway that consolidates multiple MCP backends with static and dynamic configuration, and supports API key authentication and Docker deployment.
Configuration
View docs{
"mcpServers": {
"baoduy-drunk-mcp-proxy": {
"url": "https://mcp.deepwiki.com/mcp",
"headers": {
"PYTHONPATH": "/app/src",
"MCP_CONFIG_FILE": "/path/to/data/mcp.json",
"MCP_PROXIES_FILE": "/path/to/data/proxies.json",
"MCP_AUTH_CONFIG_FILE": "/path/to/data/auth.json"
}
}
}
}You can proxy and manage multiple MCP backends through a single, dynamic gateway. This MCP proxy consolidates access to multiple MCP servers, lets you add new backends on the fly, and provides persistent storage, authentication, and containerized deployment options for easy operations.
Connect your MCP client to the proxy as you would to any MCP server. The proxy will forward requests to configured backend MCP servers and aggregate their responses. You can add new MCP backends at runtime, list all proxies, and view server information to understand what the proxy supports.
Prerequisites: Python 3.11+ and FastMCP installed in your environment. You will also need Docker if you plan to use containerized deployment.
# Quick local setup with Python
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Run the server locally
python src/main.pyStatic configuration can be defined in a dedicated JSON file. Dynamic proxies are created at runtime and saved to a separate file, ensuring changes persist across restarts. The proxy validates configurations against JSON schemas to catch errors early.
Static configuration (mcp.json) defines default MCP servers and their transport. Example below shows how to configure a pre-existing backend.
{
"mcpServers": {
"deepwiki": {
"url": "https://mcp.deepwiki.com/mcp",
"transport": "http"
}
}
}API key-based authentication is available to secure access to your MCP backends. Authentication is disabled by default to simplify initial setup. You can enable authentication, create API keys for clients, check status, and revoke keys as needed.
The following environment variables configure file paths and Python module resolution for development and deployment.
MCP_CONFIG_FILE: path to the static configuration file
MCP_PROXIES_FILE: path to the dynamic proxies file
MCP_AUTH_CONFIG_FILE: path to the authentication configuration file
PYTHONPATH: Python module search pathThe project includes a dedicated set of tools to manage proxies and view server information.
If the proxy cannot start or fails to load configurations, verify that the static and dynamic configuration files exist, have valid JSON, and are accessible by the process. Ensure Docker volumes or local paths are correctly mounted when using containerized deployment.
Single deepwiki backend configuration is shown in the static example above. You can extend the list with additional MCP backends by updating the static configuration file.
The proxy sits between MCP clients and multiple MCP backends, routing requests to the appropriate servers and aggregating responses.
This server supports Docker and Docker Compose for containerized deployment, and it includes built-in tooling for dynamic proxy management.
To contribute or explore the codebase, install dependencies and run the server in a development environment as described above.
Dynamically add a new MCP proxy server with a name, URL, and transport protocol
List all configured MCP proxy servers, including both static and dynamic proxies
Retrieve information about this MCP proxy server, including version and features
Manage API key authentication, including enabling, creating keys, and disabling authentication