Skip to content

Add non-interactive aitools mcp add behind a hidden group - #7544

Draft
simonfaltum wants to merge 49 commits into
aitools-mcp/03-statefrom
aitools-mcp/04-add
Draft

simonfaltum wants to merge 49 commits into
aitools-mcp/03-statefrom
aitools-mcp/04-add

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

This pull request is part of the stack that adds the hidden databricks aitools mcp command group. It builds on #7537 and adds aitools mcp add, which installs Databricks managed MCP servers into coding agents non-interactively, bound to one CLI profile.

Changes

  • aitools mcp add --names ... --agents ... installs full names (system.ai.github) or leaf names into the named agents, or into every detected agent without --agents. Leaf names resolve in --location, which defaults to system.ai or to the one schema the full names share. A leaf next to full names outside system.ai is refused.
  • Refusals that need no request come first: flags, unknown or non-MCP agents, the binary name, a profile that is missing, has no host, or is account-level (refused before any credential is sent), a server whose profile changed, and a name held by another server or by an entry this CLI did not write, unless --force.
  • A named agent that is not installed is refused. InstalledForMCP counts an agent as installed when its config directory, skills, MCP file or a binary on PATH is present. A home variable (CODEX_HOME, COPILOT_HOME, CLAUDE_CONFIG_DIR, GEMINI_CLI_HOME, XDG_CONFIG_HOME) set away from its default leaves only the MCP file's directory to count.
  • --name and stored names over 32 characters (mcp.MaxServerNameLen) are refused, as are invalid names.
  • A name conflict refuses the run for a named agent, and fails only that agent for a detected one.
  • Entries run databricks aitools mcp serve, with DATABRICKS_CONFIG_FILE pinned when it is set. The binary path comes from argv at run time, made absolute when possible. Otherwise the output notes that agents must find databricks on PATH.
  • A sole profile whose host names its workspace in ?w= is auto-detected. On Windows, a drive-relative path is refused unless it is on the working directory's drive.
  • The read-only refusal suggests --agents only for named agents. A successful add prints the service's note, if it has one.

Why

Coding agents cannot use Databricks managed MCP servers yet. The state and agent-config writers from the earlier PRs need a command that calls them. The group stays hidden until serve lands, so no release ships an entry that cannot start.

Decisions to review

  • A conflict in a detected agent skips that agent for one server, and the run continues. Cost: no top-level error for it. add still fails when a requested service reaches no agent.
  • A missing or host-less profile is refused by the check serve runs, so both commands print the same text. Without an install record it names the service and how to set it up, with no remove hint.
  • UNKNOWN_AGENT covers a known agent that is not installed. No telemetry category fits.
  • A stored name held by another state entry has no --force override.
  • An agent whose binary is on PATH counts as installed, so add creates its config directory on the first write.
  • A server whose profile changed is refused, never rebound.

How to review

Refactors, no behavior change: Bind is split into CheckBinding, BoundConfig and AuthenticateBound (libs/aitools/mcp/binding.go). The exported helpers are ResolveConfigFile and AbsoluteAsWritten (configfile.go), FindEntry (binding.go), ErrProfileMissing (state.go), SystemAILocation (known.go), and mcpconfig.EnvKeys (mcpconfig/spec.go).

New behavior, to read closely: cmd/aitools/mcp_add.go (planAdds, chooseName, locationOf, agentFailureError), libs/aitools/agents/agents.go (InstalledForMCP, mcpHomeMoved), cmd/aitools/mcp.go (mcpWorkspaceProfile), and the drive-relative rule in AbsoluteAsWritten.

Tests

  • Unit, cmd/aitools: name planning and conflicts, refusals before any request, recording when one server fails, distinct agent failures, and which agents count as installed.
  • Unit, libs/aitools: the MCP-home presence rule, the profile check with no entry, and EntryEnv.
  • Acceptance acceptance/cmd/aitools/mcp/: two services and agents, text and JSON output, two profiles, an unparsable config, an uninstalled agent, and the hidden group.
  • go test -race on cmd/aitools and libs/aitools, the aitools acceptance tests, GOOS=windows go vet, golangci-lint and ./task checks pass.
  • Not tested: serve (a later PR), the picker, and real agent processes.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 2c5b663f2 | Workflow run

Regression test report

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

