Skip to content

refactor: remove all MCP code from codebase#359

Merged
santoshkumarradha merged 3 commits intomainfrom
cleanup/remove-mcp-code
Apr 7, 2026
Merged

refactor: remove all MCP code from codebase#359
santoshkumarradha merged 3 commits intomainfrom
cleanup/remove-mcp-code

Conversation

@AbirAbbas
Copy link
Copy Markdown
Contributor

Summary

  • Removes all MCP (Model Context Protocol) backend code, endpoints, CLI commands, SDK integrations, types, tests, and documentation
  • The MCP UI was already removed in the recent UI revamp; this cleans up the remaining ~14,600 lines of dead MCP code across the entire monorepo
  • Zero MCP references remain in any .go, .py, .ts, .tsx, .yaml, .yml, .json, or .toml file

What was removed

Control Plane (Go):

  • internal/mcp/ - entire MCP package (manager, discovery, protocol client, stdio client, skill generator, etc.)
  • internal/cli/mcp.go + internal/cli/mcp/ - all MCP CLI commands (status, start, stop, restart, logs, remove, discover, skills, migrate)
  • internal/cli/add.go - MCP-only add command
  • internal/handlers/ui/mcp.go - all 6 MCP HTTP endpoints
  • internal/core/domain/mcp_health.go - MCP domain models
  • MCP routes from server.go
  • MCP methods from AgentClient interface and HTTPAgentClient implementation
  • MCPStatusInfo from types, AgentStatus, heartbeat processing
  • MCP health tracking from HealthMonitor and StatusManager
  • MCP event types from node events
  • MCP knowledgebase documentation article
  • MCP config models from domain and storage

Python SDK:

  • mcp_manager.py, mcp_client.py, mcp_stdio_bridge.py, agent_mcp.py, dynamic_skills.py
  • All MCP test files and MCP references in existing tests
  • MCP pytest marker and coverage omits from pyproject.toml
  • Renamed create_input_schema_from_mcp_tool to create_input_schema_from_tool

TypeScript SDK:

  • src/mcp/ directory (MCPClient, MCPClientRegistry, MCPToolRegistrar)
  • src/types/mcp.ts and MCP types from agent.ts
  • All 3 MCP test files

Web Client:

  • src/mcp/, src/components/mcp/, src/utils/mcpUtils.ts
  • All MCP types, API functions, SSE hooks, error handling, and component references

Test plan

  • Go: go build ./... passes cleanly
  • Go: go vet ./... passes cleanly
  • Go: All tests in changed packages pass (pre-existing TestRunAgent_Success timeout is unrelated to this change)
  • TypeScript (web client): tsc --noEmit passes cleanly
  • TypeScript (SDK): tsc --noEmit passes cleanly
  • Python SDK: import agentfield succeeds
  • Zero MCP references remain in codebase (verified via ripgrep)

🤖 Generated with Claude Code

AbirAbbas and others added 2 commits April 7, 2026 09:49
MCP UI was already removed in the latest main revamp. This cleans up
all remaining MCP backend code, endpoints, CLI commands, SDK
integrations, types, tests, and documentation across the entire
codebase.

Removed:
- control-plane/internal/mcp/ (manager, discovery, protocol client, etc.)
- control-plane/internal/cli/mcp.go + mcp/ stubs (CLI commands)
- control-plane/internal/handlers/ui/mcp.go (HTTP handlers)
- control-plane/internal/core/domain/mcp_health.go (domain models)
- MCP routes from server.go (/mcp/health, /mcp/status, etc.)
- MCP methods from AgentClient interface + HTTP implementation
- MCPStatusInfo from types, AgentStatus, heartbeat processing
- MCP health tracking from HealthMonitor and StatusManager
- MCP event types from node events
- sdk/python: mcp_manager, mcp_client, mcp_stdio_bridge, agent_mcp,
  dynamic_skills, and all MCP test files
- sdk/typescript: src/mcp/, types/mcp.ts, and MCP test files
- web/client: src/mcp/, components/mcp/, mcpUtils.ts, and all MCP
  references in pages/components/hooks/types
- MCP knowledgebase article, config models, benchmark references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AbirAbbas AbirAbbas requested a review from a team as a code owner April 7, 2026 13:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Performance

SDK Memory Δ Latency Δ Tests Status
Python 7.9 KB -13% 0.32 µs -9%
TS 460 B +31% 3.20 µs +60%

Regression detected:

  • TypeScript memory: 350 B → 460 B (+31%)

- Remove unused `AgentNodeDetailsForUI` import in api.ts (TS6196)
- Remove unused `asdict` import in test_types.py (F401)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@santoshkumarradha
Copy link
Copy Markdown
Member

Longoverdue !

@santoshkumarradha santoshkumarradha added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit f732ed5 Apr 7, 2026
33 checks passed
@AbirAbbas AbirAbbas deleted the cleanup/remove-mcp-code branch April 7, 2026 16:46
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.

2 participants