Repository navigation
refactor: Simplify MCP code around Client, Server and Gateway concepts - #595
Merged
Merged
Conversation
Replace the client manager and snapshot architecture with explicit McpClient, McpGateway, and McpServer APIs so transport and connection lifecycle are independent of agent-specific policy. Consolidate transports, OAuth, elicitation, tool calls, and task handling behind the new APIs. Move configuration, tool filtering, and model-facing discovery out of this crate. Replace legacy test helpers with in-memory server and task fakes, and cover the client, gateway, server, and OAuth public APIs.
Introduce McpCatalog as the agent-facing view over McpGateway, with configuration, tool filtering, and direct or deferred exposure managed by aether-core. Move progressive discovery instructions and deferred-tool IPC into the core runtime. Synchronize agent tools and server instructions directly from catalog changes instead of external update commands. Replace the MCP handle and runtime abstractions, adapt tool and task execution, and migrate examples and tests to the new public APIs.
Use aether-core MCP configuration and tool-filter types instead of depending directly on mcp-utils. Represent inline sources with McpConfig and centralize file and source resolution on McpFileSpec and McpSourceSpec. Reuse the same optional-file and variable handling when resolving agent catalogs and producing portable settings.
Use McpServer for built-in server construction and share the Builtin and Host setup paths between agent-hosted and standalone servers. Adapt request context, background tasks, and subagent execution to the new MCP APIs. Pass deferred-tool IPC access through the agent's bash environment rather than owning discovery instructions here. Migrate server integration tests and documentation, and cover built-in construction and stdio transport through the new hosting interfaces.
Exclude system messages when comparing live and replayed message identities so session assertions focus on durable conversation boundaries rather than runtime-managed prompt content. Share the identity comparison helper and compare the continuation context against the corresponding restored conversation prefix.
Use McpCatalog throughout runtime construction, headless execution, prompt previews, MCP commands, and ACP sessions instead of the legacy MCP runtime and event-pump APIs. Resolve slash commands from server-associated prompts and keep ACP command formatting in the session layer. Exercise prompt expansion and command updates through ACP integration tests. Preserve typed selection, configuration, startup, and agent errors. Update generated settings and documentation for the new MCP config shape, and refresh the workspace lockfile.
jcarver989
force-pushed
the
refactor/mcp-utils
branch
from
October 12, 2026 15:01
b0cb7c1 to
98eed0d
Compare
jcarver989
enabled auto-merge (squash)
October 12, 2026 15:01
Open
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.
This is a large refactor of aether's MCP handling code, to centralize it around 3 core concepts -- client, server and gateway. End uses should not notice behavioral differences.