Skip to content

feat(mcp): load remote MCP tools on demand with bub-mcp 0.4.0 - #79

Merged
PsiACE merged 1 commit into
mainfrom
deps/landing-bub-mcp-040
Nov 10, 2026
Merged

PsiACE merged 1 commit into
mainfrom
deps/landing-bub-mcp-040

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Purpose

Landing pinned bub-mcp==0.3.0 because every later release defers remote MCP tools: a configured server's mcp_<server>_<tool> stopped being callable by name. This adopts the deferred behavior and moves the pin to bub-mcp==0.4.0, which #78 listed as the alternative to freezing MCP behavior.

  • Bump bub-mcp to 0.4.0 and bind the renamed MCPManager to BubAgent in landing.mcp.connected_tools.
  • Render the deferred tool list in Landing's system prompt. BubAgent.prepare_tools exposes tool_describe for 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 showed tool_describe offered with no deferred list; after the change the same request carries - mcp_evidence_record under <deferred_tools>.
  • Update tests/test_mcp.py so each task loads the tool with tool_describe before calling it.
  • Document loading on demand in docs/reference/configuration.md and docs/guides/mcp.md, including mcp.deferred_tools: false as the way to keep direct tools.

Closes #78.

Validation

  • uv run python -m pytest — 136 passed. tests/test_mcp.py covers CLI configuration selection, mode permissions, workspace switching, cancellation, and a missing explicit config, all through the load-then-call path.
  • Removing the tool_describe step from test_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.
  • A one-off probe with mcp: deferred_tools: false in 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. Mode allowed_tools/excluded_tools still filter before loading, so excluded server tools are neither listed nor loadable. Configure native mcp.deferred_tools: false to 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.

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@PsiACE
PsiACE merged commit ceb3185 into main Nov 10, 2026
18 checks passed
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.

deps: bub-mcp 0.3.1+ makes remote MCP tools deferred, blocking the pin update

1 participant