-
Notifications
You must be signed in to change notification settings - Fork 285
Dynamic mcp handling #291
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
base: main
Are you sure you want to change the base?
Dynamic mcp handling #291
Conversation
don't register the same agent multiple times
Also disabled human input callback
Disable human input when nont in interactive mode
and undo the input suppression in server mode
Added Visible INFO Logging for Agent Deactivation Fixed Animated Dots for DEACTIVATED Status Hide MCP Server Entries from Progress Display Fixed Background Polling for Agent Reactivation
fix indentation issues
fix import - i think this is why the Agent is not being reactivated once the mcp server comes back online
dynamic handling is now working, and the progress display is nice
Adds comprehensive MCP server polling and dynamic agent management - Change mcp_polling_interval default from 60s to None (no polling by default) - Add proactive monitoring of ALL MCP servers during polling cycles - Implement simple agent status management: * Deactivate agents when their servers go offline during runtime * Reactivate agents when their servers come back online - Use direct server connectivity testing via temporary connections - Add 3-retry logic with exponential backoff for tool calls - Update progress display: * Show the MCP Server Polling in the progress display * Show "Deactivated" status when polling is disabled * Show "Running" during active server health checks * Show "Ready" between cycles with server status details - Give users full control over polling frequency vs performance trade-offs - they can set an interval that works best for their situation This provides comprehensive server monitoring with automatic agent lifecycle management while maintaining zero performance impact by default.
Restore the cli handling that was accidentally deleted
Use mcp_polling_ferquency as a switch to also enable/disable automatic disabling of agents at startup when the mcp servers it need are not available. This preserves the existing behavior, since mcp_polling_frequency defaults to None The failing test should now pass
This should fix the broken tests
Hi @jdecker76 this looks good at first pass, and I think intersects with some improvements I think are necessary for any Production level client dealing with Streamable HTTP. Below is my list of connection "things" that I wanted to get covered somehow:
Some of this is driven from: https://huggingface.co/blog/building-hf-mcp Q - What does it mean for an agent to be "Deactivated". It can't meaningfully participate in workflows, so without a queueing/resume system (perhaps A2A participation) I'm not sure what the desired behaviour is? |
refs #289
Adds comprehensive MCP server polling and dynamic agent management
mcp_polling_interval
, which defaults to None (I.e. polling disabled by default)This provides comprehensive MCP server monitoring with automatic agent lifecycle
management while maintaining zero performance impact by default.
If this is considered for inclusion in Fast Agent, I will update the docs repo