Skip to content

refactor(mcp): delete the outbound MCP code that nothing reaches - #3817

Merged
dan-petty merged 2 commits into
mainfrom
refactor/1330-delete-outbound-mcp-code
Nov 6, 2026
Merged

dan-petty merged 2 commits into
mainfrom
refactor/1330-delete-outbound-mcp-code

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Outbound MCP means devops-cli as a client of another MCP server. No command, setting or entry point reaches that code. The MCPToolset wrapper does not connect: its close does nothing and its get_tools returns its own list. The helpers in ai/mcp/toolset.py only re-export pydantic-ai.

This change deletes that code, its tests and the stale knowledge-base examples. The two tests of live code move to the test file that mirrors ai/tools/. A future MCP client uses pydantic-ai's own MCPToolset, so no wrapper is needed.

Closes #3762

Change: openspec/changes/archive/2026-11-06-3762-delete-outbound-mcp-code/

Outbound MCP code has no caller in src: the MCPToolset wrapper in ai/agents/tools.py does not connect, and the helpers of ai/mcp/toolset.py only re-export pydantic-ai. Delete them with PydanticAgent.set_mcp_sampling_model, get_devops_mcp_toolset and their tests. The knowledge-base examples call pydantic-ai's own MCPToolset. The two tests of live code move to tests/ai/tools/.
@dan-petty dan-petty added type/refactor Type refactor: a new structure, same behavior scope/mcp Model Context Protocol tools, system resources, and prompts labels Nov 6, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Check results (local, before the first push):

  • Full uv run devops ci on the final code: all jobs pass except test and coverage. coverage fails only because test failed.
  • test: 19809 passed, 2 failed, 1 error. The failures are test_mark_only_commands_under_global_dry_run and test_the_direct_executor_refuses_a_network_profile_before_it_starts_the_tool[direct]. Both depend on tools in the shared home volume. Both also fail on a checkout of main without this change.
  • After the rebase onto origin/main (f1130d3): tests/ai/agents, tests/ai/tools and tests/ai/mcp pass (728 tests). ruff check passes.

@dan-petty
dan-petty marked this pull request as ready for review November 6, 2026 18:19
@dan-petty
dan-petty merged commit b28fd4d into main Nov 6, 2026
24 checks passed
@dan-petty
dan-petty deleted the refactor/1330-delete-outbound-mcp-code branch November 6, 2026 18:20
dan-petty pushed a commit that referenced this pull request Nov 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.71.0](v0.70.2...v0.71.0)
(2026-11-06)


### Features

* **roadmap:** a Service row runs the retitle job
([#3811](#3811))
([f1130d3](f1130d3))
* **roadmap:** list moved plan paths in the stage comment
([#3805](#3805))
([b550b07](b550b07))


### Bug Fixes

* **review:** Limit lockfile bucket to CONST_LOCKFILE_NAMES
([#3808](#3808))
([0b2909a](0b2909a))
* **security:** make clean-default model fields required
([#3807](#3807))
([dcc22b0](dcc22b0))


### Code Refactoring

* **ci:** record keep-port decision
([#3816](#3816))
([7ca3afd](7ca3afd))
* **mcp:** delete the outbound MCP code that nothing reaches
([#3817](#3817))
([b28fd4d](b28fd4d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/mcp Model Context Protocol tools, system resources, and prompts type/refactor Type refactor: a new structure, same behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(ai): delete the outbound MCP toolset code with no caller

1 participant