-
Notifications
You must be signed in to change notification settings - Fork 41
Add UC function + VS index constructors for MCP adapters #234
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
Conversation
aravind-segu
left a comment
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.
Looks good overall, can we also add one for Agents SDK. Its here: https://github.com/databricks/databricks-ai-bridge/blob/main/integrations/openai/src/databricks_openai/agents/mcp_server.py
bbqiu
left a comment
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.
this looks great! happy to approve after we add an agents example as well
| ) | ||
|
|
||
| @classmethod | ||
| def from_uc_function( |
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.
can we add some docstrings to these functions?
including some sample usage with and without the multiserver mcp client would be helpful!
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.
Added w/ + w/o multiserver for the six constructors added!
| result = await Runner.run(agent, user_messages) | ||
| return result | ||
| Using with DatabricksMultiServerMCPClient to manage multiple servers: |
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 don't think we have a multi mcp client for the openai agents sdk, only langchain sorry
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.
Hm ok. I saw some multi mcp client usage here: notebook by aravind. Is this deprecated/am I missing smth?
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 don't think it made it to master unless i'm missing something: https://github.com/search?q=repo:databricks/databricks-ai-bridge%20DatabricksMultiServerMCPClient&type=code
@aravind-segu i believe we ended up not shipping this for openai agents right? but it is something that we should do in the future
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.
Ah gotcha ok -- I can remove that example
bbqiu
left a comment
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.
lgtm! feel free to merge after adding type hints
| index_name: str = None, | ||
| workspace_client: WorkspaceClient = None, | ||
| **kwargs, | ||
| ): |
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.
nit: can we add type hints
|
jenkins merge |
Introduces two new class methods that make it easier to create MCP server connections for Unity Catalog functions and vector search indexes without manually constructing URLs.
Tested manually via Databricks notebooks:
for langchain
for openai
for agents sdk