# PR — remove the MCP (ReAct) search strategy

Component deleted in this PR (see the PR diff / `git show <sha>:<path>` for the
full pre-deletion code — this file only summarises what was novel). Tracked by
issue #4548.

## Component: `MCPSearchStrategy`

- Files deleted:
  - `src/local_deep_research/advanced_search_system/strategies/mcp_strategy.py`
    (1876 LOC) — the strategy itself.
  - `src/local_deep_research/mcp/client.py` (486 LOC) — the MCP **client**
    (`MCPClient` / `MCPClientManager` / `run_async`), whose only consumer was
    `MCPSearchStrategy`. `src/local_deep_research/mcp/server.py` (LDR-as-an-MCP-
    **provider**, FastMCP) is unrelated and **survives**.
- Reachability: factory keys `mcp` / `agentic` (`agentic` was a pure alias),
  the `search.search_strategy` dropdown, and its own tests. Never the default
  (the default is `langgraph-agent`). `mcp.servers` (default `[]`) was its only
  setting.
- Closest reachable successor: `LangGraphAgentStrategy`
  (`advanced_search_system/strategies/langgraph_agent_strategy.py`, factory key
  `langgraph-agent`). The factory now routes the `mcp` / `agentic` aliases to it
  with a deprecation warning, and migration `0014` rewrites persisted
  references.

### Useful ideas from the pre-deletion version

- **ReAct tool-calling loop over external MCP servers** — connected to
  user-configured stdio MCP servers (`mcp.servers`), discovered their tools at
  runtime, and let the LLM call them in a Reason+Act loop. This external-MCP-
  server tool integration is the **genuinely unique capability**;
  `langgraph-agent` only exposes LDR's own search engines as tools, not
  arbitrary MCP servers. It is the one capability removal actually loses —
  tracked as a follow-up to re-home it on `langgraph-agent` if demand appears.
- **`focused_research`-as-a-tool** — exposed LDR's focused-iteration research as
  a callable tool inside the agent loop. Not lost: `langgraph-agent`'s
  `research_subtopic` tool already provides recursive sub-research (via parallel
  subagents).
- **`_mcp_scope_blocked` egress gating** — a fail-closed scope check that
  blocked MCP tool discovery *and* execution under `STRICT` / `PRIVATE_ONLY`,
  because MCP tools run in stdio subprocesses whose egress the PEP audit hook
  cannot inspect. The same fail-closed pattern survives in
  `notifications.manager` and `journal_reputation_filter`.

### Why deletion was safe

`langgraph-agent` (the default) is a near functional superset for agentic
research over LDR's own engines — same specialized search tools, content fetch,
parallel subagents, and egress filtering. The only capability genuinely lost is
connecting to arbitrary external MCP servers as tool sources, which had an empty
default (`mcp.servers = []`) and no benchmark/test fixtures exercising it. All
scope-gating patterns survive in sibling modules.

### Recovery path

Do not restore the files. If external-MCP-server tool support is revived, add it
as a tool-source adapter on `LangGraphAgentStrategy` (a dynamic MCP→LangChain
tool adapter plus a port of the fail-closed `_mcp_scope_blocked` egress gate)
rather than a parallel strategy + client.
