Remove MCP transport and related dead code from experimental/aitools#4688
Remove MCP transport and related dead code from experimental/aitools#4688arsenyinfo merged 13 commits intomainfrom
Conversation
Delete MCP server, protocol SDK, provider registry, trajectory tracker, and MCP-only middlewares. Keep CLI subcommands (tools, install, skills) and supporting libraries (session, agents, warehouse resolution). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
No longer referenced after init_template removal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete 7 prompt templates only consumed by MCP server code, stale README and context-management docs, and dead session methods (tool call counter, uptime tracker, trajectory tracker). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Commit: d60ce07
16 interesting tests: 7 KNOWN, 7 SKIP, 2 flaky
Top 23 slowest tests (at least 2 minutes):
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The top-level install command should keep working while MCP transport is removed, so route it through the shared skills installer and cover both entry points with tests.
Drop the stale experimental deploy and validate flows now that app validation lives in the shared apps command path, and remove their orphaned helper libraries. Clean up the stale whitespace ignore for deleted template PNGs so checks pass again.
Drop the stale MCP-era naming and dead helper code that still pointed at removed functionality, and add a short README that documents the commands that still exist today.
Resolve PR merge conflicts while keeping the experimental/aitools removals from this branch.
simonfaltum
left a comment
There was a problem hiding this comment.
[Agent Swarm Review] Verdict: Not ready yet
- 0 Critical
- 1 Major
- 0 Gap
- 1 Nit
- 2 Suggestion
The deletion itself is clean: no broken imports, no surviving references to deleted packages, install aliasing is correct, package names are consistent. The code is in good shape.
The blocking issue is that the PR description's "What stays" section is materially inaccurate (lists validate, deploy, skills/, common/, state/, validation/ as surviving when they're all deleted). This will mislead reviewers about the scope of the change. Fix the description and this is ready to ship.
See inline comments for details.
| Short: "Databricks AI Tools - Model Context Protocol server for AI agents", | ||
| Long: `Manage Databricks AI Tools and Model Context Protocol server. | ||
| Use: "aitools", | ||
| Hidden: true, |
There was a problem hiding this comment.
[Agent Swarm Review] [Suggestion]
No migration path for stale MCP configs. Users who previously ran aitools install have broken MCP entries in Claude Code/Cursor configs (pointing to the now-removed mcp subcommand). Consider adding a note in the output: "If you previously installed the MCP server, remove it with claude mcp remove databricks-mcp".
lennartkats-db
left a comment
There was a problem hiding this comment.
This looks great! I ran a few smoke tests to make sure everything still works with the agent skills.
Can you just check for any remaining dead code? This is what my agent said may be dead code now:
- lib/detector/ — entire package, zero production callers
- lib/pathutil/ — entire package, zero production callers
- lib/agents/recommend.go — RecommendSkillsInstall(), zero production callers
- lib/session/session.go — SetWorkDir(), GetWorkDir(), WorkDirDataKey, Session.Delete(), Session.GetBool(), zero production callers
- lib/prompts/prompts.go — ExecuteTemplate() is unused; MustExecuteTemplate() has one caller but the whole template engine is overkill for rendering a single error message
Summary
init_templatesubcommand and appkit templatesaitools installan alias foraitools skills installWhat's deleted
lib/mcp/— MCP protocol SDK (server, transport, protocol, types, middleware)lib/server/— MCP server wrapper (lifecycle, health)lib/providers/— provider registry + clitools providerlib/trajectory/— local telemetry (tool call history)lib/errors/— JSON-RPC error typeslib/middlewares/middleware.go— MCP-only middlewareslib/config.go— empty Config struct for MCP servercmd/init_template/— template initialization commandtemplates/— appkit template (~15k lines)docs/— MCP-centric documentationdatabricks_client.go,common/,prompts/,session/acceptance/apps/init-template/testsWhat stays
tools(query,discover-schema,get-default-warehouse),skills,installagents/,installer/,detector/,prompts/(core),session/,middlewares/warehouse.go,middlewares/databricks_client.go,pathutil/README.mdremains, but is rewritten for the reducedaitoolssurfaceUpgrade note
databricks experimental aitools installnow installs Databricks skills rather than the removed MCP server.databricks-mcpconfig. For Claude Code:claude mcp remove --scope user databricks-mcp. For Cursor: remove thedatabricks-mcpentry from~/.cursor/mcp.json.Test plan
go build ./experimental/aitools/...make test-exp-aitools(123 tests pass)make lintfull(0 issues)🤖 Generated with Claude Code