- Explore MCP Servers
- my_mcp
My Mcp
What is My Mcp
my_mcp is a lightweight, self-hosted MCP (Model Context Protocol) server that allows for quick transformation of existing backend services into an MCP-compliant server with minimal changes.
Use cases
Use cases for my_mcp include transforming legacy systems into MCP-compliant services, integrating multiple backend services into a unified MCP interface, and enhancing existing applications with MCP capabilities.
How to use
To use my_mcp, install the required dependencies using ‘pip install -r requirements.txt’, then start the server with ‘uvicorn app:app --host 0.0.0.0 --port 8000 --reload’. Finally, connect to the MCP Inspector by setting the MCP Server URL to ‘http://localhost:8000’.
Key features
Key features of my_mcp include fast transformation of backend services, auto discovery of service methods, full MCP compatibility, minimal invasive changes to existing logic, and a plug-and-play setup.
Where to use
my_mcp can be used in various fields such as software development, API integration, and microservices architecture where there is a need to expose existing services as MCP tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is My Mcp
my_mcp is a lightweight, self-hosted MCP (Model Context Protocol) server that allows for quick transformation of existing backend services into an MCP-compliant server with minimal changes.
Use cases
Use cases for my_mcp include transforming legacy systems into MCP-compliant services, integrating multiple backend services into a unified MCP interface, and enhancing existing applications with MCP capabilities.
How to use
To use my_mcp, install the required dependencies using ‘pip install -r requirements.txt’, then start the server with ‘uvicorn app:app --host 0.0.0.0 --port 8000 --reload’. Finally, connect to the MCP Inspector by setting the MCP Server URL to ‘http://localhost:8000’.
Key features
Key features of my_mcp include fast transformation of backend services, auto discovery of service methods, full MCP compatibility, minimal invasive changes to existing logic, and a plug-and-play setup.
Where to use
my_mcp can be used in various fields such as software development, API integration, and microservices architecture where there is a need to expose existing services as MCP tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
🚀 My MCP Server
A lightweight, self-hosted MCP (Model Context Protocol) server based on the official MCP specification.
🚀 What is this?
This project provides a quick transformation structure
to adapt your existing backend services into an MCP-compliant server with minimal changes.
You can expose your existing service methods as MCP tools effortlessly!
✅ Only one requirement:
Make sure your services/ package contains all the business interfaces you want to expose as MCP tools.
🛠️ Features
- ⚡ Fast Transformation: Quickly adapt your current backend into an MCP server.
- 🔍 Auto Discovery: Automatically scan and register service methods as MCP tools.
- 📦 Fully MCP-Compatible: Seamless connection to MCP Inspector or any MCP-compliant client.
- 🛠️ Minimal Invasive: No need to heavily modify your existing service logic.
- 🚀 Plug-and-Play: Just organize your methods properly under the
services/directory.
📂 Project Structure
my_mcp_server/ ├── app.py # FastAPI app, defines /sse and /rpc endpoints ├── config/ # Configuration files ├── core/ │ ├── mcp_session.py # MCP session logic │ ├── mcp_session_manager.py # Session management │ ├── models/ # Event, McpRequest, Tool models │ └── utils/ # Scanners and path finders ├── services/ # Business services to expose as MCP tools │ ├── math_tool.py # Example tool: math operations ├── README.md # Project documentation └── requirements.txt # Python dependencies
📦 Quick Start
1. Install dependencies
pip install -r requirements.txt
2. Start the server
uvicorn app:app --host 0.0.0.0 --port 8000 --reload
3. Connect MCP Inspector
- Open MCP Inspector
- Set your MCP Server URL to:
http://localhost:8000 - Start interacting!
📚 How It Works
- When a client connects to
/sse, the server:- Creates a new
McpSession. - Scans all tools in
services/and registers them. - Immediately pushes an
initializeevent.
- Creates a new
- When a client sends a request to
/v1/mcp/events/send:- The server routes it to the correct session.
- Dispatches
initialize,tools/list, ortools/callaccordingly.
- Tools are dynamically mapped to your service methods.
⚠️ Notes
- All business logic you want to expose must be placed inside the
services/directory. - Each service method should be an
async defcoroutine. - Tool scanning supports simple class-based services.
- Make sure method names are unique across all services to avoid conflicts.
📄 Example Service (services/math_tool.py)
class MathService:
async def add(self, a: int, b: int) -> int:
"""Add two numbers."""
return a + b
async def subtract(self, a: int, b: int) -> int:
"""Subtract two numbers."""
return a - b
Once placed under services/, they will be automatically scanned and registered as MCP tools!
📋 Todo (optional extensions)
- [ ] Support nested sub-packages inside
services/ - [ ] Add Session idle timeout and auto cleanup
- [ ] Add
/healthand/metricsendpoints - [ ] Add Dockerfile and CI/CD scripts
📜 License
This project is open-sourced under the MIT License.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










