---
title: External MCP servers
description: Register an external MCP server from the MCPs page, test a tool, and connect it to your agent.
canonical_url: https://docs.databricks.com/gcp/en/ai-gateway/register-mcp-service
---

# External MCP servers

Register a self-hosted or third-party MCP server so your team can use it through Unity Gateway. Create its connection as part of registration.

For a server that Databricks already provides, choose a [Databricks-provided MCP](https://docs.databricks.com/gcp/en/agents/mcp-tools/built-in-mcp-services.md). For automated setup, see the [API and SDK reference](https://docs.databricks.com/gcp/en/ai-gateway/mcp-service-reference.md).

## <a id="requirements" />Before you begin

You need:

* A Unity Catalog-enabled workspace and the **Workspace access** entitlement. Users with **Consumer access** can't register an MCP.
* An MCP server that supports [Streamable HTTP](https://modelcontextprotocol.io/specification/latest/basic/transports/streamable-http), its URL, and its authentication details.
* `USE CATALOG` and `USE SCHEMA` on the parent catalog and schema, and `CREATE SERVICE` on the schema.
* `CREATE CONNECTION` on the schema to create a connection, or `USE CONNECTION` on an existing connection.
* Network access from the workspace to the server. See [MCP networking](https://docs.databricks.com/gcp/en/agents/mcp-tools/networking.md).

The workspace must be in a [region that supports Model Serving](https://docs.databricks.com/gcp/en/resources/feature-region-support.md#gcp-model-serving).

<a id="install" />

<a id="1-register-the-server" />

## <a id="create-an-mcp-service" />Step 1: Register the server

1. In your workspace, open **Unity Gateway**, select **MCPs**, and click **+ MCP**.
2. Choose **Connect an existing MCP server**.
3. Choose a catalog and schema, and enter an MCP name. The name can't be changed after creation.
4. Select an existing HTTP connection, or click **Create new connection**:
   * Enter the MCP server URL.
   * Choose the authentication method and enter the provider's credentials. For supported providers, use [managed OAuth](https://docs.databricks.com/gcp/en/agents/mcp-tools/managed-oauth.md).
   * If you use OAuth with your own OAuth app, add `https://<workspace-hostname>/login/oauth/http.html` to the app's allowed redirect URLs. Some providers reject sign-in without it. For each authentication method's fields, see [Create a connection to the external service](https://docs.databricks.com/gcp/en/query-federation/http.md#connection).
   * Click **Create & load tools** to save the connection and discover its tools.
5. Under **Tools**, click **Login** if prompted and sign in to the provider. Then choose the tools to expose. See [Tool selection](https://docs.databricks.com/gcp/en/ai-gateway/govern-mcp-service.md#select-tools) for filtering options.
6. Click **Create MCP Service**.

Use a schema-level connection for new MCPs. If you already have a metastore-level connection, click **Use a metastore-level connection** to select it. For a server from Marketplace, follow [Install an MCP server](https://docs.databricks.com/gcp/en/marketplace/get-started-consumer.md#install-mcp).

<a id="authenticate" />

<a id="invoke-the-mcp-service" />

<a id="2-sign-in-and-test-a-tool" />

## <a id="test" />Step 2: Test a tool

Test with AI Playground:

1. Open AI Playground and choose a model with **Tools enabled**. See [Prototype a tool-calling agent](https://docs.databricks.com/gcp/en/large-language-models/ai-playground.md#prototype-a-tool-calling-agent).
2. Open **Tools**, click **+ Add tool**, and select **MCP Servers**.
3. Select **External MCP servers**, then your MCP.
4. Ask the model to use a read-only tool. Confirm that it makes a tool call and returns the expected result.

For command-line tests, use the examples under **Get started** on the MCP's detail page. If a call fails, see [MCP authentication](https://docs.databricks.com/gcp/en/agents/mcp-tools/authentication-networking.md).

<a id="3-connect-your-agent" />

## <a id="connect-your-agent" />Step 3: Connect your agent

Use the MCP's full name, `<catalog>.<schema>.<service>`, in your agent's setup:

* [Claude Code, Codex, Cursor, and other coding agents](https://docs.databricks.com/gcp/en/ai-gateway/coding-agent-supported-agents.md#connect-your-agent)
* [Python agents](https://docs.databricks.com/gcp/en/agents/custom-agents/use-mcp-tools.md)
* [Genie Agents](https://docs.databricks.com/gcp/en/genie-agents/external-tools.md#add-connectors)
* [`ai_enrich` SQL function](https://docs.databricks.com/gcp/en/sql/language-manual/functions/ai_enrich.md#mcp-config)

Clients that require a server URL use:

```text
https://<workspace-hostname>/ai-gateway/mcp-services/<catalog>.<schema>.<service>
```

## <a id="limitations" />Limitations

* You can register external MCP servers. Registering Genie, Databricks Apps, or Unity Catalog entity sources as your own MCP isn't supported. Use a [Databricks-provided MCP](https://docs.databricks.com/gcp/en/agents/mcp-tools/built-in-mcp-services.md) or [connect directly to your server on Databricks Apps](https://docs.databricks.com/gcp/en/agents/mcp-tools/custom-mcp.md).
* SQL commands such as `CREATE MCP SERVICE` aren't supported.
* Unity Catalog Global Search doesn't surface MCPs. Find them on the **MCPs** page.

<a id="share-mcp-connection" />

<a id="manage-an-mcp-service" />

<a id="update-an-mcp-service" />

<a id="delete-an-mcp-service" />

## <a id="after-registration" />Next steps

* [Share the MCP with your team](https://docs.databricks.com/gcp/en/ai-gateway/govern-mcp-service.md#control-callers).
* [Govern tools, policies, and usage](https://docs.databricks.com/gcp/en/ai-gateway/govern-mcp-service.md).
* [Update or delete the MCP](https://docs.databricks.com/gcp/en/ai-gateway/govern-mcp-service.md#manage-service).
* [Automate with the API, CLI, SDKs, Terraform, or bundles](https://docs.databricks.com/gcp/en/ai-gateway/mcp-service-reference.md).