9 tests: regression=9 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-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/hidden ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-agent-not-installed: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1374: Diff:
        --- cmd/aitools/mcp/add-agent-not-installed/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-agent-not-installed1198774416/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:1152: 
        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": "7a0ddd29-a354-ee16-7a0d-dd29a354eea2",
        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:1374: Diff:
        --- cmd/aitools/mcp/add-agent-not-installed/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-agent-not-installed2847121329/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:1152: 
        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": "7a0ddd2a-750d-02f0-7a0d-dd2a750d03e1",
        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:1374: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1374
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1115
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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-config90228927/002/output.txt
    acceptance_test.go:1152: 
        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": "7a0ddd29-b9e2-119c-7a0d-dd29b9e2128c",
        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:1374: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1374
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1115
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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-config409146310/002/output.txt
    acceptance_test.go:1152: 
        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": "7a0ddd2a-9eff-1d2b-7a0d-dd2a9eff1e11",
        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-name-notices: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1374: Diff:
        --- cmd/aitools/mcp/add-name-notices/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-name-notices2572912497/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:1152: 
        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": "7a0ddd29-baef-f514-7a0d-dd29baeff5f0",
        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:1152: 
        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": "7a0ddd29-b89b-c450-7a0d-dd29b89bc5c3",
        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:1374: Diff:
        --- cmd/aitools/mcp/add-name-notices/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-name-notices3069212130/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:1152: 
        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": "7a0ddd2a-9fb7-1795-7a0d-dd2a9fb71803",
        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:1152: 
        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": "7a0ddd2a-9c23-d4e7-7a0d-dd2a9c23d5ce",
        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-text: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1374: Diff:
        --- cmd/aitools/mcp/add-text/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-text1817901872/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 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 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:1152: 
        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": "7a0ddd29-add0-b920-7a0d-dd29add0ba1a",
        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:1152: 
        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": "7a0ddd29-afe0-6f93-7a0d-dd29afe0708d",
        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:1374: Diff:
        --- cmd/aitools/mcp/add-text/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-text2652778270/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 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 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:1152: 
        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": "7a0ddd2a-9035-9089-7a0d-dd2a9035915b",
        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:1152: 
        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": "7a0ddd2a-91e3-d115-7a0d-dd2a91e3d20f",
        LOG.create-github-logfood:   "name": "mcp-services/system.ai.github",
        LOG.create-github-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-github-logfood: }
TestAccept/cmd/aitools/mcp/add-two-agents: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌

main (bf8caad):

