fix: MCP loader/agent — empty-list semantics, collision warning, kwargs forwarding, concurrent execution - #12
Open
wilsonhj wants to merge 1 commit into
Open
Conversation
…ning, kwargs forwarding, concurrent tool execution Also pin langchain family and langchain-mcp-adapters to bounded version ranges so the MCP dependencies install reproducibly. Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Jul 8, 2026
Merged
Contributor
Author
Runtime verification — PASS ✅ (real stdio MCP server end-to-end)Verified against a live MCP server over stdio transport (FastMCP, mcp 1.28.1:
One sub-claim not driven live: the cross-server same-name collision warning (requires two servers sharing a tool name; the logic is a simple dict-overwrite-with-warning). Everything else runtime-confirmed. |
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.
Fixes
Four defects in the MCP tool layer, plus a performance improvement:
MCPToolLoader.load_tools([])treated an explicit empty list as "no filter" (load everything) instead of "no tools".MCPToolAgent.ainvokeviolated its own-> dictreturn type when no tool was called.ainvokedropped**kwargsinstead of forwarding them tollm.ainvoke.asyncio.gather(order-preserving; per-tool error isolation unchanged — one failing/slow tool cannot affect siblings).Verification
tests/unit_tests/tools/test_mcp.py: 11 passed, including a rendezvous test (asyncio.Event-based, no wall-clock sleeps) that only passes under true concurrency — it fails on revert to the sequential loop.config.data.get(...)dict access;model()call signature unchanged).Sequencing
Includes the shared dependency pin (needed to build standalone); that hunk rebases away once #10 merges. Otherwise independent of the other PRs in the series.
Co-authored-by: Claude noreply@anthropic.com