MCP Server Manager
by OwenQian
A Python script to manage Model Context Protocol (MCP) servers, automatically wrapping stdio servers with Supergateway to expose them as SSE servers. It allows you to configure and run multiple MCP servers simultaneously, enhancing AI assistants like those in Cursor.
Last updated: N/A
What is MCP Server Manager?
MCP Server Manager is a Python script that simplifies the management of Model Context Protocol (MCP) servers. It handles the configuration, execution, and monitoring of multiple servers, including automatically wrapping stdio servers with Supergateway to expose them as SSE endpoints for use with AI assistants like Cursor.
How to use MCP Server Manager?
- Clone the repository and set up your environment with API keys in the .env file.
- Install the required Python packages using
pip install -r requirements.txt
. - Configure your MCP servers in
mcp_config.json
or using the provided CLI. - Run the MCP Inspector server using
make run-inspector
. - Start the MCP servers using
make run-servers
orpython mcp_servers.py run-all
. - Configure Cursor to use the MCP servers by editing
~/.cursor/mcp.json
. - Test connectivity in the MCP Inspector or by asking Cursor questions that utilize the configured servers.
Key features of MCP Server Manager
Configure and manage multiple MCP servers
Automatic wrapping of stdio servers with Supergateway for SSE exposure
Simultaneous execution of multiple servers in background mode
Support for both stdio and SSE MCP servers
Automatic server recovery with keep-alive functionality (restart on crash)
Graceful shutdown of all servers on interrupt (Ctrl+C)
Use cases of MCP Server Manager
Providing AI assistants with access to local file systems
Enabling AI assistants to search and fetch YouTube videos
Allowing AI assistants to make HTTP requests to external APIs
Integrating GitHub repositories with AI assistants
Web search capabilities for AI assistants
Mapping and location services for AI assistants
FAQ from MCP Server Manager
What is Supergateway?
What is Supergateway?
Supergateway is a tool used to convert stdio-based MCP servers into SSE (Server-Sent Events) servers, which are required for communication with AI assistants like Cursor.
How do I configure my MCP servers?
How do I configure my MCP servers?
You can configure your MCP servers by editing the mcp_config.json
file directly, using the provided CLI (python mcp_servers.py add
), or by asking Cursor to do it for you.
What is the purpose of the MCP Inspector?
What is the purpose of the MCP Inspector?
The MCP Inspector is a web interface that allows you to test the connectivity and functionality of your MCP servers.
How does the keep-alive functionality work?
How does the keep-alive functionality work?
The keep-alive functionality monitors each server process and automatically restarts it if it crashes, up to 3 times. The retry counter resets after 30 seconds of successful operation.
How do I use a custom configuration file?
How do I use a custom configuration file?
You can use the --config
flag with any of the python mcp_servers.py
commands to specify a custom configuration file path, e.g., python mcp_servers.py list --config custom_config.json
.