Repository navigation
feat(mcp): load remote MCP tools on demand with bub-mcp 0.4.0 - #79
Merged
Merged
Conversation
bub-mcp 0.3.1 and later defer remote tools, so a configured server's `mcp_<server>_<tool>` stopped being callable by name once the pin moved. Adopt the newer behavior instead of holding the pin back: - bump bub-mcp to 0.4.0 and bind the renamed `MCPManager` to `BubAgent` - render the deferred tool list, which the SDK section no longer supplies because Landing owns its prompt sections - cover loading a tool with `tool_describe` before calling it in the MCP tests and document the flow
Contributor
Author
There was a problem hiding this comment.
No blocking findings.
The deferred-tool path works through the real runtime: with a workspace .agents/mcp.json, the first model request offers tool_describe with - mcp_evidence_record under <deferred_tools>, the load-then-call sequence records the evidence, a mode excluded_tools entry for that server tool removes both the listing and tool_describe, and the documented mcp: deferred_tools: false escape hatch in Landing YAML puts mcp_evidence_record back in the request's tool list with no deferred section.
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.
Purpose
Landing pinned
bub-mcp==0.3.0because every later release defers remote MCP tools: a configured server'smcp_<server>_<tool>stopped being callable by name. This adopts the deferred behavior and moves the pin tobub-mcp==0.4.0, which #78 listed as the alternative to freezing MCP behavior.bub-mcpto 0.4.0 and bind the renamedMCPManagertoBubAgentinlanding.mcp.connected_tools.BubAgent.prepare_toolsexposestool_describefor deferred tools, but Landing replaces the agent's prompt sections with its own, so the SDK's<deferred_tools>section was missing and the model never learned which server tools it could load. A probe of the first model request showedtool_describeoffered with no deferred list; after the change the same request carries- mcp_evidence_recordunder<deferred_tools>.tests/test_mcp.pyso each task loads the tool withtool_describebefore calling it.docs/reference/configuration.mdanddocs/guides/mcp.md, includingmcp.deferred_tools: falseas the way to keep direct tools.Closes #78.
Validation
uv run python -m pytest— 136 passed.tests/test_mcp.pycovers CLI configuration selection, mode permissions, workspace switching, cancellation, and a missing explicit config, all through the load-then-call path.tool_describestep fromtest_cli_uses_selected_mcp_configuration[project]makes it fail with no receipt written, so the passing tests do depend on the tool being loaded, not on a direct call.uv run ty check— All checks passed.uv run pre-commit run --all-files— passed.make docs-test— No issues found.mcp: deferred_tools: falsein Landing YAML still offers the server tool directly and records a direct call, confirming the documented escape hatch.Compatibility
Model-facing behavior changes: server tools no longer appear in the tool list until the model loads them with
tool_describe, which the task prompt now lists. Modeallowed_tools/excluded_toolsstill filter before loading, so excluded server tools are neither listed nor loadable. Configure nativemcp.deferred_tools: falseto keep the previous direct-tool behavior. No CLI, HTTP, or stored-data changes.AI assistance
Written by Landing's fixer mode on bub-mcp 0.4.0 / Bub 0.6.1 with the model provider recorded by the runner; the delegated maintainer decision came from #78.