by Ahmed Bilal and Sunish Sheth
As part of Week of Agents, customers can now manage models, MCP and tools through Databricks Unity Gateway, fully integrated with Unity Catalog. To deliver real value, agents need to securely reach external tools like GitHub, Glean, and Atlassian. Unity Gateway makes this easy and secure, so teams can focus on building agents, not auth infrastructure.
In this post, we'll walk through how to connect an external MCP server and deploy an agent end to end, so that you can build context-aware agents that reason and act on your data.
AI agents are only as powerful as the tools they can access. The Model Context Protocol (MCP) provides a universal way to discover and interact with those tools, and on Databricks, enterprises already use it to connect agents with native and external MCPs.
Again and again, customers tell us the same thing: auth is the bottleneck. Every provider has its own OAuth app registration, its own client secrets, its own token refresh logic. Secrets need rotating, permissions need auditing, and there's no centralized way to track which agents are accessing what. What should take minutes takes weeks.
Unity Gateway solves this by giving teams a single, governed way to connect agents to external systems:
Let's walk through connecting GitHub as an external MCP server and taking it all the way to a deployed agent.
Step 1. Create the connection.

Step 2. Test it. You can validate the connection in two ways. In AI Playground, select a model with tools enabled, browse your external MCP connections, pick GitHub, and ask "What are the open pull requests in repo X?"

Or test directly in code using DatabricksMCPClient:
Step 3. Deploy your agent. Once validated, deploy with Agent Bricks.

Step 4. Monitor and trace. Once your agent is live, MLflow Tracing gives you end-to-end observability: every request, every tool call, every MCP server interaction, with full inputs and outputs. Combine with Unity Catalog audit logs to see who accessed what, when, and through which agent.

Don't let auth be the reason your agents can't reach the tools they need. Start building agents that reason and act on both internal and external data. Get started today.
In Unity Gateway, you register an external MCP server in Unity Catalog and connect your agent to it, so the server is governed like any other catalog object. In a GitHub example, you go to AI Gateway, choose Register MCP Server, select External MCP, pick an auth mode, and choose GitHub from the provider dropdown. Databricks then handles the OAuth setup, so teams can focus on building agents instead of auth infrastructure.
Use Unity Gateway's managed OAuth connections with per-user authentication, so each agent call runs under the identity of the person using it. Agents act on behalf of the end user, so an agent only sees what that user is allowed to see. Supported providers are Glean, GitHub, Atlassian (Jira and Confluence), Google Drive, and SharePoint. Admins can also scope OAuth permissions per connection, such as limiting a GitHub connection to read-only repo access.
Control MCP server access in Unity Catalog, where every external MCP server is registered and governed like any other catalog object. Admins can apply fine-grained permissions, and all activity is captured in a centralized audit table. Admins can also scope OAuth permissions for each connection, for example limiting a GitHub connection to read-only repo access, so agents get only the access they need through Unity Gateway.
Register each external MCP server in Unity Catalog and let Unity Gateway handle authentication. Managed OAuth removes the need to register OAuth apps or manage secrets for each provider. MLflow Tracing then records every request, every tool call, and every MCP server interaction, with full inputs and outputs. Combined with Unity Catalog audit logs, you can see who accessed what, when, and through which agent.
In Unity Gateway, create an external MCP connection, select GitHub from the provider dropdown, and choose an auth mode. Databricks handles OAuth app registration, token exchange, and refresh behind the scenes, so you do not manage a client secret per provider. Per-User OAuth is the recommended mode because each user authenticates with their own identity. You can then test the connection in AI Playground by asking about open pull requests in a repo.
Per-user OAuth is an auth mode for external MCP connections in Unity Gateway in which each user authenticates with their own identity. The alternative is Shared Principal, which uses a single identity for all users. Per-user OAuth and says agents using it only see what the individual user is allowed to see, without overprivileged service accounts.
Subscribe to our blog and get the latest posts delivered to your inbox.