AI Gateway: How to Connect Agents to External MCPs Securely
TL;DR · AI 摘要
文章介绍 Databricks AI Gateway 如何安全连接 AI Agent 与外部 MCP,但缺乏技术细节和实现机制。
核心要点
- AI Gateway 提供统一入口管理 Agent 对外部 MCP 的访问
- 强调通过认证、授权和审计保障连接安全性
- 集成于 Databricks Lakehouse 平台,支持企业级治理
AI Gateway: How to Connect Agents to External MCPs Securely | Databricks Blog
[](http://www.databricks.com/)
[](http://www.databricks.com/)
- Why Databricks
- * Discover
- Customers
- Partners
- Product
- * Databricks Platform
- Integrations and Data
- Pricing
- Open Source
- Solutions
- * Databricks for Industries
- Cross Industry Solutions
- Migration & Deployment
- Solution Accelerators
- Resources
- * Learning
- Events
- Blog and Podcasts
- Get Help
- Dive Deep
- About
- * Company
- Careers
- Press
- Security and Trust
- DATA + AI SUMMIT 
- Ready to get started?
- Get a Demo
DATA + AI SUMMIT
- * *
AI Gateway: How to Connect Agents to External MCPs Securely

Published: April 15, 2026
Product3 min read
by Ahmed Bilal and Sunish Sheth
Share this post
- [](https://www.linkedin.com/shareArticle?mini=true&url=https://www.databricks.com/blog/ai-gateway-how-connect-agents-external-mcps-securely&summary=&source=)
- [](https://twitter.com/intent/tweet?text=https://www.databricks.com/blog/ai-gateway-how-connect-agents-external-mcps-securely)
- [](https://www.facebook.com/sharer/sharer.php?u=https://www.databricks.com/blog/ai-gateway-how-connect-agents-external-mcps-securely)
Keep up with us
Subscribe
#### Summary
- Secure external access: Connect agents to tools like GitHub, Glean, and Atlassian with managed OAuth and per-user permissions.
- Unified governance: Register and control MCP servers through Unity Catalog with full auditability and traceability.
- Faster to production: Skip auth complexity and deploy context-aware, tool-using agents in minutes.
As part ofWeek of Agents, customers can now manage models, MCP and tools throughDatabricks AI Gateway, fully integrated with Unity Catalog. To deliver real value, agents need to securely reach external tools like GitHub, Glean, and Atlassian. AI 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.
The problem: Authenticating external MCP servers
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.
The solution: AI Gateway for external connectivity
AI Gateway solves this by giving teams a single, governed way to connect agents to external systems:
- Govern external MCP servers through Unity Catalog: Every external MCP server is registered in Unity Catalog, making it discoverable and governed like any other catalog object. Admins can apply fine-grained permissions, with all activity captured in a centralized audit table. Teams can also install MCP servers from partners throughDatabricks Marketplace.
- Access on behalf of the user: Agents act on behalf of the end user, so User A's agent only sees what User A is allowed to see. This means agents can safely access personal email, private repos, and restricted documents without overprivileged service accounts. Admins can further restrict what agents are allowed to do by scoping OAuth permissions per connection, like limiting a GitHub connection to read-only repo access.
- Simplify authentication to external systems: Managed OAuth flows simplify auth, with no need to register OAuth apps or manage secrets per provider. Pick from a dropdown and Databricks handles the full auth lifecycle server-side. Supported providers today include Glean, GitHub, Atlassian (Jira and Confluence), Google Drive, and SharePoint, with more on the way.
- Works across clouds and providers: The same governance and auth experience whether you run Databricks on AWS, Azure, or GCP, with pre-configured support for third-party providers like GitHub, Glean, and Atlassian.
GUIDE
Your compact guide to modern analytics

How it works
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.
- Navigate toAI Gateway → Register MCP Server -> External MCP
- Select your auth mode:Per-User OAuth (recommended — each user authenticates with their own identity) orShared Principal (single identity for all users)
- PickGitHub from the provider dropdown
- Create. Databricks handles OAuth app registration, token exchange, and refresh behind the scenes

Step 2. Test it. You can validate the connection in two ways. InAI 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 incode usingDatabricksMCPClient:
Step 3. Deploy your agent. Once validated, deploy withAgent 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.

Get started
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.
Keep up with us
Subscribe
Recommended for you
Share this post
- [](https://www.linkedin.com/shareArticle?mini=true&url=https://www.databricks.com/blog/ai-gateway-how-connect-agents-external-mcps-securely&summary=&source=)
- [](https://twitter.com/intent/tweet?text=https://www.databricks.com/blog/ai-gateway-how-connect-agents-external-mcps-securely)
- [](https://www.facebook.com/sharer/sharer.php?u=https://www.databricks.com/blog/ai-gateway-how-connect-agents-external-mcps-securely)
Never miss a Databricks post
Subscribe to our blog and get the latest posts delivered to your inbox
Sign up

Why Databricks
Discover
Customers
Partners
Why Databricks
Discover
Customers
Partners
Product
Databricks Platform
- Platform Overview
- Sharing
- Governance
- Artificial Intelligence
- Business Intelligence
- Database
- Data Management
- Data Warehousing
- Data Engineering
- Data Science
- Application Development
- Security
Pricing
Integrations and Data
Product
Databricks Platform
- Platform Overview
- Sharing
- Governance
- Artificial Intelligence
- Business Intelligence
- Database
- Data Management
- Data Warehousing
- Data Engineering
- Data Science
- Application Development
- Security
Pricing
Open Source
Integrations and Data
Solutions
Databricks For Industries
- Communications
- Financial Services
- Healthcare and Life Sciences
- Manufacturing
- Media and Entertainment
- Public Sector
- Retail
- View All
Cross Industry Solutions
Solutions
Databricks For Industries
- Communications
- Financial Services
- Healthcare and Life Sciences
- Manufacturing
- Media and Entertainment
- Public Sector
- Retail
- View All
Cross Industry Solutions
Data Migration
Professional Services
Solution Accelerators
Resources
Learning
Events
Blog and Podcasts
Resources
Documentation
Customer Support
Community
Learning
Events
Blog and Podcasts
About
Company
Careers
Press
About
Company
Careers
Press
Security and Trust

Databricks Inc.
160 Spear Street, 15th Floor
San Francisco, CA 94105
1-866-330-0121
- [](https://www.linkedin.com/company/databricks)
- [](https://www.facebook.com/pages/Databricks/560203607379694)
- [](https://twitter.com/databricks)
- [](https://www.databricks.com/feed)
- [](https://www.glassdoor.com/Overview/Working-at-Databricks-EI_IE954734.11,21.htm)
- [](https://www.youtube.com/@Databricks)

- [](https://www.linkedin.com/company/databricks)
- [](https://www.facebook.com/pages/Databricks/560203607379694)
- [](https://twitter.com/databricks)
- [](https://www.databricks.com/feed)
- [](https://www.glassdoor.com/Overview/Working-at-Databricks-EI_IE954734.11,21.htm)
- [](https://www.youtube.com/@Databricks)
© Databricks 2026. All rights reserved. Apache, Apache Spark, Spark, the Spark Logo, Apache Iceberg, Iceberg, and the Apache Iceberg logo are trademarks of the Apache Software Foundation.