feat(mcp): client tool adapters over external MCP servers - #265
Merged
Conversation
Contributor
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
7 tasks
Nexo as an MCP client: external streamable-HTTP MCP servers surface their tools
as namespaced ITool proxies (mcp:{server}:{tool}) that reach agent toolboxes
through a new IToolSource seam.
- src/Nexo.Mcp.Client: McpClientConnectionManager (hosted service) dials
configured servers, pins each tool definition (name/description/raw schema)
for the process lifetime, and faults on drift instead of following remote
redefinitions; unreachable servers degrade to zero tools; remote isError and
transport failures map to error payloads per the repo tool convention;
per-server API keys are env-var named and verified present at startup.
- Nexo.Abstractions.IToolSource: SDK-free seam for post-startup-discovered
tools; RepoFsToolboxFactory gains an extraTools fold-in and
SelfExtendRunnerAdapter snapshots DI-registered sources each cycle.
- src/Nexo.Mcp.Client.Tests: 29 tests, including full protocol round trips -
a real McpClient against the real Nexo.Mcp.Server bridge over in-memory
pipes (list/call/structured-content/protocol-error), plus manager
pin-and-proxy end-to-end.
- Directory.Packages.props: Microsoft.Extensions.Options.ConfigurationExtensions
pin (10.0.11).
Fail-closed: Enabled=false default, ValidateOnStart, AirGapped refusal, empty
allowlists, stdio child processes deliberately excluded from v1.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>IanFrelingerforce-pushed
the
feat/mcp-server-bridge
branch
from
August 13, 2026 18:17
6e8afe9 to
9e941bbCompareIanFrelingerforce-pushed
the
feat/mcp-client-tools
branch
from
August 13, 2026 18:17
ad0dda2 to
d749db1CompareUh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 13, 2026
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 freeto 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
PR-2 of the MCP/A2A series (stacked on #264 → #263; retarget to
masteras parents merge). Nexo becomes an MCP client: external streamable-HTTP MCP servers contribute their tools to Nexo agent toolboxes as namespacedIToolproxies, with pinned definitions and fail-closed drift handling. Design:docs/architecture/ProtocolIntegration-MCP-A2A.md(Phase 2 section added).Changes
src/Nexo.Mcp.Client—McpClientConnectionManager(hosted service +IToolSource):AllowedToolsnarrowing).mcp:{server}:{tool}— a remote server can never shadowrepo.fs.write(CapabilityRegistry registration is last-wins by id).isError/transport failures →McpToolFailureerror payloads (repo tool convention, model-visible); API keys are env-var-named with presence verified at startup; stdio child processes deliberately out of v1 (command-allowlist design needed first).Nexo.Abstractions.IToolSource— one SDK-free interface for post-startup-discovered tools;RepoFsToolboxFactorygains anextraToolsfold-in andSelfExtendRunnerAdaptersnapshots DI-registered sources each cycle (optional ctor param, no existing call sites broken).src/Nexo.Mcp.Client.Tests— 29 tests, headlined by full protocol round trips: a realMcpClientagainst the real PR-1 server bridge over in-memory pipes (sanitized-name listing, call with structured content, unknown-tool protocol error, manager pin→proxy→invoke end-to-end). Plus 4 fold-in tests inNexo.Tests.BackgroundAgents.Directory.Packages.props:Microsoft.Extensions.Options.ConfigurationExtensions10.0.11 pin.LICENSING.mdOPEN rows,Nexo.slnentries, docs Phase-2 section.Testing
dotnet test src/Nexo.Mcp.Client.Tests— 29/29 locally (roll-forward runtime)dotnet test src/Nexo.Tests.BackgroundAgents --filter RepoFsToolboxFactoryExtraToolsTests— 4/4 on net8.0 + net9.0Testing strategy (blast radius)
Tier-2 adapter + one additive optional-param seam in
BackgroundAgents.HostRunners(outside kernel-gate paths);Nexo.Abstractionsgains one interface (no behavior).— n/a (nomake kernel-coverage-gatesrc/Nexo.Core.*/Infrastructurechanges)— n/amake kernel-gate— n/amake test-prod-styleChecklist
TODOorNotImplementedExceptionleft unresolvedRepoFsToolboxFactorycall sites unchanged)Release (only when this PR ships a versioned NuGet/GHCR release)
🤖 Generated with Claude Code