Skip to content

Add aitools mcp serve, the stdio proxy for managed MCP servers - #7550

Draft
simonfaltum wants to merge 39 commits into
aitools-mcp/06a-bridgefrom
aitools-mcp/06b-serve
Draft

simonfaltum wants to merge 39 commits into
aitools-mcp/06a-bridgefrom
aitools-mcp/06b-serve

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

This pull request is part of a stack that adds the hidden databricks aitools mcp command group. It builds on #7540 and adds aitools mcp serve, the stdio command that each installed MCP entry runs.

Changes

  • aitools mcp serve --profile <p> --service <full name> [--agent <name>], hidden. It runs the binding checks, then bridges stdin and stdout to the service endpoint with the profile's credentials.
  • Stdout carries only JSON-RPC, so --output and a log file on stdout are refused.
  • Binding and auth failures exit 2. mcp add still exits 1 on a binding failure.
  • A rejected token fails that request with the login hint. Later requests fail at once, and serve prints one final line and exits 2.
  • A transient token failure (a network error, a timeout, a 5xx from the token endpoint) fails only that request, with no login hint, since a login would not fix it. Serve keeps running and the next request asks for a token again.
  • libs/aitools/mcp/proxy: Authenticate may return ErrSkipRequest to skip the session DELETE.
  • cmd/root: ExitStatusError, which ExitStatus honors. Execute closes the log file and restores the default logger and standard log output on return, also after a panic.
  • libs/testserver: the fake MCP endpoint answers 404 for unknown services and matches names without regard to case.

Why

Each entry that mcp add writes runs aitools mcp serve. It binds to one profile before it reads stdin, so a profile that points elsewhere at start fails with a message instead of sending a token to another host.

Decisions to review

  • Only a rejected token stops the proxy. A rejection is one that a new login fixes: a 400 or 401 from the token endpoint with invalid_grant or invalid_client, or the CLI's U2M client reporting an invalid refresh token. Everything else fails only its request, including network errors, timeouts, 5xx responses, and anything the check cannot classify. The reason is a laptop that wakes before the network is back: stopping there leaves the agent with a dead server until the entry restarts. The cost is that an unclassified error keeps failing requests instead of stopping serve.
  • Known limitation: the binding is checked only at start. A profile re-pointed to another host during a session, for example by databricks auth login --profile P --host B, keeps sending its token to the host serve was bound to. The command's doc comment says so.
  • A log file that is also stderr is allowed, so --log-file stdout works on a Unix terminal. Windows refuses it even in a terminal, because a console is not a regular file there.
  • If the client cancels the request that hit a rejected token before the bridge logs it, the login hint is lost. The final line still says the proxy stopped.
  • An unknown --agent is accepted and left out of the User-Agent, since a later release may write agents this binary does not know.

Tests

  • go test -race on cmd/aitools, cmd/root, libs/aitools and libs/testserver, also through the repo's gotestsum runner.
  • cmd/root: the stdout refusal and check, including a closed stderr; logger restore after a panic and a normal return.
  • cmd/aitools: a rejected token stops the proxy with exit 2, the hint, and no later token request. A transient failure fails only its request, and the next request succeeds while serve runs to stdin close (exit 0). TestCredentialRejected checks each error shape.
  • Acceptance serve-passthrough checks each stdout line is one JSON-RPC message; serve-binding-errors checks exit 2 and the stderr text.

Not tested: a real token refresh end to end, because the fake cannot fail one. The typed U2M case has no exported constructor, so the tests do not reach it. Windows: only go vet and a test build ran, so the console behavior is from reading the code.

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: b52879a5d | Workflow run

Regression test report

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

15 tests: regression=15 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/drift-profile-missing ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/help ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/hidden ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/list-and-remove ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/repair-and-warnings ✅ ❌ ❌
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:1374: Diff:
        --- cmd/aitools/mcp/add-agent-not-installed/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-agent-not-installed2598064478/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": "7a0de0ec-c252-9ccb-7a0d-e0ecc2529dc5",
        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-installed1662136858/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": "7a0de0ed-aae8-e02a-7a0d-e0edaae8e1ac",
        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-config1392973220/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": "7a0de0ec-eb2a-5efe-7a0d-e0eceb2a6059",
        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-config4256202717/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": "7a0de0ed-dcdc-4e72-7a0d-e0eddcdc4fc0",
        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-notices435467392/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": "7a0de0ec-e1d8-40d0-7a0d-e0ece1d841d8",
        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": "7a0de0ec-dfef-141b-7a0d-e0ecdfef1502",
        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-notices4059499501/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": "7a0de0ed-d1d9-8e4a-7a0d-e0edd1d98fdc",
        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": "7a0de0ed-d075-1375-7a0d-e0edd0751519",
        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-text2414969774/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": "7a0de0ec-df93-1362-7a0d-e0ecdf9314db",
        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": "7a0de0ec-e195-71b3-7a0d-e0ece19572b7",
        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-text2284636956/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": "7a0de0ed-cfad-ab0d-7a0d-e0edcfadacca",
        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": "7a0de0ed-d270-9e69-7a0d-e0edd2709ff6",
        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-agents2537095198/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": "7a0de0ec-d386-eb67-7a0d-e0ecd386ed85",
        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-agents1398483772/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": "7a0de0ed-c2fe-ab24-7a0d-e0edc2feacd5",
        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)

