-
Notifications
You must be signed in to change notification settings - Fork 119
MCP: Configure auth on install #4035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Commit: da6863f
40 failing tests:
Top 50 slowest tests (at least 2 minutes):
|
| cmd.Flags().StringP("profile", "p", "", "~/.databrickscfg profile") | ||
| cmd.RegisterFlagCompletionFunc("profile", profile.ProfileCompletion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't add a flag for this; no one will use it, and we may not want to keep this way of doing authentication in future versions.
| databricksPath, "experimental", "apps-mcp") | ||
| "--env", "DATABRICKS_CONFIG_PROFILE=" + profile.Name, | ||
| "--env", "DATABRICKS_HOST=" + profile.Host, | ||
| "--env", "DATABRICKS_WAREHOUSE_ID=" + warehouseID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you hardcode the warehouse id like this then there should be some way to recover from a bad warehouse id at runtime. Otherwise there will be a new failure path.
(I do like the idea that it's now easier to configure for users btw!)
| } | ||
|
|
||
| // selectProfile checks if a profile is available and prompts the user to select one if needed. | ||
| func selectProfile(cmd *cobra.Command) (*profile.Profile, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still want to provide a built-in path for customers who don't have profiles yet. We should think of that as the common case. The ideal version might be a menu that goes like
[Authenticate to a new workspace...]
workspace 1
workspace 2
...
Alternatively, we could just always rely on OAuth authentication for this V1. And then store the result to a new profile that we give a name like databricks_mcp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw on that note, did you figure out why profiles with tokens weren't supported? A workaround for that problem could be to go for that alternative where we always rely on OAuth?
| "--env", "DATABRICKS_CONFIG_PROFILE=" + profile.Name, | ||
| "--env", "DATABRICKS_HOST=" + profile.Host, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why hardcode both host and profile?
| "databricks-mcp", | ||
| "--", | ||
| databricksPath, "experimental", "apps-mcp") | ||
| "--env", "DATABRICKS_CONFIG_PROFILE=" + profile.Name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, if we hardcode the host, then there should be something in the server to detect a misconfiguration/authentication failure to help users recover from that state.
6d46f17 to
da6863f
Compare
Changes
apps-mcp installScreen.Recording.2025-12-01.at.10.27.27.mov
Why
Tests