Repository navigation
Add aitools mcp login, logout and list --check - #7551
Draft
simonfaltum wants to merge 87 commits into
Draft
simonfaltum wants to merge 87 commits into
simonfaltum wants to merge 87 commits into
Conversation
simonfaltum
changed the base branch from
aitools-mcp/06a-bridge
to
aitools-mcp/06b-serve
November 12, 2026 12:42
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 12, 2026 12:42
f4c096c to
62d20d0
Compare
Contributor
|
Commit: Regression test reportSelected 17 changed tests (limit=20, 0 not selected) 17 tests: regression=17 unreleased=0 coverage=0 failing=0
TestAccept/cmd/aitools/mcp/add-agent-not-installed: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌main (bf8caad): latest (v1.26.0): TestAccept/cmd/aitools/mcp/add-default-config: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌main (bf8caad): latest (v1.26.0): TestAccept/cmd/aitools/mcp/add-name-notices: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌main (bf8caad): latest (v1.26.0): TestAccept/cmd/aitools/mcp/add-text: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌main (bf8caad): latest (v1.26.0): TestAccept/cmd/aitools/mcp/add-two-agents: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌main (bf8caad): latest (v1.26.0): 12 more failure details omitted, see the full report in the run. |
This was referenced Nov 12, 2026
Collaborator
✅ Integration test reportCommit: c1d2179
Top 18 slowest tests (at least 2 minutes):
|
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 12, 2026 14:37
eec9d1a to
5b1d279
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 12, 2026 14:41
62d20d0 to
d7c9aec
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 12, 2026 17:10
5b1d279 to
9187003
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 12, 2026 17:13
d7c9aec to
d2dd977
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 13, 2026 00:15
9187003 to
48fac6f
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
2 times, most recently
from
November 13, 2026 07:16
0aa7987 to
a08bc42
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 13, 2026 15:05
7064bbc to
10450c9
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 13, 2026 15:05
a08bc42 to
4a8c08c
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 16, 2026 12:47
10450c9 to
9ec98a0
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
2 times, most recently
from
November 16, 2026 13:19
8ef469f to
d779ae1
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 16, 2026 13:19
9ec98a0 to
1d09e53
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 16, 2026 13:32
d779ae1 to
43bb551
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 16, 2026 13:32
1d09e53 to
01b4249
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 16, 2026 14:49
43bb551 to
e441c85
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 16, 2026 14:49
01b4249 to
11e6e00
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 16, 2026 15:14
e441c85 to
60bf035
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
2 times, most recently
from
November 16, 2026 15:53
2a9b99f to
c7d75cb
Compare
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
2 times, most recently
from
November 17, 2026 10:52
109bc73 to
661f21e
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 17, 2026 10:52
c7d75cb to
0b9a961
Compare
The profile carried its own copy of the token check, which every server of the profile repeats in its check. The text now reads the token from the checked servers, and the profile keeps no copy. No output changes. Co-authored-by: Isaac <no-reply@databricks.com>
…date_file.py The setup posts of the list-check and login-flips-active scripts sent their output to /dev/null, where a failure would not show. They write LOG files, as the other aitools scripts do. The list-check script edited the state with inline jq; it now uses update_file.py, with the binary path JSON-escaped so the replacement matches on Windows too. Both servers of that scenario record the binary, so both now report it missing. Co-authored-by: Isaac <no-reply@databricks.com>
The two login hint tests and the two browser stdout tests are table tests now. The doc of signInHint describes the sentence it returns, not a command. openDefault and openWithCommand have doc comments, and the long comments of the sign-in wait and of signInStatus are shorter. No behavior changes. Co-authored-by: Isaac <no-reply@databricks.com>
The helper returns the timeout error for the test's later assertions. The one test that only needs the error to be a timeout discards it explicitly, which the errcheck linter accepts. Co-authored-by: Isaac <no-reply@databricks.com>
The time limit covered every request of a profile together: its token check plus two requests per sign-in server. A profile with several sign-in servers on a slow but healthy workspace ran out of time and reported its later servers as unknown. Each request now gets the limit on its own, so a host that never answers still ends the profile's checks. Co-authored-by: Isaac <no-reply@databricks.com>
A plain error is now a transient token failure, so the guard tests that expect the proxy to stop use a rejected token, and serveProxy takes the pinned config file in the tests added for the transient case. Co-authored-by: Isaac <no-reply@databricks.com>
Main classifies a StateError as STATE_INVALID, so a state file that does not parse reports that category in the JSON sign-in output rather than UNCATEGORIZED. Co-authored-by: Isaac <no-reply@databricks.com>
main bumped github.com/spf13/pflag to 1.1.0 (#7635), which prints boolean flags as --force[=true|false] in help output and widens the flag column. Co-authored-by: Isaac <no-reply@databricks.com>
add now lists the existing profiles when --profile names one that does not exist and no server is installed for it. login and logout check the same binding, so they go through the same helper, and the parity test keeps the two messages equal. Co-authored-by: Isaac <no-reply@databricks.com>
The Cursor approval hint now names `agent` as the Cursor docs do, and the hidden test prints the group help, which lists this card's list, remove, login and logout commands. Co-authored-by: Isaac <no-reply@databricks.com>
list gains --check in this card, so its help in the help golden names the flag and says when the command uses the network. Co-authored-by: Isaac <no-reply@databricks.com>
serveProxy takes the pinned config file in this card. The two serve tests that card 06b added call it for an unpinned server, so they pass "". Co-authored-by: Isaac <no-reply@databricks.com>
Reword the list --check and login help in plain words, add examples to login and logout, and suggest the full name when login or logout gets a leaf name such as github. The full name is still required. Co-authored-by: Isaac <no-reply@databricks.com>
Check up to four servers of a profile at a time, and keep the order of the servers and of their warnings. Profiles stay sequential, since each one sets the config file environment that its checks read. Co-authored-by: Isaac <no-reply@databricks.com>
The group help now says what list, remove, login and logout are for, and remove's help says sign-ins are kept and that logout removes one. The login and logout examples move to the Example field, as in add, list and remove. The help golden also picks up the list --check wording from the previous commit. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Card 02 replaced the SignInRequired field of mcp.Service with a method derived from OAuthProvider. Test services that need sign-in now set an OAuthProvider. Co-authored-by: Isaac <no-reply@databricks.com>
Card 04 dropped the cause argument of failure. Login reports three failures whose message does not repeat the cause, so failureWithCause keeps the cause for errors.Is and errors.As without printing it. The account-level profileClient test passes the pinned file that this card adds. Co-authored-by: Isaac <no-reply@databricks.com>
Card 02 makes SignInURL refuse an unknown workspace ID. login returns that error; add --login records it as the failed sign-in of that server, as it does for a sign-in that fails. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
The sign-in hint of add is indented, the service's prerequisite note is printed after success, and the --location help names the case with no leaf names. The goldens for these outputs come from the review, so they are regenerated here. 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>
simonfaltum
force-pushed
the
aitools-mcp/07-login
branch
from
November 17, 2026 15:11
e43057b to
c1d2179
Compare
simonfaltum
force-pushed
the
aitools-mcp/06b-serve
branch
from
November 17, 2026 15:11
a9f263c to
b02d29d
Compare
… ? from the leaf-name error Add --login prints the note with the install, so the sign-in no longer prints it a second time. The leaf-name error ends with a question mark, which the error style does not allow. Co-authored-by: Isaac <no-reply@databricks.com>
…tion, timeouts and refresh failures list --check bounds each request on its own, so a slow answer does not leave the next request with no time. A profile that is account-only is refused before its token is sent, as the other commands refuse it. A token refresh that fails on the network or with a server error is unknown, not failed. add --login records no sign-in state for a sign-in URL that cannot be built, and stops starting sign-ins once the command is cancelled. Co-authored-by: Isaac <no-reply@databricks.com>
…FileCommand does The redirect hint built its own command, so on Windows it kept backslashes that the other hints do not. It now uses ConfigFileCommand, and the duplicate of PinnedFile is removed. The auth error test uses a lowercase cause, as the error style asks. Co-authored-by: Isaac <no-reply@databricks.com>
A refresh token that the token endpoint refuses arrives as an HTTP error inside a URL error, so a URL error no longer means the host could not be reached. list --check now checks for a refused credential before it treats a URL error as unknown, and a sign-in poll ends at once on a refused refresh instead of waiting out the timeout. Co-authored-by: Isaac <no-reply@databricks.com>
…isplayError A cancelled command reports the cancellation once, from the sign-in it interrupted, rather than again for each sign-in that follows. failureWithCause uses displayError, as the other messages with a cause do, instead of a second type with the same fields. BoundConfigWithin rounds a budget up to whole seconds, so a budget under one second stays a bound instead of the SDK default. Co-authored-by: Isaac <no-reply@databricks.com>
The default opener no longer waits for the browser process that databricks auth login starts. Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of a stack that adds the hidden
databricks aitools mcpcommand group, on #7550 (aitools mcp serve). It adds provider sign-in for external MCP services such as GitHub, which each user signs in to before the service's tools work.Changes
mcp login <service>prints the sign-in URL, opens it throughlibs/browser, and waits up to 5 minutes. Server and network errors while polling are retried until the timeout, and the timeout names the last one. Other errors end the sign-in. An already signed-in caller gets "Already signed in" and no URL.mcp logout <service>deletes the caller's credential, even when its service is no longer visible.loginandlogoutrefuse a changed profile before any request, asaddandservedo.mcp add --loginsigns in to each sign-in-required server it installed. Its JSON gains a per-serversign_inobject with the stateloginreports. A failed sign-in exits 1 and keeps the installs.mcp list --checkchecks each profile's token, then each server on its own status. A drifted server or one that cannot be read is skipped, and says why. Each check request ends after 5 seconds. A sign-in that is needed names the login command.loginnames the URL in JSON only when the page was shown.DATABRICKS_CONFIG_FILE.libs/browsergainsOpenOutputToStderrfor JSON output.Openis unchanged for other callers. The default opener no longer waits for a browser its launcher leaves running.Why
A sign-in is judged on the attempt that runs: a FAILED credential from an earlier attempt is deleted before the page opens. A failed poll does not mean the user has left the provider's page, so it does not end the wait. One unreachable workspace held
list --checkfor the SDK's five-minute retry budget. The SDK puts the service name into the request path unescaped, so names are escaped.Decisions to review
SignInreturns(alreadySignedIn, urlShown bool, err error), not a state. The command derives the JSON state and URL from them.cmd/authuses for profile validation. A workspace slower than that showsunknownwhere a longer wait would answer.logoutsends the DELETE before it looks up the service, so a credential for a deleted service can be removed. A mistyped name costs one request.BROWSERcommand's output goes to stderr during sign-in, so it cannot land before the JSON document.list --checksetsDATABRICKS_CONFIG_FILEin the process environment while it checks a profile, because the token store reads the process environment.stateaddsFAILEDandNOT_SIGNED_INto the documented values.Tests
libs/browser:TestOpenDoesNotWaitForLauncherChildfailed before the fix. The overlapping-opens test stubs the launcher, so no browser opens on any OS.libs/aitools/mcp: polls through server errors, an authentication error ends at once, the timeout's last error.cmd/aitools:TestAddChecksBoundsAProfileThatNeverAnswershung past five minutes before the fix;TestAddChecksBoundsEachRequestNotTheProfilecovers a profile whose requests take longer than the limit together. Unreachable profiles are unknown, not failed. Skipped servers, thesign_inJSON, and the login URL rule are covered too.list-check(GitHub's recorded binary is now also missing) andlogin-flips-active.go test -race -count=3on the touched packages; the Taskfile's gotestsum flags withBROWSERunset,BROWSER=noneand a symlinkedTMPDIR;./task test-exp-aitools;go test ./acceptance -run TestAccept/cmd/aitools;GOOS=windows go vetandgo test -cforcmd/aitools,libs/browserandlibs/exec;./task lint-q,./task fmt-q,./task checks.This pull request and its description were written by Isaac.