[DO NOT MERGE] Experiment: MCP-first plugin with a CLI fallback

Draft
HK
6h ago
+2023-85

Do not merge — just experiments. This branch exists only to evaluate how the plugin should give Claude Code direct access to altimate-code tools.

What this experiment contains

  • Brings in the MCP registration (.mcp.json → altimate-code mcp serve), the analyst agent, and the experimental listing from #6 and #9.
  • MCP first: the altimate-code skill and the analyst agent use the mcp__plugin_altimate-code_altimate-code__* tools when they are available.
  • CLI fallback for organisations that do not allow MCP servers: altimate-code tool context once, then altimate-code tool run <tool> --args '<json>' (needs the companion altimate-code experiment AltimateAI/altimate-code#1609).
  • SessionStart hook (hooks-handlers/data-mode.sh) picks the mode without starting the CLI: CLI when altimate-code is not on PATH, when managed/user/project settings deny the server (deniedMcpServers, allowedMcpServers without it, disabledMcpjsonServers), or ALTIMATE_DATA_MODE=cli. Only CLI mode adds routing guidance; MCP mode adds none and uses no CLAUDE.md.
  • Opt-in PreToolUse guard for direct warehouse clients (ALTIMATE_ROUTE_GUARD=1).

Validation

  • tests/data-mode.sh (10 cases), tests/resolve-cli.sh, tests/warehouse-guard.sh pass; claude plugin validate passes for both plugin directories; experimental plugin tests 32/32.
  • Benchmark results (plain Claude, #1543 MCP, new MCP, CLI fallback on 100 dbt/warehouse tasks) are shared internally.

šŸ¤– Generated with Claude Code