Multi-Server-MCP
The Multi MCP Agent Project is a modular and extensible agent system designed to connect multiple tool servers to a FastAPI backend and a simple web frontend. It utilizes Azure OpenAI for natural language understanding and supports local MCP servers for math, text utilities, and code execution. The project allows integration with external MCP servers, making it versatile for various applications.
GitHub Stars
0
User Rating
Not Rated
Forks
0
Issues
0
Views
1
Favorites
0
Multi MCP Agent Project
A modular, extensible agent system using the MCP (Model Context Protocol) to connect multiple tool servers (math, text utilities, code execution, and more) to a FastAPI backend and a simple web frontend. The agent leverages Azure OpenAI for natural language understanding and can be extended with additional MCP servers, both local and remote.
Features
- FastAPI backend for handling user queries and serving the frontend
- LangChain agent powered by Azure OpenAI
- MCP protocol for tool server integration
- Local MCP servers for math, text utilities, and code execution
- Support for external MCP servers via
.vscode/mcp.json
(see notes below) - Simple HTML frontend for user interaction
Project Structure
Multi MCP/
│
├── main.py # FastAPI backend
├── client.py # Agent logic and MCP client config
├── math_server.py # Math operations MCP server
├── text_utilities_server.py # Text summarization, translation, keyword extraction MCP server
├── code_execution_server.py # Code execution MCP server
├── frontend.html # Web UI
├── requirements.txt # Python dependencies
├── .env # Environment variables (not committed)
└── .vscode/
└── mcp.json # External MCP server configs (see below)
Setup Instructions
1. Clone the Repository
git clone <https://github.com/balogunadebola/Multi-Server-MCP.git>
cd Multi MCP
2. Install Python Dependencies
pip install -r requirements.txt
3. Configure Environment Variables
Create a .env
file in the project root with your Azure OpenAI credentials:
AZURE_OPENAI_API_KEY=your-azure-openai-key
AZURE_OPENAI_ENDPOINT=your-azure-endpoint
AZURE_OPENAI_VERSION=2023-05-15
4. (Optional) Configure External MCP Servers
Edit .vscode/mcp.json
to add or modify external MCP servers. Note: Dynamic runners like uvx
/uvenv
are deprecated and not supported. For external servers, use direct HTTP endpoints or run the server locally and point to it with command
and args
.
Running the Application
Start the FastAPI server:
python main.py
This will:
- Start the backend on
http://127.0.0.1:8000/
- Launch all configured MCP servers (math, text utilities, code execution, and any in
.vscode/mcp.json
that use a valid local runner)
Open frontend.html
in your browser to use the web interface.
Available MCP Servers & Tools
Math Server (math_server.py
)
- Addition, subtraction, multiplication, division, square
Text Utilities Server (text_utilities_server.py
)
- Text summarization
- Translation (placeholder)
- Keyword extraction
Code Execution Server (code_execution_server.py
)
- Run Python code
- Simulate JavaScript execution (placeholder)
- Run shell commands
External Servers (via .vscode/mcp.json
)
- You can add external MCP servers by specifying their HTTP endpoint or a local script. Dynamic remote runners are not supported.
Extending the System
- Add new local MCP servers by creating a Python script and registering tools with the FastMCP decorator pattern.
- Add external servers by editing
.vscode/mcp.json
(HTTP endpoints or local scripts only). - Update
client.py
andmain.py
if you add new local servers.
Security Notes
- The code execution server can run arbitrary Python and shell code. Use with caution and never expose to untrusted users.
- Keep your
.env
file secure and never commit it to version control.
Credits
License
MIT License
I'm a Data Enthusiast who loves to generate insights from data to provide solutions for clients. I'm also proficient in Power BI, Microsoft Excel and SQL tools.
1
Followers
17
Repositories
0
Gists
1
Total Contributions