10 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: b52879a

Run: 44125148633

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 30 9:46
💚​ aws-windows-latest-4core-16gb 1 272 28 6:06
💚​ azure linux-2core-8gb 1 269 30 9:18
🔄​ azure-windows-latest-4core-16gb 2 1 269 28 9:27
💚​ gcp linux-2core-8gb 1 270 30 12:28
🔄​ gcp-windows-latest-4core-16gb 2 1 270 28 10:19
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 🔄​f ✅​p 🔄​f
🔄​ TestSyncIncrementalFileOverwritesFolder ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestSyncIncrementalSyncPythonNotebookToFile ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
Top 16 slowest tests (at least 2 minutes):
duration env testname
3:54 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
3:37 gcp linux-2core-8gb TestFilerReadWrite/workspace_files
3:05 azure-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
2:57 aws-windows-latest-4core-16gb TestAccept
2:40 azure-windows-latest-4core-16gb TestAccept
2:39 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:32 gcp-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
2:30 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:27 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
2:26 gcp linux-2core-8gb TestFilerReadDir/workspace_files
2:19 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
2:15 gcp-windows-latest-4core-16gb TestAccept
2:09 aws-windows-latest-4core-16gb TestSyncFullFileSync
2:05 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:04 azure linux-2core-8gb TestImportDirWithOverwriteFlag
2:02 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat

@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from 4ecc28f to 2f43e8a Compare November 12, 2026 14:36
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from eec9d1a to 5b1d279 Compare November 12, 2026 14:37
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from 2f43e8a to 3c43783 Compare November 12, 2026 17:08
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from 5b1d279 to 9187003 Compare November 12, 2026 17:10
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch 2 times, most recently from 4688f64 to ed4190f Compare November 12, 2026 22:00
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from 9187003 to 48fac6f Compare November 13, 2026 00:15
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from 6634449 to 5c42df0 Compare November 13, 2026 15:05
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from 7064bbc to 10450c9 Compare November 13, 2026 15:05
@pietern pietern added the aitools AI tools (databricks aitools) related changes label Nov 16, 2026
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from 5c42df0 to ad029dd Compare November 16, 2026 12:47
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from 10450c9 to 9ec98a0 Compare November 16, 2026 12:47
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from ad029dd to 851225d Compare November 16, 2026 13:19
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from 9ec98a0 to 1d09e53 Compare November 16, 2026 13:19
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from 851225d to fd9cdef Compare November 16, 2026 13:32
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from 1d09e53 to 01b4249 Compare November 16, 2026 13:32
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from fd9cdef to 6594052 Compare November 16, 2026 14:49
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch 2 times, most recently from 11e6e00 to 2a9b99f Compare November 16, 2026 15:14
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from 6594052 to 1174f67 Compare November 16, 2026 15:14
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from 2a9b99f to c7d75cb Compare November 16, 2026 15:53
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch 2 times, most recently from 2eafa10 to 0ca1f43 Compare November 17, 2026 10:52
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch 2 times, most recently from 0b9a961 to e653041 Compare November 17, 2026 11:21
simonfaltum and others added 24 commits November 17, 2026 15:01
The check ran after initializeContext had installed the stdout logger, so a refused command
still wrote its telemetry debug line to stdout. It now runs inside initializeContext, after the
log file opens and before the default logger is set, and it closes the refused file.

The log file is also recorded on the context here, so Execute closes it after the last log line.

Co-authored-by: Isaac <no-reply@databricks.com>
…the service name

- A token that cannot be refreshed mid-session is printed once: the bridge logs it on the request that
  needed it, and serve exits 2 without printing it again. The session DELETE after that failure is
  sent without a credential, so it does not log the refresh error a second time.
