[DO NOT MERGE] Experiment: model-free `tool` CLI and MCP server on one adapter
Draft
HK
5h ago+8494+8494+0123456789012345678901234567890123456789-238-238-012345678901234567890123456789
Do not merge ā just experiments. This branch exists only to evaluate how Claude Code (and other agents) should call altimate-code data tools directly, over MCP or from the shell.
What this experiment contains
- Brings in
altimate-code mcp servefrom #1543 and the workspace tools from #1576. - One adapter, two front doors:
mcp serveand a new model-freetoolCLI (tool list | schema | run | context | daemon) execute tools through the same adapter, so both share compact schemas,sql_executewithtablesandquery_from, result spill files,answer_commit, and read-only enforcement. mcp servedefault set: the five #1543 tools plusimpact_analysis,dbt_lineage,altimate_core_column_lineage,schema_detect_pii,data_diff,altimate_core_equivalence,sql_translate;--all-toolsexposes the full 70-tool allow-list.tool contextprints the analyst method and connection/table listing thatmcp servesends at startup, for shell agents.- Long-running per-project process (auto-start, idle exit, version- and connections-scoped socket) keeps connections warm and releases DuckDB/SQLite file locks between calls.
--connections/ALTIMATE_TOOL_CONNECTIONS,--args -from stdin,--workspace-tools.- DROP DATABASE, DROP SCHEMA and TRUNCATE stay blocked even with
--allow-write. link --claude-md(opt-in) writes CLI routing guidance toCLAUDE.mdfor clients that cannot use MCP.- The CI change from #1543 is intentionally not included.
Validation
bun run typecheckclean;test/altimate/tool-cli+test/cli/help50/50;ALTIMATE_MCP_E2E=1 test/altimate/mcp-server101/101; other #1543/#1576 test files 761/761.- End to end:
tool context,tool runvia the daemon and in-process, andmcp serveover stdio (initialize,tools/list,tools/call) against DuckDB. - Companion plugin experiment: AltimateAI/altimate-claude-plugin#11. Benchmark results are shared internally.
š¤ Generated with Claude Code
Summary by cubic
Experimental branch, not for merge: evaluates how external coding agents call altimate-code data tools directly, via a new model-free tool CLI or mcp serve over stdio.
tool list | schema | run | context | daemonandmcp serveexecute the same adapter, so both share compact schemas,sql_executeoptions, result spill files,answer_commit, and read-only enforcement.- A per-project daemon keeps connections and the schema cache warm between calls and releases DuckDB/SQLite file locks.
mcp servedefaults to the original five tools plus impact, lineage, PII, data-diff, equivalence and translation tools;--all-toolsopens the full 70-tool allow-list.- MCP requests are forced read-only;
DROP DATABASE,DROP SCHEMAandTRUNCATEstay blocked even with--allow-write. link --claude-mdwrites CLI routing guidance intoCLAUDE.mdfor clients that cannot use MCP.
Behavior changes
schema_inspectlists schemas and up to 500 tables with catalog row estimates whentableis omitted; MongoDB catalog discovery is bounded and closes cursors early.answer_commitacceptsaskedandreadingsarguments, and its rejection checks moved into a dedicated module with per-turn limits.- The analyst now requests high reasoning effort on adaptive-thinking models unless the user or agent config sets one.
Validation: typecheck clean; test/altimate/tool-cli + test/cli/help 50/50; ALTIMATE_MCP_E2E=1 test/altimate/mcp-server 101/101; other affected test files 761/761.