Skip to content

refactor: Simplify MCP code around Client, Server and Gateway concepts - #595

Merged
jcarver989 merged 6 commits into
mainfrom
refactor/mcp-utils
Oct 12, 2026
Merged

jcarver989 merged 6 commits into
mainfrom
refactor/mcp-utils

Conversation

@jcarver989

@jcarver989 jcarver989 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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.

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
jcarver989 enabled auto-merge (squash) October 12, 2026 15:01
@jcarver989
jcarver989 merged commit f55ab43 into main Oct 12, 2026
16 checks passed
@jcarver989
jcarver989 deleted the refactor/mcp-utils branch October 12, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant