Skip to content

Remove MCP transport and related dead code from experimental/aitools#4688

Merged
arsenyinfo merged 13 commits intomainfrom
remove-mcp-transport
Mar 13, 2026
Merged

Remove MCP transport and related dead code from experimental/aitools#4688
arsenyinfo merged 13 commits intomainfrom
remove-mcp-transport

Conversation

@arsenyinfo
Copy link
Contributor

@arsenyinfo arsenyinfo commented Mar 10, 2026

Summary

  • Remove MCP protocol SDK, server, providers, trajectory tracking, and middleware
  • Remove init_template subcommand and appkit templates
  • Remove orphaned helper functions, unused prompt templates, and stale docs
  • Make aitools install an alias for aitools skills install

What's deleted

  • lib/mcp/ — MCP protocol SDK (server, transport, protocol, types, middleware)
  • lib/server/ — MCP server wrapper (lifecycle, health)
  • lib/providers/ — provider registry + clitools provider
  • lib/trajectory/ — local telemetry (tool call history)
  • lib/errors/ — JSON-RPC error types
  • lib/middlewares/middleware.go — MCP-only middlewares
  • lib/config.go — empty Config struct for MCP server
  • cmd/init_template/ — template initialization command
  • templates/ — appkit template (~15k lines)
  • docs/ — MCP-centric documentation
  • 7 unused prompt templates
  • Orphaned helper functions in databricks_client.go, common/, prompts/, session/
  • acceptance/apps/init-template/ tests

What stays

  • CLI commands: tools (query, discover-schema, get-default-warehouse), skills, install
  • Libraries: agents/, installer/, detector/, prompts/ (core), session/, middlewares/warehouse.go, middlewares/databricks_client.go, pathutil/
  • Docs: README.md remains, but is rewritten for the reduced aitools surface

Upgrade note

  • databricks experimental aitools install now installs Databricks skills rather than the removed MCP server.
  • If you previously installed the MCP server, remove stale databricks-mcp config. For Claude Code: claude mcp remove --scope user databricks-mcp. For Cursor: remove the databricks-mcp entry 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

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>
arsenyinfo and others added 2 commits March 10, 2026 14:28
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>
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Mar 10, 2026

Commit: d60ce07

Run: 23042975268

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 7 268 784 8:03
🟨​ aws windows 7 1 7 270 782 7:05
💚​ aws-ucws linux 8 7 365 699 8:05
🔄​ aws-ucws windows 2 7 7 366 697 6:16
💚​ azure linux 2 9 271 782 5:55
💚​ azure windows 2 9 273 780 4:24
🔄​ azure-ucws linux 2 1 9 369 695 9:24
🔄​ azure-ucws windows 2 1 9 371 693 6:40
💚​ gcp linux 2 9 267 785 6:29
💚​ gcp windows 2 9 269 783 5:14
16 interesting tests: 7 KNOWN, 7 SKIP, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 🔄​f 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/ssh/connect-serverless-gpu 🙈​s 🙈​s ✅​p 🔄​f 🙈​s 🙈​s 🔄​f 🔄​f 🙈​s 🙈​s
🔄​ TestAccept/ssh/connection 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 🔄​f 💚​R 💚​R
Top 23 slowest tests (at least 2 minutes):
duration env testname
4:12 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:08 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:30 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:14 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:12 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:11 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:08 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:06 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:51 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:48 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:44 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:39 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:38 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:38 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:36 aws-ucws linux TestAccept
2:32 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:27 azure linux TestAccept
2:25 gcp linux TestAccept
2:10 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:10 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:07 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:06 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:06 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform

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.
@arsenyinfo arsenyinfo changed the title Remove MCP transport from experimental/aitools Remove MCP transport and related dead code from experimental/aitools Mar 10, 2026
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.
@arsenyinfo arsenyinfo marked this pull request as ready for review March 11, 2026 11:53
@arsenyinfo arsenyinfo requested a review from simonfaltum as a code owner March 11, 2026 11:53
@arsenyinfo arsenyinfo enabled auto-merge March 11, 2026 12:44
@arsenyinfo arsenyinfo disabled auto-merge March 11, 2026 13:10
Resolve PR merge conflicts while keeping the experimental/aitools removals from this branch.
Copy link
Member

@simonfaltum simonfaltum left a comment

Choose a reason for hiding this comment

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

[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,
Copy link
Member

Choose a reason for hiding this comment

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

[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".

Copy link
Contributor

@lennartkats-db lennartkats-db left a comment

Choose a reason for hiding this comment

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

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

@arsenyinfo arsenyinfo enabled auto-merge March 13, 2026 08:40
@arsenyinfo arsenyinfo added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit c8d825c Mar 13, 2026
23 checks passed
@arsenyinfo arsenyinfo deleted the remove-mcp-transport branch March 13, 2026 09:25
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.

5 participants