feat: add dynamic MCP server infrastructure to McpPool#3869
Open
bistack wants to merge 1 commit into
Open
Conversation
|
Thanks @bistack for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
Add in-memory dynamic server support to McpPool for runtime-started MCP servers from conversation context. - New `dynamic_servers` field (parking_lot::RwLock) on McpPool - `add_runtime_server_config()` rejects duplicate names (static or dynamic) - `get_or_connect()` checks dynamic servers before static config - `server_names()` includes both static and dynamic servers - Conflict tests for static/dynamic name overlap Prerequisite for Hmbown#3866 (start_mcp_server tool). Extracted as a focused infrastructure PR to isolate the trust-boundary surface (runtime MCP pool mutation) from the tool implementation.
19a93d6 to
fc26429
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add in-memory dynamic server support to McpPool for runtime-started MCP servers from conversation context. This is the foundation layer for a
start_mcp_servertool that allows LLM to dynamically start MCP servers.Changes
dynamic_serversfield (parking_lot::RwLock) onMcpPooladd_runtime_server_config()rejects duplicate names (static or dynamic), returnsResultget_or_connect()checks dynamic servers before static configserver_names()includes both static and dynamic serversDesign decisions
Testing
cargo fmt --all -- --checkcargo clippy -p codewhale-tui --all-targets --all-featurescargo test -p codewhale-tui --locked -- add_runtime_server_config— 3 passedcargo test -p codewhale-tui --locked -- workspace_mcp_pool— 4 passedcargo test -p codewhale-tui --locked -- reload_if_config_changed— 4 passedRelated
Addresses issue 3 from PR #3866.