Skip to content

Add and remove agent MCP entries through the agent's own CLI - #7595

Draft
simonfaltum wants to merge 14 commits into
aitools-mcp/08-challengefrom
aitools-mcp/08b-agent-clis
Draft

simonfaltum wants to merge 14 commits into
aitools-mcp/08-challengefrom
aitools-mcp/08b-agent-clis

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

This pull request is part of the stack that adds the hidden databricks aitools mcp command group; its parent is #7553. aitools mcp add and remove now change the Claude Code, Codex CLI, Gemini CLI and Copilot CLI configs through each agent's own MCP command, when that CLI is on PATH.

Changes

  • A new entry runs the agent's add command (claude mcp add-json --scope user, codex mcp add, gemini mcp add --scope user, copilot mcp add --tools *). Afterwards the config file holds the entry asked for, whatever the exit status: a differing entry is replaced, and a missing one is added directly.
  • remove runs the CLI's remove for an entry we wrote, when the agent reads that file now. A CLI failure, or an entry left behind, falls back to the direct writer. Symlinked configs and names that start with - always use the direct writer.
  • The CLI runs in an empty directory with a 30-second timeout, in the foreground process group so Ctrl-C reaches it.

Why

The agent's own CLI writes its config with its own locking and layout, for example while a running Claude Code session rewrites .claude.json, and when an agent changes its file format its CLI follows, where a copy in this repo would not.

Decisions to review

  • The file decides, not the exit status. The cost: a CLI that writes another file keeps its entry there, and ours is also added to the agent's file.
  • A differing entry is replaced, not refused. The cost: our launch keys win over the CLI's choices.
  • Existing entries keep the direct writer, since the add commands replace whole entries. The cost: two paths write one file.
  • Codex's mcp add and mcp remove rewrite the [mcp_servers.*] tables in Codex's own serialization. With Codex CLI 0.167.1 in a temporary CODEX_HOME, a comment after a value and an unknown key in another server's table were dropped. The direct writer re-renders only the server it writes, so comments inside that server's tables are lost on either path.
  • A hung CLI costs the 30-second timeout for each server.
  • On Windows, a .cmd shim gets only arguments without spaces, double quotes or cmd.exe special characters. Other arguments use the direct writer.

Tests

  • libs/aitools/agents covers argv per agent, including a Windows path with spaces. agentconfig/cli_test.go covers each outcome of an add, symlinks, dash names and the timeout. libs/process covers WithoutEnv, which ignores case on Windows.
  • acceptance/cmd/aitools/mcp/add-remove-agent-clis covers each agent's argv and the files it wrote.
  • ./task test-exp-aitools passes with BROWSER unset and with BROWSER=none.
  • Not tested: the Copilot and Gemini binaries, which are not installed here, so their argv follows their docs and source; Windows runs, which CI covers; -inprocess mode, which already fails on the base for these tests.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Commit: a9d81d9b8 | Workflow run

Regression test report

Selected 19 changed tests (limit=20, 0 not selected)

19 tests: regression=19 unreleased=0 coverage=0 failing=0
test branch main (bf8caad) latest (v1.26.0)
TestAccept/cmd/aitools/mcp/add-agent-not-installed ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-default-config ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-name-notices ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-remove-agent-clis ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-text ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-two-agents ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-two-profiles ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-unknown-profile ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-unparsable-config ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/drift-profile-missing ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/help ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/hidden ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/list-and-remove ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/list-check ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/login-flips-active ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/repair-and-warnings ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/serve-authenticate-tool ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/serve-binding-errors ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/serve-passthrough ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-agent-not-installed: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-agent-not-installed/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-agent-not-installed2690548495/002/output.txt
        @@ -2,40 +2,58 @@
         === An agent named with --agents that is not installed is refused; the installed agent still gets the server, and the command exits non-zero
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code,antigravity --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "antigravity",
        -          "status": "failed",
        -          "error_category": "UNKNOWN_AGENT",
        -          "message": "Antigravity is not installed; install it first or leave it out of --agents"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help[=true|false]   help for aitools
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        +
         === Nothing was created for Antigravity
         
         >>> ls -A home
         .claude
        -.claude.json
        -.databricks
         
         === With no installed agent named, the command is refused before any request, and the text output says what to do
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents antigravity
        -Error: Antigravity is not installed; install it first or leave it out of --agents
        +Error: unknown flag: --names
        +
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help[=true|false]   help for aitools
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0de477-908f-1e47-7a0d-e477908f1f38",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }

latest (v1.26.0):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-agent-not-installed/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-agent-not-installed432247624/002/output.txt
        @@ -2,40 +2,58 @@
         === An agent named with --agents that is not installed is refused; the installed agent still gets the server, and the command exits non-zero
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code,antigravity --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "antigravity",
        -          "status": "failed",
        -          "error_category": "UNKNOWN_AGENT",
        -          "message": "Antigravity is not installed; install it first or leave it out of --agents"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help   help for aitools
        +
        +Global Flags:
        +      --debug            enable debug logging
        +  -o, --output type      output type: text or json (default text)
        +  -p, --profile string   ~/.databrickscfg profile
        +  -t, --target string    bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        +
         === Nothing was created for Antigravity
         
         >>> ls -A home
         .claude
        -.claude.json
        -.databricks
         
         === With no installed agent named, the command is refused before any request, and the text output says what to do
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents antigravity
        -Error: Antigravity is not installed; install it first or leave it out of --agents
        +Error: unknown flag: --names
        +
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help   help for aitools
        +
        +Global Flags:
        +      --debug            enable debug logging
        +  -o, --output type      output type: text or json (default text)
        +  -p, --profile string   ~/.databrickscfg profile
        +  -t, --target string    bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0de47f-d330-7226-7a0d-e47fd33072f8",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
TestAccept/cmd/aitools/mcp/add-default-config: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1386: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1386
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1127
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:672
        	Error:      	Not equal: 
        	            	expected: "\n=== Without DATABRICKS_CONFIG_FILE the server is added for the default config file\n\n>>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code\nProfile logfood ([DATABRICKS_URL])\nAgents (named with --agents): claude-code\n\ngenie_one_mcp-logfood  system.ai.genie_one_mcp\n  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json\n\n=== Claude Code config has no pinned variables for the server\n\n>>> gron.py home/.claude.json\njson.mcpServers.genie_one_mcp-logfood.env = {};\n\n=== State holds the binding with no config file\n\n>>> jq .mcp.servers[] | {name, profile, config_file} home/.databricks/aitools/skills/.state.json\n{\n  \"name\": \"genie_one_mcp-logfood\",\n  \"profile\": \"logfood\",\n  \"config_file\": \"\"\n}\n"
        	            	actual  : "\n=== Without DATABRICKS_CONFIG_FILE the server is added for the default config file\n\n>>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code\nError: unknown flag: --names\n\nUsage:\n  databricks aitools [command]\n\nAvailable Commands:\n  install     Install Databricks skills and plugins for coding agents\n  list        List installed skills and plugins\n  uninstall   Uninstall Databricks skills and plugins\n  update      Update installed skills and plugins\n  version     Show installed skills and plugins version\n\nFlags:\n  -h, --help[=true|false]   help for aitools\n\nGlobal Flags:\n      --debug[=true|false]   enable debug logging\n  -o, --output type          output type: text or json (default text)\n  -p, --profile string       ~/.databrickscfg profile\n  -t, --target string        bundle target to use (if applicable)\n\nUse \"databricks aitools [command] --help\" for more information about a command.\n\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,21 +4,27 @@
        	            	 >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code
        	            	-Profile logfood ([DATABRICKS_URL])
        	            	-Agents (named with --agents): claude-code
        	            	+Error: unknown flag: --names
        	            	 
        	            	-genie_one_mcp-logfood  system.ai.genie_one_mcp
        	            	-  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        	            	+Usage:
        	            	+  databricks aitools [command]
        	            	 
        	            	-=== Claude Code config has no pinned variables for the server
        	            	+Available Commands:
        	            	+  install     Install Databricks skills and plugins for coding agents
        	            	+  list        List installed skills and plugins
        	            	+  uninstall   Uninstall Databricks skills and plugins
        	            	+  update      Update installed skills and plugins
        	            	+  version     Show installed skills and plugins version
        	            	 
        	            	->>> gron.py home/.claude.json
        	            	-json.mcpServers.genie_one_mcp-logfood.env = {};
        	            	+Flags:
        	            	+  -h, --help[=true|false]   help for aitools
        	            	 
        	            	-=== State holds the binding with no config file
        	            	+Global Flags:
        	            	+      --debug[=true|false]   enable debug logging
        	            	+  -o, --output type          output type: text or json (default text)
        	            	+  -p, --profile string       ~/.databrickscfg profile
        	            	+  -t, --target string        bundle target to use (if applicable)
        	            	 
        	            	->>> jq .mcp.servers[] | {name, profile, config_file} home/.databricks/aitools/skills/.state.json
        	            	-{
        	            	-  "name": "genie_one_mcp-logfood",
        	            	-  "profile": "logfood",
        	            	-  "config_file": ""
        	            	-}
        	            	+Use "databricks aitools [command] --help" for more information about a command.
        	            	 
        	            	+
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/aitools/mcp/add-default-config
        	Messages:   	cmd/aitools/mcp/add-default-config/output.txt vs /tmp/TestAcceptcmdaitoolsmcpadd-default-config3052359587/002/output.txt
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0de47e-e1aa-f83c-7a0d-e47ee1aaf918",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
FAIL