- A state file that cannot be read is a binding failure (exit 2).
- --service must be a full three-part name, with the message naming the flag.
- An unknown --agent is reported on stderr once, not at debug level.
- The bound profile is no longer set as the command's config: serve logs no telemetry yet, so the
  setting had no effect. Card 10a adds it with the telemetry it serves.
- The signal context is released by the same stop that cancels the refresh guard, so a second
  signal during a refresh-failure shutdown ends the process.
- serveTransport sets InsecureSkipVerify on the clone's TLS config instead of replacing it.
- The fake MCP endpoint answers a client response (an id with no method) with 202 and no body.
- The second-signal test asserts the child was ended by the signal, not by a panic or exit.

Co-authored-by: Isaac <no-reply@databricks.com>
writesToStdout read the process's os.Stdout and os.Stderr. Under `go test -json`
the testing package sets os.Stderr to os.Stdout, so the stdout cases were taken
for stderr and the check passed the log file through. Take the two streams as
parameters, and give the tests pipes and a separate stderr of their own.
Production behavior is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
On Windows os.SameFile reports any two pipes or character devices as the same
file, because their file ids are zero. With stdout piped, a null device or a
named-pipe log file was refused as stdout. Compare by identity only for
regular files there; elsewhere nothing changes. stdout itself is matched by
pointer, so the stdout keyword is still refused on every OS.

Co-authored-by: Isaac <no-reply@databricks.com>
When stdout and stderr are one file, as on a terminal, a log file opened as
/dev/stderr or /dev/tty was refused as stdout, while --log-file stderr was
allowed. The protocol already shares that file with the diagnostics, so the
check cannot help there: a destination that is the same file as stderr is not
refused. Other destinations are compared as before.

Co-authored-by: Isaac <no-reply@databricks.com>
Execute closed the log file through the context of the command that ran. On a
panic the command's context was never returned, so the file stayed open, and
the default logger kept writing to it after Execute returned, or closed. Execute
now keeps a slot in its own context that initializeContext fills, closes the
file in a defer (which also runs on a panic), and restores the default logger
that was in place before the command.

Co-authored-by: Isaac <no-reply@databricks.com>
A caller whose credential is known to be unusable has no reason to send the
session DELETE at shutdown: it would fail and log the failure again. Authenticate
can now return ErrSkipRequest for the DELETE. The bridge then sends and logs
nothing for it. Any other request that returns the sentinel is an error like
any other.

Co-authored-by: Isaac <no-reply@databricks.com>
After a token refresh failure, every later request asked for a token again
and logged the login hint again, a request cancelled before its failure was
logged left nothing on stderr, and a stdin error after the failure exited 1
and hid the auth status. Now the first failing request carries the hint, with
the restart step; later requests fail at once with a short error that does not
repeat it; the session DELETE is skipped (proxy.ErrSkipRequest); and serve
prints one final line and exits 2, whatever the bridge returned.

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

The fake MCP endpoint answered any service name, so a wrong service name or path
in the proxy's command still passed. A name with no service now gets 404, as
the gateway answers a name that has none, and the tests and the serve
acceptance case seed the service they use.

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

The stale-version skip for a command whose stdout carries a protocol had no
test. Move the decision into staleVersionSkipped, which takes the build info,
and test it. In initializeContext the refused log file no longer needs a close:
Execute closes the file it opened.

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

The flag names of serve are the constants that add writes into agent configs,
so an entry binds what add wrote; a test parses that argv with serve's flags.
The dialer helper existed only for a test of a constant, so it is inlined and
the test dropped. The binding status doc no longer cites a list command that is
not in this tree.

Co-authored-by: Isaac <no-reply@databricks.com>
The serve cases ran the command without printing it, so the flags under test
did not appear in the goldens. Wrap each invocation in trace.

Co-authored-by: Isaac <no-reply@databricks.com>
slog.SetDefault redirects the standard log package to the new handler, so
after Execute closed the log file, log.Printf still wrote to it. Execute
now saves and restores log.Writer() and log.Flags() with the default logger.

Co-authored-by: Isaac <no-reply@databricks.com>
The stdout check ran for every protocol command, including the default
stderr log, and a failed Stat returned an error that stopped the command,
so `2>&-` made `serve` fail. A stat failure now means the stream is not
stdout, and writesToStdout returns a bool.

Co-authored-by: Isaac <no-reply@databricks.com>
Unity Catalog names are case-insensitive, and the fake's listing already
matches them that way. The MCP endpoint looked the name up exactly, so a
service addressed in another case got 404.

Co-authored-by: Isaac <no-reply@databricks.com>
jq -s also accepts pretty-printed or several-per-line JSON, so the
passthrough test did not check that each stdout line is one message. The
filter now reads each line with fromjson. The binding-errors steps send
stderr to the script output, so each traced command, its stderr and its
exit code appear in order in the golden.

Co-authored-by: Isaac <no-reply@databricks.com>
No behavior change. The refresh-failure tests share one fake endpoint and
one Authenticate, and the exit-with-status error is built by one helper.
Stale-version skipping is one predicate, the refresh-failure messages are
constants in the tests, and the two no-body endpoint tests are one table.
Comments are trimmed to their reasons, test comments start with the test
name, and the silent_err.go import is back to its original form.

Co-authored-by: Isaac <no-reply@databricks.com>
…ndows console case

serve checks its binding only at start. A profile re-pointed to another
host during the session keeps receiving the endpoint of the bound host, so
that is documented on the command. The refresh hint's restart is needed
because a new spawn re-runs the binding checks. The stdout check treats a
Windows console as a file that is not stdout, so `--log-file stdout` is
refused there even in a terminal.

Co-authored-by: Isaac <no-reply@databricks.com>
depguard forbids the standard log package outside a few generators. The
import is needed here because slog.SetDefault redirects that package, and
libs/log has no way to restore it. The exception is annotated where it is
used.

Co-authored-by: Isaac <no-reply@databricks.com>
Serve stopped on any token refresh failure. A network error, a timeout or a
5xx from the token endpoint is not a credential the user must replace, so
serve now fails only the request that needed the token, with the login hint,
and keeps serving. The next request asks for a token again.

A failure stops serve only when the token is rejected: the token endpoint
answers 400 or 401 with invalid_grant or invalid_client, or the U2M client
reports an invalid refresh token. Anything else is transient, including
errors that cannot be classified.

Co-authored-by: Isaac <no-reply@databricks.com>
A failure that is not a rejection, such as a network blip, says nothing
about the credential, so the request's error no longer tells the user to
log in. It says the next request tries again.

Co-authored-by: Isaac <no-reply@databricks.com>
serve printed its binding failures as bare text, while its flag errors and every other command's failures
start with "Error: ". The token-refresh stop line had no prefix either. Print both as "Error: <message>" so
an agent's MCP log shows one style. The exit status is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
At --log-level debug, serve logged nothing about the traffic it bridged: the bridge's HTTP client does not go through
the SDK logger. Wrap the bridge's transport in a RoundTripper that logs one debug line per upstream request: the HTTP
method, the JSON-RPC method and id from the body, the status, the time to the response headers, and whether a session
id was sent, received, or replaced.

The lines carry no body and no header value, so neither the token nor a session id nor a tool argument is logged. The
wrapper lives in serve, so the bridge package is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
With an expired or invalid token the MCP endpoint answers 3xx, a redirect to sign-in. The bridge does not follow it, so
every request failed with "HTTP 303" and the user got no hint. Wrap the upstream transport in a RoundTripper that turns
any 3xx into an error naming the login command for the profile, with DATABRICKS_CONFIG_FILE when the profile is pinned
to a config file. The request fails with that error, and serve keeps running. The Location is not read, since its query
can carry state. 200 and 5xx responses pass through unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06b-serve branch from a9f263c to b02d29d Compare November 17, 2026 15:11
@simonfaltum
simonfaltum force-pushed the aitools-mcp/06a-bridge branch from 40a3e6b to 0d32c09 Compare November 17, 2026 15:11
simonfaltum and others added 4 commits November 17, 2026 15:32
The protocol-skip change rewrote the comment of the DBR check. Keep the original line.

Co-authored-by: Isaac <no-reply@databricks.com>
A refresh rejection for a profile pinned to a config file now names that file in its login
command, as the sign-in redirect hint does. A missing refresh token or cached token is a
rejection too, so serve stops with the login command instead of retrying forever. The sign-in
redirect hint says to restart the server. Fix the test comments that contradicted their
assertions.

Co-authored-by: Isaac <no-reply@databricks.com>
Startup and refresh failures for a profile pinned to a config file now name that file in the
login command, as the sign-in redirect does. The restart step moves to its own line, so copying
the login command does not copy a trailing comma into the profile name. LoginCommand is shared by
the hints. The token-error helper is a named function, not a closure.

Co-authored-by: Isaac <no-reply@databricks.com>
On macOS the temporary config path is under a symlink, which ResolveConfigFile resolves. The expectation uses the resolved path.

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