acceptance_test.go:1374: Diff:
        --- cmd/aitools/mcp/add-two-agents/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-two-agents4071737519/002/output.txt
        @@ -2,156 +2,28 @@
         === Two services for two agents, as JSON
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,codex --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": "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"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        -=== Claude Code config keeps the entries it already had and gets ours
        +Usage:
        +  databricks aitools [command]
         
        ->>> cat home/.claude.json
        -{
        -  "mcpServers": {
        -    "my-server": {
        -      "type": "stdio",
        -      "command": "my-server",
        -      "args": []
        -    },
        -    "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",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    }
        -  }
        -}
        +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
         
        -=== Codex config
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        ->>> cat home/.codex/config.toml
        -[mcp_servers.genie_one_mcp-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.genie_one_mcp", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.genie_one_mcp-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +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)
         
        -[mcp_servers.github-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.github", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.github-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -=== State records the binding, without the time and CLI version
         
        ->>> jq .mcp | del(.servers[].installed_at, .servers[].cli_version) home/.databricks/aitools/skills/.state.json
        -{
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": false,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": true,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    }
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1152: 
        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": "7a0ddd29-aee0-1a25-7a0d-dd29aee01b01",
        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:1152: 
        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",
... (5 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.26.0):

acceptance_test.go:1374: Diff:
        --- cmd/aitools/mcp/add-two-agents/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-two-agents907640767/002/output.txt
        @@ -2,156 +2,28 @@
         === Two services for two agents, as JSON
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,codex --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": "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"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        -=== Claude Code config keeps the entries it already had and gets ours
        +Usage:
        +  databricks aitools [command]
         
        ->>> cat home/.claude.json
        -{
        -  "mcpServers": {
        -    "my-server": {
        -      "type": "stdio",
        -      "command": "my-server",
        -      "args": []
        -    },
        -    "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",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    }
        -  }
        -}
        +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
         
        -=== Codex config
        +Flags:
        +  -h, --help   help for aitools
         
        ->>> cat home/.codex/config.toml
        -[mcp_servers.genie_one_mcp-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.genie_one_mcp", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.genie_one_mcp-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +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)
         
        -[mcp_servers.github-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.github", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.github-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -=== State records the binding, without the time and CLI version
         
        ->>> jq .mcp | del(.servers[].installed_at, .servers[].cli_version) home/.databricks/aitools/skills/.state.json
        -{
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": false,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": true,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    }
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1152: 
        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": "7a0ddd2a-8da1-d08b-7a0d-dd2a8da1d167",
        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:1152: 
        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",
... (5 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

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

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 763aebd

Run: 44097834689

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 24 9:01
💚​ aws-windows-latest-4core-16gb 1 272 22 5:53
🔄​ azure linux-2core-8gb 1 1 268 24 10:51
💚​ azure-windows-latest-4core-16gb 1 271 22 8:04
💚​ gcp linux-2core-8gb 1 270 24 9:07
🔄​ gcp-windows-latest-4core-16gb 1 1 271 22 11:06
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
🔄​ TestSyncFullFileSync ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestSyncNestedFolderDoesntFailOnNonEmptyDirectory ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
Top 12 slowest tests (at least 2 minutes):
duration env testname
3:49 azure-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
3:22 gcp-windows-latest-4core-16gb TestFilerReadDir/workspace_files
3:19 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
3:00 aws-windows-latest-4core-16gb TestAccept
2:59 gcp-windows-latest-4core-16gb TestImportDirWithOverwriteFlag
2:57 gcp-windows-latest-4core-16gb TestAccept
2:51 azure-windows-latest-4core-16gb TestAccept
2:38 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
2:30 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:20 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:11 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsStat
2:03 gcp-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files

@simonfaltum
simonfaltum force-pushed the aitools-mcp/04-add branch 3 times, most recently from f3c3d22 to 182ccf9 Compare November 12, 2026 19:33
@pietern pietern added the aitools AI tools (databricks aitools) related changes label Nov 16, 2026
@simonfaltum
simonfaltum force-pushed the aitools-mcp/04-add branch 2 times, most recently from 113a0d4 to 2ad5e5b Compare November 17, 2026 10:52
simonfaltum and others added 3 commits November 17, 2026 14:55
`databricks aitools mcp add` installs Databricks managed MCP servers into
coding agents, bound to one CLI profile. Each server is written as a stdio
entry that runs `databricks aitools mcp serve`, which lands in a later change.
The group stays hidden until the stack is complete.

Co-authored-by: Isaac <no-reply@databricks.com>
mcpconfig.Spec.IsOurs is gone, so the unmanaged check calls
mcpconfig.IsDatabricksEntry directly. serverNamePattern is replaced by
mcpconfig.ValidServerName so the --name rule cannot drift from the writer.

The add-two-agents Codex golden changes: agentconfig now edits TOML as
text, so the server tables are written flush-left without the
[mcp_servers] parent header. The entries are unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
An agent named explicitly with --agents whose config directory does not
exist now fails for that agent alone: nothing is written and its
directory is not created. The other agents still install, and the
command exits 1. Agents picked by detection are installed by
construction, so they are unchanged.

The failure uses the UNKNOWN_AGENT category, since the SPEC table has no
row for an agent that is not installed.

The add cases whose agents must exist now create their config
directories first, and add-agent-not-installed covers the refusal.

Co-authored-by: Isaac <no-reply@databricks.com>
simonfaltum and others added 28 commits November 17, 2026 14:55
Describe the mcp group, add an example to mcp add, and use "services"
for the --names values in its help. The Cursor hint names the Cursor
docs' term "agent" instead of calling the CLI "agent" in a parenthetical.

Co-authored-by: Isaac <no-reply@databricks.com>
When an --agents name matches exactly one MCP-capable agent by binary
name or name prefix, the error says "did you mean <agent>?". The shared
agent registry is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
A profile with no installed server that does not exist is usually
mistyped, so add lists the profiles that exist after the shared binding
text. serve keeps that text, and so does add when a server is installed
for the profile.

Co-authored-by: Isaac <no-reply@databricks.com>
The document's error_category defaulted to TYPE_UNSPECIFIED on every
run, so a successful add reported a failure category. The field is now
omitted unless the command fails at the top level.

Co-authored-by: Isaac <no-reply@databricks.com>
The text output now explains a generated name that got a suffix, and
which agents hold the base name. It also says when --force replaced an
entry that this CLI did not write. The JSON document is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
A multi-server add printed the hint after every server. It now comes
once, after the servers, and names each server Cursor may ask about.
cursor-agent mcp enable takes one identifier, so for several servers the
hint says to run it for each.

Co-authored-by: Isaac <no-reply@databricks.com>
Card 02 replaced the SignInRequired field of mcp.Service with a method
derived from OAuthProvider.

Co-authored-by: Isaac <no-reply@databricks.com>
A profile named like a serve flag, such as --service, was taken for the flag
because the lookup searched every argument. Skip the value of each flag that
takes one while reading, so the profile value is never read as a flag.

Co-authored-by: Isaac <no-reply@databricks.com>
A profile with a host and an account_id but no workspace_id passed the binding
check and reached the workspace requests, where it failed with an opaque error.
The workspace commands refuse it up front, so mcp add does the same from the
profile file, which makes no request.

Also list the existing profiles on their own line, and only for a profile that
does not exist, so the suggested login command copies without a trailing period.

Co-authored-by: Isaac <no-reply@databricks.com>
Move the TestCheckBindingMatchesBind doc comment onto its own test, name the
helpers of TestInstalledForMCP as functions, commit the Cursor config that
add-name-notices wrote with a heredoc, and capture the hidden help output in a
LOG file. The cliError comment no longer claims telemetry reporting that mcp add
does not do.

Co-authored-by: Isaac <no-reply@databricks.com>
withExistingProfiles looked up the existing profiles to tell a missing profile from
one without a host, but the loader skips sections without a host, so a host-less
profile was still listed as missing. The missing-profile error now carries
ErrProfileMissing as its cause, and mcp add checks that with errors.Is.

The account-level refusal reads a workspace from a ?w= query on the host, as the
SDK does, so a host that names a workspace is accepted. The serve argv is defined
once in mcpconfig, and a stored name that another server of the run already uses
is refused.

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

The account-level refusal read the profile file, so a workspace profile whose
workspace ID comes from the host or from discovery was refused, though the
workspace commands accept it. The check now runs in profileClient on the config
BoundConfig resolves, before the credential is sent.

An agent whose config cannot be read is refused with its error before any
request, as a refused agent is, instead of failing after the workspace calls.

The cliError type is folded into categorizedError, the failure helper of the other
aitools commands, and the five new functions that lacked doc comments have them.

Co-authored-by: Isaac <no-reply@databricks.com>
writeFakeCLI repeated fakeBinsOnPath for one binary, so the test uses fakeBinsOnPath
and the duplicate goes. The runMcpAdd doc comment is shorter and no longer repeats
the control flow.

Co-authored-by: Isaac <no-reply@databricks.com>
Card 02 now returns ErrNoServerName for a leaf that sanitizes to
nothing. Add passes that error on with "pass --name", in place of its
own check for an empty name.

Co-authored-by: Isaac <no-reply@databricks.com>
…tools mcp add

Claude Code, Gemini CLI and OpenCode move their MCP config file with
CLAUDE_CONFIG_DIR, GEMINI_CLI_HOME and XDG_CONFIG_HOME (APPDATA on
Windows). When such a variable was set and the agent's binary was on
PATH, add was accepting the agent and writing its config into a
directory that did not exist yet. The guard that Codex and Copilot CLI
already have now covers these agents too: when one of the variables is
set, the directory the MCP config file lives in must exist.

Co-authored-by: Isaac <no-reply@databricks.com>
The invoked path was read into a package variable at init, so an empty
argv panicked before the CLI started, and a test had to swap the
variable. mcpBinaryPath now reads os.Args[0] when it is called, and an
empty argv yields no path, which the caller refuses as not the databricks
binary.

Co-authored-by: Isaac <no-reply@databricks.com>
With no --profile, aitools mcp add picked the only workspace profile, but
it filtered out an account-style profile whose host carries the workspace
in ?w=. --profile accepts that profile, so auto-detect now accepts it too.

Co-authored-by: Isaac <no-reply@databricks.com>
A server name recovered from the state file or an agent entry was reused
without the checks --name gets, so a hand edit could give an agent a name
that does not split as mcp__<name>__<tool> does. The stored name now gets
the same check, and the error names the command that removes the entry.

Co-authored-by: Isaac <no-reply@databricks.com>
On Windows, a rooted path with no drive, such as \tools\databricks.exe,
is not absolute, so AbsoluteAsWritten joined it to the working directory
and produced a doubled separator under the working directory instead of
the current drive's root. The path now takes the working directory's
volume, which the binary command path and the config file path share.

Co-authored-by: Isaac <no-reply@databricks.com>
The writer refuses a config file the user made read-only with the
ErrReadOnly sentinel, and no longer names --agents, which the writer
does not know. aitools mcp add adds the hint, so its message reads as it
did before.

Co-authored-by: Isaac <no-reply@databricks.com>
Refuse a run where every detected agent has an unreadable config before any request, as --agents does, and keep the
error category of the first refusal. Refuse --agents that names no agent instead of writing every detected agent.
Check the held names of a stored server, and refuse a stored name that is empty. Match the existing profiles hint on
the same profiles that --profile accepts. Print a service's prerequisite note after its results. Resolve a
drive-relative path on the working directory's drive. Read serve flags as pflag does, taking the last value and the
equals form. Move the OpenCode home variable to the one its config directory reads on each OS, and define the
Codex and Copilot home variables with the other constants.

Co-authored-by: Isaac <no-reply@databricks.com>
Count an agent refused for its config as failing every server, so a run where the other agents also fail ends before
any request. Keep XDG_CONFIG_HOME as an OpenCode home variable on Windows, where it is the fallback to APPDATA. Keep
a root working directory from doubling its separator in a relative config path, print that path with forward slashes
in its error, and resolve a "./" binary path given with forward slashes on Windows. Use one constant for the server
name rules in both messages that refuse a name.

Co-authored-by: Isaac <no-reply@databricks.com>
Keep a relative binary path with repeated separators after "./" relative, so ".//bin/databricks" is not persisted as
/bin/databricks. Use XDG_CONFIG_HOME alone as the OpenCode home variable, since APPDATA is the default location on
Windows and is always set there. Require Gemini's mandatory file when GEMINI_CLI_HOME makes the directory the only
signal, as Detected does. Check the read-only error by its type before adding the agents hint. Say in the --location
help that the shared schema is the default only when there are no leaf names, and indent the sign-in line like the
other server lines.

Co-authored-by: Isaac <no-reply@databricks.com>
Refuse an agent whose detection fails with that error, rather than writing it as detected. A name conflict in an agent
that is refused, and so not written, no longer refuses the run with --agents: only the agents that are written decide.

Co-authored-by: Isaac <no-reply@databricks.com>
A generated server name is capped at 32 characters, because agents limit mcp__<server>__<tool> to about 64 characters. A --name over that cap was accepted, and so was a stored name that a hand edit made longer. Refuse both: --name at flag validation with the limit and the length given, and a stored name in chooseName with the command that removes and re-adds the server, as the other stored-name refusals do.

The cap is exported from libs/aitools/mcp as MaxServerNameLen so that cmd/aitools checks the same constant.

Co-authored-by: Isaac <no-reply@databricks.com>
InstalledForMCP takes the agent as installed only when the directory of its MCP config file exists, once one of its home variables is set. A variable that holds the default location, such as XDG_CONFIG_HOME=~/.config or GEMINI_CLI_HOME=$HOME, made an installed agent that had never run count as absent. A variable now counts only when its cleaned value differs from the default that the agent's path code uses when the variable is unset. Each default is in mcpHomeDefaults, so the comparison follows the agent's own path code.

Co-authored-by: Isaac <no-reply@databricks.com>
A read-only config file is refused with a hint to make it writable or to leave the agent out of --agents. The hint is right when the agent was named with --agents. When the agents were detected, --agents is not a way out, so the refusal keeps the writer's own message.

Co-authored-by: Isaac <no-reply@databricks.com>
Card 02 names the AWS GovCloud app in the GitHub note, which add prints.

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