Conversation
|
|
||
| async def get_server_tools(server): | ||
| # Check if we already have tools for this server in mcp_tools | ||
| if self.mcp_tools: |
There was a problem hiding this comment.
So this block already prevents the recreation/reconnection to mcp servers that have already been declared and added to the list
|
I generally support having a central MCP manager but there are a few things it should do/interventions we should make to be considered complete: Minimum:
Possibly another PR
Possibly yet another PR
|
|
Right now, we have a base implementation that sets the ground for separate PRs. I dont want to add too much into a single PR. For the rest of the points, we can create tickets and track them via that way. |
|
Also, can we squash these commits when we merge them? There's no history loss here if its all condensed into a single commit (i believe github has a setting to allow this when merging PRs to make it easier) |
| Initialize tools from all configured MCP servers. MCP Servers that fail to be | ||
| initialized will not be available to the Coder instance. | ||
| """ | ||
| # TODO(@gopar): refactor here once we have fully moved over to use the mcp manager |
There was a problem hiding this comment.
Still valid since this is a minimal PR to get the codebase using the mcp manager
Oh! Weird how I missed that. The only one that is an actual issue is the |
* Add an MCP Server Manager * Remove unneeded magic methods * Handle asyncio errors and exit flow * Working version with mcp manager * Update tests * Simplify manager class * Update agent coder to use mcp server

Right now, a connection is reset every time a new
Coderinstance is created (which is extremely frequently). To better handle resources and make switching modes faster (not waiting on establishing MCP server(s) connection again), we'll delegate all this to a manager that we can just pass around.