latest (v1.26.0):

acceptance_test.go:1386: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1386
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1127
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:672
        	Error:      	Not equal: 
        	            	expected: "\n=== Without DATABRICKS_CONFIG_FILE the server is added for the default config file\n\n>>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code\nProfile logfood ([DATABRICKS_URL])\nAgents (named with --agents): claude-code\n\ngenie_one_mcp-logfood  system.ai.genie_one_mcp\n  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json\n\n=== Claude Code config has no pinned variables for the server\n\n>>> gron.py home/.claude.json\njson.mcpServers.genie_one_mcp-logfood.env = {};\n\n=== State holds the binding with no config file\n\n>>> jq .mcp.servers[] | {name, profile, config_file} home/.databricks/aitools/skills/.state.json\n{\n  \"name\": \"genie_one_mcp-logfood\",\n  \"profile\": \"logfood\",\n  \"config_file\": \"\"\n}\n"
        	            	actual  : "\n=== Without DATABRICKS_CONFIG_FILE the server is added for the default config file\n\n>>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code\nError: unknown flag: --names\n\nUsage:\n  databricks aitools [command]\n\nAvailable Commands:\n  install     Install Databricks skills and plugins for coding agents\n  list        List installed skills and plugins\n  uninstall   Uninstall Databricks skills and plugins\n  update      Update installed skills and plugins\n  version     Show installed skills and plugins version\n\nFlags:\n  -h, --help   help for aitools\n\nGlobal Flags:\n      --debug            enable debug logging\n  -o, --output type      output type: text or json (default text)\n  -p, --profile string   ~/.databrickscfg profile\n  -t, --target string    bundle target to use (if applicable)\n\nUse \"databricks aitools [command] --help\" for more information about a command.\n\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,21 +4,27 @@
        	            	 >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code
        	            	-Profile logfood ([DATABRICKS_URL])
        	            	-Agents (named with --agents): claude-code
        	            	+Error: unknown flag: --names
        	            	 
        	            	-genie_one_mcp-logfood  system.ai.genie_one_mcp
        	            	-  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        	            	+Usage:
        	            	+  databricks aitools [command]
        	            	 
        	            	-=== Claude Code config has no pinned variables for the server
        	            	+Available Commands:
        	            	+  install     Install Databricks skills and plugins for coding agents
        	            	+  list        List installed skills and plugins
        	            	+  uninstall   Uninstall Databricks skills and plugins
        	            	+  update      Update installed skills and plugins
        	            	+  version     Show installed skills and plugins version
        	            	 
        	            	->>> gron.py home/.claude.json
        	            	-json.mcpServers.genie_one_mcp-logfood.env = {};
        	            	+Flags:
        	            	+  -h, --help   help for aitools
        	            	 
        	            	-=== State holds the binding with no config file
        	            	+Global Flags:
        	            	+      --debug            enable debug logging
        	            	+  -o, --output type      output type: text or json (default text)
        	            	+  -p, --profile string   ~/.databrickscfg profile
        	            	+  -t, --target string    bundle target to use (if applicable)
        	            	 
        	            	->>> jq .mcp.servers[] | {name, profile, config_file} home/.databricks/aitools/skills/.state.json
        	            	-{
        	            	-  "name": "genie_one_mcp-logfood",
        	            	-  "profile": "logfood",
        	            	-  "config_file": ""
        	            	-}
        	            	+Use "databricks aitools [command] --help" for more information about a command.
        	            	 
        	            	+
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/aitools/mcp/add-default-config
        	Messages:   	cmd/aitools/mcp/add-default-config/output.txt vs /tmp/TestAcceptcmdaitoolsmcpadd-default-config2970449829/002/output.txt
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0de487-0c80-95f2-7a0d-e4870c8096c4",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
FAIL
TestAccept/cmd/aitools/mcp/add-name-notices: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-name-notices/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-name-notices2676409429/002/output.txt
        @@ -2,34 +2,28 @@
         === A generated name that an entry this CLI did not write holds gets a suffix, and the output says who holds the base name
         
         >>> [CLI] aitools mcp add --profile dogfood --names genie_one_mcp --agents cursor
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-dogfood-2  system.ai.genie_one_mcp
        -  genie_one_mcp-dogfood is taken in Cursor; using genie_one_mcp-dogfood-2
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -Cursor may ask you to approve genie_one_mcp-dogfood-2. Run: cursor-agent mcp enable genie_one_mcp-dogfood-2 (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
         
        -=== --force replaces the user's own entry, and the output says so
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        ->>> [CLI] aitools mcp add --profile dogfood --names dbsql --name user-server --agents cursor --force
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        -user-server  system.ai.dbsql
        -  replaced user-server in Cursor (not written by this CLI)
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  Needs an account admin to turn on the Enhanced Unity Gateway preview.
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -Cursor may ask you to approve user-server. Run: cursor-agent mcp enable user-server (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
         
        -=== The user's entry that was not replaced is intact
        -
        ->>> jq .mcpServers["genie_one_mcp-dogfood"] home/.cursor/mcp.json
        -{
        -  "command": "users-own",
        -  "args": [
        -    "users-own"
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1164: 
        LOG.create-dbsql-dogfood: {
        LOG.create-dbsql-dogfood:   "comment": "Query your SQL warehouses",
        LOG.create-dbsql-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "metastore_id": "7a0de47e-dc27-2849-7a0d-e47edc272943",
        LOG.create-dbsql-dogfood:   "name": "mcp-services/system.ai.dbsql",
        LOG.create-dbsql-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-dbsql-dogfood: }
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-dogfood: {
        LOG.create-genie_one_mcp-dogfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "metastore_id": "7a0de47e-da4a-9d3a-7a0d-e47eda4a9e17",
        LOG.create-genie_one_mcp-dogfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-dogfood: }

latest (v1.26.0):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-name-notices/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-name-notices3703058323/002/output.txt
        @@ -2,34 +2,28 @@
         === A generated name that an entry this CLI did not write holds gets a suffix, and the output says who holds the base name
         
         >>> [CLI] aitools mcp add --profile dogfood --names genie_one_mcp --agents cursor
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-dogfood-2  system.ai.genie_one_mcp
        -  genie_one_mcp-dogfood is taken in Cursor; using genie_one_mcp-dogfood-2
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -Cursor may ask you to approve genie_one_mcp-dogfood-2. Run: cursor-agent mcp enable genie_one_mcp-dogfood-2 (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
         
        -=== --force replaces the user's own entry, and the output says so
        +Flags:
        +  -h, --help   help for aitools
         
        ->>> [CLI] aitools mcp add --profile dogfood --names dbsql --name user-server --agents cursor --force
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Global Flags:
        +      --debug            enable debug logging
        +  -o, --output type      output type: text or json (default text)
        +  -p, --profile string   ~/.databrickscfg profile
        +  -t, --target string    bundle target to use (if applicable)
         
        -user-server  system.ai.dbsql
        -  replaced user-server in Cursor (not written by this CLI)
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  Needs an account admin to turn on the Enhanced Unity Gateway preview.
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -Cursor may ask you to approve user-server. Run: cursor-agent mcp enable user-server (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
         
        -=== The user's entry that was not replaced is intact
        -
        ->>> jq .mcpServers["genie_one_mcp-dogfood"] home/.cursor/mcp.json
        -{
        -  "command": "users-own",
        -  "args": [
        -    "users-own"
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1164: 
        LOG.create-dbsql-dogfood: {
        LOG.create-dbsql-dogfood:   "comment": "Query your SQL warehouses",
        LOG.create-dbsql-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "metastore_id": "7a0de487-08de-8cc3-7a0d-e48708de8d95",
        LOG.create-dbsql-dogfood:   "name": "mcp-services/system.ai.dbsql",
        LOG.create-dbsql-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-dbsql-dogfood: }
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-dogfood: {
        LOG.create-genie_one_mcp-dogfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "metastore_id": "7a0de487-071c-1126-7a0d-e487071c1220",
        LOG.create-genie_one_mcp-dogfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-dogfood: }
TestAccept/cmd/aitools/mcp/add-remove-agent-clis: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-remove-agent-clis/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-remove-agent-clis625477419/002/output.txt
        @@ -2,345 +2,28 @@
         === add goes through the CLI of claude, gemini and copilot; codex is written directly
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,codex,gemini,copilot --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        },
        -        {
        -          "name": "gemini",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.gemini/settings.json"
        -        },
        -        {
        -          "name": "copilot",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.copilot/mcp-config.json"
        -        }
        -      ]
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "sign_in_required": true,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        },
        -        {
        -          "name": "gemini",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.gemini/settings.json"
        -        },
        -        {
        -          "name": "copilot",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.copilot/mcp-config.json"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        -=== the argv each agent CLI ran for add
        +Usage:
        +  databricks aitools [command]
         
        ->>> cat agent-calls.log
        -claude
        -	mcp
        -	add-json
        -	--scope
        -	user
        -	genie_one_mcp-logfood
        -	{"args":["aitools","mcp","serve","--profile","logfood","--service","system.ai.genie_one_mcp","--agent","claude-code"],"command":"[CLI]","env":{"DATABRICKS_CONFIG_FILE":"[TEST_TMP_DIR]/.databrickscfg"},"type":"stdio"}
        -gemini
        -	mcp
        -	add
        -	--scope
        -	user
        -	-e
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	genie_one_mcp-logfood
        -	[CLI]
        -	--
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.genie_one_mcp
        -	--agent
        -	gemini
        -copilot
        -	mcp
        -	add
        -	genie_one_mcp-logfood
        -	--tools
        -	*
        -	--env
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	--
        -	[CLI]
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.genie_one_mcp
        -	--agent
        -	copilot
        -claude
        -	mcp
        -	add-json
        -	--scope
        -	user
        -	github-logfood
        -	{"args":["aitools","mcp","serve","--profile","logfood","--service","system.ai.github","--agent","claude-code"],"command":"[CLI]","env":{"DATABRICKS_CONFIG_FILE":"[TEST_TMP_DIR]/.databrickscfg"},"type":"stdio"}
        -gemini
        -	mcp
        -	add
        -	--scope
        -	user
        -	-e
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	github-logfood
        -	[CLI]
        -	--
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.github
        -	--agent
        -	gemini
        -copilot
        -	mcp
        -	add
        -	github-logfood
        -	--tools
        -	*
        -	--env
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	--
        -	[CLI]
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.github
        -	--agent
        -	copilot
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
         
        -=== the config each agent CLI wrote
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        ->>> cat home/.claude.json
        -{
        -  "mcpServers": {
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
... (194 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.26.0):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-remove-agent-clis/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-remove-agent-clis502064042/002/output.txt
        @@ -2,345 +2,28 @@
         === add goes through the CLI of claude, gemini and copilot; codex is written directly
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,codex,gemini,copilot --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        },
        -        {
        -          "name": "gemini",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.gemini/settings.json"
        -        },
        -        {
        -          "name": "copilot",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.copilot/mcp-config.json"
        -        }
        -      ]
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "sign_in_required": true,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        },
        -        {
        -          "name": "gemini",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.gemini/settings.json"
        -        },
        -        {
        -          "name": "copilot",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.copilot/mcp-config.json"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        -=== the argv each agent CLI ran for add
        +Usage:
        +  databricks aitools [command]
         
        ->>> cat agent-calls.log
        -claude
        -	mcp
        -	add-json
        -	--scope
        -	user
        -	genie_one_mcp-logfood
        -	{"args":["aitools","mcp","serve","--profile","logfood","--service","system.ai.genie_one_mcp","--agent","claude-code"],"command":"[CLI]","env":{"DATABRICKS_CONFIG_FILE":"[TEST_TMP_DIR]/.databrickscfg"},"type":"stdio"}
        -gemini
        -	mcp
        -	add
        -	--scope
        -	user
        -	-e
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	genie_one_mcp-logfood
        -	[CLI]
        -	--
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.genie_one_mcp
        -	--agent
        -	gemini
        -copilot
        -	mcp
        -	add
        -	genie_one_mcp-logfood
        -	--tools
        -	*
        -	--env
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	--
        -	[CLI]
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.genie_one_mcp
        -	--agent
        -	copilot
        -claude
        -	mcp
        -	add-json
        -	--scope
        -	user
        -	github-logfood
        -	{"args":["aitools","mcp","serve","--profile","logfood","--service","system.ai.github","--agent","claude-code"],"command":"[CLI]","env":{"DATABRICKS_CONFIG_FILE":"[TEST_TMP_DIR]/.databrickscfg"},"type":"stdio"}
        -gemini
        -	mcp
        -	add
        -	--scope
        -	user
        -	-e
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	github-logfood
        -	[CLI]
        -	--
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.github
        -	--agent
        -	gemini
        -copilot
        -	mcp
        -	add
        -	github-logfood
        -	--tools
        -	*
        -	--env
        -	DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg
        -	--
        -	[CLI]
        -	aitools
        -	mcp
        -	serve
        -	--profile
        -	logfood
        -	--service
        -	system.ai.github
        -	--agent
        -	copilot
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
         
        -=== the config each agent CLI wrote
        +Flags:
        +  -h, --help   help for aitools
         
        ->>> cat home/.claude.json
        -{
        -  "mcpServers": {
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
... (194 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/cmd/aitools/mcp/add-text: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-text/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-text3101627178/002/output.txt
        @@ -2,75 +2,28 @@
         === Text output: Cursor approval hint, and the sign-in step for github
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -github-logfood  system.ai.github
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
         
        -Cursor may ask you to approve genie_one_mcp-logfood, github-logfood. Run cursor-agent mcp enable <name> for each (`agent` in the Cursor docs), or approve them in Cursor's MCP settings.
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        -=== Running it again re-asserts the entries, and nothing is written twice
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        ->>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
         
        -github-logfood  system.ai.github
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        -
        -=== Cursor config
        -
        ->>> cat home/.cursor/mcp.json
        -{
        -  "mcpServers": {
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    }
        -  }
        -}
        +Exit code: 1
        
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0de47e-da83-07ec-7a0d-e47eda830850",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
    acceptance_test.go:1164: 
        LOG.create-github-logfood: {
        LOG.create-github-logfood:   "comment": "Repositories, issues, pull requests",
        LOG.create-github-logfood:   "config": {
        LOG.create-github-logfood:     "source_connection": {
        LOG.create-github-logfood:       "name": "connections/github",
        LOG.create-github-logfood:       "options": {
        LOG.create-github-logfood:         "oauth_provider": "OAUTH_PROVIDER_GITHUB_MCP"
        LOG.create-github-logfood:       }
        LOG.create-github-logfood:     }
        LOG.create-github-logfood:   },
        LOG.create-github-logfood:   "created_by": "tester@databricks.com",
        LOG.create-github-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-github-logfood:   "metastore_id": "7a0de47e-dc54-4e42-7a0d-e47edc544ed8",
        LOG.create-github-logfood:   "name": "mcp-services/system.ai.github",
        LOG.create-github-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-github-logfood: }

latest (v1.26.0):

acceptance_test.go:1386: Diff:
        --- cmd/aitools/mcp/add-text/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-text2752671167/002/output.txt
        @@ -2,75 +2,28 @@
         === Text output: Cursor approval hint, and the sign-in step for github
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -github-logfood  system.ai.github
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        +Available Commands:
        +  install     Install Databricks skills and plugins for coding agents
        +  list        List installed skills and plugins
        +  uninstall   Uninstall Databricks skills and plugins
        +  update      Update installed skills and plugins
        +  version     Show installed skills and plugins version
         
        -Cursor may ask you to approve genie_one_mcp-logfood, github-logfood. Run cursor-agent mcp enable <name> for each (`agent` in the Cursor docs), or approve them in Cursor's MCP settings.
        +Flags:
        +  -h, --help   help for aitools
         
        -=== Running it again re-asserts the entries, and nothing is written twice
        +Global Flags:
        +      --debug            enable debug logging
        +  -o, --output type      output type: text or json (default text)
        +  -p, --profile string   ~/.databrickscfg profile
        +  -t, --target string    bundle target to use (if applicable)
         
        ->>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
         
        -github-logfood  system.ai.github
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: DATABRICKS_CONFIG_FILE=[TEST_TMP_DIR]/.databrickscfg databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        -
        -=== Cursor config
        -
        ->>> cat home/.cursor/mcp.json
        -{
        -  "mcpServers": {
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    }
        -  }
        -}
        +Exit code: 1
        
    acceptance_test.go:1164: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0de487-046a-8901-7a0d-e487046a89de",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
    acceptance_test.go:1164: 
        LOG.create-github-logfood: {
        LOG.create-github-logfood:   "comment": "Repositories, issues, pull requests",
        LOG.create-github-logfood:   "config": {
        LOG.create-github-logfood:     "source_connection": {
        LOG.create-github-logfood:       "name": "connections/github",
        LOG.create-github-logfood:       "options": {
        LOG.create-github-logfood:         "oauth_provider": "OAUTH_PROVIDER_GITHUB_MCP"
        LOG.create-github-logfood:       }
        LOG.create-github-logfood:     }
        LOG.create-github-logfood:   },
        LOG.create-github-logfood:   "created_by": "tester@databricks.com",
        LOG.create-github-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-github-logfood:   "metastore_id": "7a0de487-05fc-596a-7a0d-e48705fc5a79",
        LOG.create-github-logfood:   "name": "mcp-services/system.ai.github",
        LOG.create-github-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-github-logfood: }

14 more failure details omitted, see the full report in the run.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 1c32739

Run: 44111891061

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 34 11:39
💚​ aws-windows-latest-4core-16gb 1 272 32 9:09
💚​ azure linux-2core-8gb 1 269 34 13:38
💚​ azure-windows-latest-4core-16gb 1 271 32 9:19
💚​ gcp linux-2core-8gb 1 270 34 14:09
💚​ gcp-windows-latest-4core-16gb 1 272 32 11:43
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 14 slowest tests (at least 2 minutes):
duration env testname
3:44 azure-windows-latest-4core-16gb TestAccept
3:39 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files
3:34 aws-windows-latest-4core-16gb TestAccept
3:33 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
3:33 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
3:21 azure-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
3:03 aws-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
2:56 gcp-windows-latest-4core-16gb TestAccept
2:43 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:38 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:30 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:20 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:13 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:03 gcp-windows-latest-4core-16gb TestSyncFullFileSync

@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 7122f6a to 93e536b Compare November 13, 2026 09:48
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 1abf7d0 to 6b41591 Compare November 13, 2026 15:05
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 3ed1398 to 8cca61b Compare November 13, 2026 15:06
@pietern pietern added the aitools AI tools (databricks aitools) related changes label Nov 16, 2026
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 8cca61b to 50318b1 Compare November 16, 2026 12:47
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 6b41591 to 48208cf Compare November 16, 2026 12:47
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 50318b1 to f46d6a0 Compare November 16, 2026 13:19
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 48208cf to 922dad8 Compare November 16, 2026 13:19
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from f46d6a0 to d049189 Compare November 16, 2026 13:32
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch 2 times, most recently from 7e7f6c7 to 865e2f5 Compare November 16, 2026 14:49
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch 2 times, most recently from 6955d59 to 84abb41 Compare November 16, 2026 15:14
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 0952a73 to 1f42a46 Compare November 16, 2026 15:53
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch 2 times, most recently from 190f3cb to fdc9d71 Compare November 17, 2026 10:52
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 1f42a46 to d94c24d Compare November 17, 2026 10:52
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from fdc9d71 to fc23170 Compare November 17, 2026 11:21
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 0fb469a to 8237caa Compare November 17, 2026 12:02
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from fc23170 to 0d214eb Compare November 17, 2026 12:02
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 8237caa to 32552ca Compare November 17, 2026 12:36
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 0d214eb to 2a05c5e Compare November 17, 2026 12:36
simonfaltum and others added 5 commits November 17, 2026 15:03
aitools mcp add and remove now change the Claude Code, Codex CLI, Gemini CLI
and Copilot CLI entries through each agent's own mcp commands, with a
read-back of the agent's config file. The agent CLI runner, resolver and
stderr helper live in agents, and the installer's plugin probe reuses
agents.ResolveBinary. The installer keeps its timeout-aware runner and
stderr helper.

Co-authored-by: Isaac <no-reply@databricks.com>
The read-only check from card 01 ran only before the direct write, and
removeDirect had no agent to name in the error. The agent's own CLI
writes the config file itself, so a read-only file was still changed
through it. Upsert and RemoveAt now check the file before the CLI runs,
and removeDirect takes the agent, so both paths refuse a read-only file.
Tests that used Remove now call RemoveAt, which replaced it here.

Co-authored-by: Isaac <no-reply@databricks.com>
Card 04 now leaves error_category out of a successful aitools mcp add
document, so the add outputs in this card's golden lose the
"error_category": "TYPE_UNSPECIFIED" line.

Co-authored-by: Isaac <no-reply@databricks.com>
RemoveAt takes a context in this card, so the inline-table test that
card 01 added and card 05 moved to RemoveAt passes t.Context().

Co-authored-by: Isaac <no-reply@databricks.com>
RemoveAt takes a context in this card, so the TOML array test that card
01 added and card 05 moved to RemoveAt passes t.Context().

Co-authored-by: Isaac <no-reply@databricks.com>
simonfaltum and others added 3 commits November 17, 2026 15:03
Card 05 moved Upsert's comparison into mergeLaunch, which compares the
launch keys as they are. An agent's CLI may write an empty env table
where the spec writes none, and this card's launchOf drops it, so an
entry the CLI wrote reads as unchanged. mergeLaunch now uses launchOf, so
Upsert and the list status agree with that again.

Co-authored-by: Isaac <no-reply@databricks.com>
codex mcp add and codex mcp remove rewrite every [mcp_servers.*] table
of the user's config. On a real config with 11 servers, one round trip
dropped the default enabled = true keys, collapsed multi-line arrays,
turned 10 into 10.0 and converted CRLF to LF. The direct writer edits
only the server's own tables, so Codex now always uses it for add and
remove. Claude Code, Gemini CLI and Copilot CLI keep their own CLI.

Co-authored-by: Isaac <no-reply@databricks.com>
Card 01 now leaves the --agents hint to the commands, so the writer
refuses with "<file> is read-only; make it writable" and ErrReadOnly.

Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08-challenge branch from 32552ca to bb76f49 Compare November 17, 2026 15:11
@simonfaltum
simonfaltum force-pushed the aitools-mcp/08b-agent-clis branch from 2a05c5e to 1c32739 Compare November 17, 2026 15:11
simonfaltum and others added 6 commits November 17, 2026 17:04
Codex has no add or remove command in its spec now, so the CLI path never reads HomeEnv for it. Codex's config path
reads CODEX_HOME itself, and mcpHomeEnvs still lists it. The Claude and Gemini MCP specs name their home variable
with the constants this change introduced, instead of repeating the literal.

Co-authored-by: Isaac <no-reply@databricks.com>
Codex is written directly, so no acceptance test runs its CLI. The stand-in now fails any command it is given, so a
regression back to codex mcp fails the test instead of only changing the output. The Copilot handler, which shared the
function, is renamed to say so.

Co-authored-by: Isaac <no-reply@databricks.com>
Go quotes an argument that has a tab, and an empty argument as "", and cmd.exe strips the outer quotes of a batch
file's command line, so both reach the shim garbled. batchSafe now refuses them like the other characters it refuses.

Co-authored-by: Isaac <no-reply@databricks.com>
The comment over the Claude and Gemini home variables described Codex and Copilot, and the test comment said a Codex
CLI on PATH runs, which it no longer does.

Co-authored-by: Isaac <no-reply@databricks.com>
A rewrite that keeps the inode of an executable can make macOS kill it on exec, once the kernel has cached the old
signature. The fake CLIs are now written beside their path and renamed over it.

Co-authored-by: Isaac <no-reply@databricks.com>
The test drives the read-only refusal through Upsert and RemoveAt, not through cliPath, so the old name pointed at the
wrong function.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aitools AI tools (databricks aitools) related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants