Skip to content

[Feature Proposal] Dynamic Server Management with McpClientManager + FastAPI #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lemonit-eric-mao opened this issue Apr 24, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@lemonit-eric-mao
Copy link

Hi Team,

First, thank you for maintaining this great project! While using it, I noticed a common need for dynamic server management. To address this, I’ve implemented a McpClientManager admin interface with FastAPI to provide full API support.

✨ Key Features:

🚀 Dynamic Server Management: Register/unregister servers via RESTful API in real time
🔍 Client State Control: Granular query and management of client status
🧩 Multi-Service Support: Register and manage multiple service instances
🌊 Streaming Adaptation: Added streaming response support for better interaction
Motivation:
Static configuration often requires service restarts in microservices scenarios. This extension improves deployment flexibility and operational efficiency.

Next Steps:

Does this align with the project’s roadmap?
If so, I can:
Submit a well-structured PR
Adjust the design/implementation based on feedback
Provide full documentation and test cases
Looking forward to your thoughts! Let me know if you have any suggestions.

@HarrisonUnifyAI
Copy link

@lemonit-eric-mao I would be very interested in looking at the code if you don't mind! I am having trouble getting an MCP server operating in a RESTful manner from an EC2 instance so it could be very helpful. As well as needing to be able to wrap it with Auth, etc...

@ihrpr ihrpr added the enhancement New feature or request label Apr 27, 2025
@lemonit-eric-mao
Copy link
Author

@HarrisonUnifyAI Thank you for your approval! I've prepared the demo program and source code for your review:

📌 Repository:
https://github.com/lemonit-eric-mao/fastmcp_multi_server.git

Key features included:

Complete FastAPI implementation
SSE-based multi-server management functionality
Streaming response support

@lemonit-eric-mao
Copy link
Author

mcp-demo.mp4

@lemonit-eric-mao
Copy link
Author

@HarrisonUnifyAI Hello, could you please provide some guidance? Our production environment primarily deploys SSE (Server-Sent Events) model-based programs. The main reason is that we need to dynamically add or remove MCP servers for maintenance in a live environment that cannot afford downtime.

According to the official documentation, the current design requires MCP clients and servers to start simultaneously, and it does not support dynamic registration/unregistration of MCP servers. Could you confirm whether this feature will be supported in future updates?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants