Where should I host MCP servers for my AI agents?
Summary
- Host MCP servers where agents reach them over an authenticated HTTPS endpoint and where one governance layer controls who can call them. For shared agents, that means a managed platform, not developer laptops.
- Use a provider-managed MCP server when one exists, run your own code on a managed app platform, and leave third-party servers with their vendors while routing access through a gateway.
- Local stdio servers suit single-user prototypes. Remote servers over Streamable HTTP suit shared, production agents.
- Put servers close to the data their tools touch, so existing permissions, audit and networking already apply.
- On Databricks, Databricks-provided MCPs need no hosting, custom servers run on Databricks Apps with an HTTPS URL, and external servers can be registered in Unity Gateway, all under Unity Catalog permissions.
Where should I host MCP servers for my AI agents?
Host MCP servers on a managed platform inside your governance boundary, one that gives each server an authenticated HTTPS endpoint and registers it where access is controlled centrally. For data and AI agents, the strongest choice is the platform that already holds the data the tools touch, because permissions, audit and networking are in place there. Laptops and one-off VMs are fine for experiments, but tool access goes ungoverned once more than one person or agent depends on them.
Local or remote: the first decision
MCP defines two transports (MCP architecture). Stdio connects a client to a server process on the same machine, and such local servers typically serve a single client. Streamable HTTP lets a remote server serve many clients and supports standard HTTP authentication, with OAuth recommended for obtaining tokens. Shared and production agents need the remote model.
Hosting options
| Option | Good for | Watch for |
|---|---|---|
| Local process (stdio) | Prototypes and personal developer tools | No central access control or audit |
| Provider-managed MCP | Services whose owner already runs a server | The credential model, and which tools are exposed |
| Managed app platform | Your own tools and internal APIs | Authentication, and registering the server centrally |
| Self-managed infrastructure | Unusual network or runtime needs | You own patching, TLS, identity and logs |
| Behind a gateway (any of the above) | Consistent permissions, limits and audit | Every server must be registered to be governed |
Whatever runs the server, ask four questions. Which identity does the tool act as? Who can call it? What gets logged? Can you restrict the tools it exposes?
How Databricks approaches MCP hosting
Databricks offers three hosting paths, and all of them are governed through Unity Gateway and Unity Catalog permissions (MCPs overview).
Don't host at all. For Databricks data and tools, "You don't need to host or register a server." Databricks-provided MCPs, such as the generally available Genie One MCP, are Unity Catalog securables invoked through Unity Gateway (Databricks-provided MCPs).
Host custom servers on Databricks Apps. "Databricks Apps provides the compute to run the server and an HTTPS URL for agents to connect to it" (host an MCP server on Databricks Apps). Apps run on the serverless platform and integrate with Unity Catalog and OAuth (Databricks Apps).
- Start from the MCP Server (Starter) template to add Python tools, or the MCP Server (OpenAPI) template to expose an existing REST API through an HTTP connection.
- To bring an existing server, configure Streamable HTTP, listen on
0.0.0.0, and use the port inDATABRICKS_APP_PORT. - Give the app an
mcp-prefix so AI Playground recognizes it. With the templates, the MCP URL is the app URL with/mcpappended. - Callers need
CAN USEon the app and an OAuth token. Personal access tokens aren't supported.
Register servers that run elsewhere. A self-hosted or third-party server that supports Streamable HTTP can be registered in Unity Gateway with an HTTP connection that holds its credentials. Agents then call it through the gateway, and end users don't need USE CONNECTION on that connection.
Govern in one place. Grant EXECUTE on each MCP, filter which tools appear in tools/list, set rate limits on tools/call, and review invocations in system.access.audit (govern an MCP).
Use cases
- An internal pricing API exposed as MCP tools with the OpenAPI template and shared by every team's agents.
- A data agent that answers business questions through the Genie One MCP, with no server to run.
- A vendor-hosted MCP server registered in Unity Gateway, so its tool calls get the same permissions and audit as internal tools.
FAQs
Can I run an MCP server on my laptop for production agents?
Not safely. A local stdio server serves one client and sits outside central access control and audit. Keep it for prototypes.
How do agents authenticate to an MCP server on Databricks Apps?
They present an OAuth token, and the caller needs CAN USE on the app. Personal access tokens aren't supported for MCP servers on Databricks Apps.
Should I bring a third-party MCP server in-house?
Usually not. Register it behind your gateway so access, limits and audit apply, and let its vendor keep running it.
How do agents find the servers I host?
On Databricks, registered and Databricks-provided MCPs appear under Unity Gateway > MCPs, and databricks ai-gateway list-mcp-services lists the MCPs in a schema.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.