---
title: Add tools and skills
description: Add governed MCP servers and Unity Gateway skills to your coding agent with the Unity Gateway CLI, or configure them manually.
canonical_url: https://docs.databricks.com/aws/en/ai-gateway/coding-agent-mcp-skills
---

# Add tools and skills

Use the Unity Gateway CLI (`ug`) to add MCP servers and shared skills to your coding agent. MCP tools provide access to data and services; skills provide instructions for your team's tasks and workflows.

For `ug` command options, see the [ug CLI reference](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-ug-cli.md). For manual setup, see your agent's guide under [Supported coding and work agents](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-supported-agents.md).

## Prerequisites

* The Unity Gateway CLI (`ug`), installed and configured. See [Install and configure `ug`](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-quickstart.md).
* An installed, configured [MCP-capable agent](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-supported-agents.md), including for skill downloads. MCP connections apply to all your configured agents that support MCP.
* Access to the MCP servers or skills you want to use, including any underlying data and services.
* For skills, your admin must enable the Beta feature. See [Govern skills](https://docs.databricks.com/aws/en/ai-gateway/govern-skills.md).

After you change your setup, restart your agent with its usual `ug` command.

## Add MCP tools

`system.ai.dbsql`, `system.ai.sandbox`, and `system.ai.web_search` are in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md). To use them, an account admin must enable the **Enhanced Unity Gateway** preview from the account console **Previews** page. Unity Gateway itself is generally available. See [Manage account previews](https://docs.databricks.com/aws/en/admin/workspace-settings/manage-previews.md#account).

### Choose MCP servers

```bash
ug mcp add
```

Sign in if prompted, then choose servers in the picker. Type to filter, press **Space** to select, and **Enter** to confirm.

Existing connections are kept. In your agent, ask it to use a tool by describing the task.

### Choose MCP servers by name

To add MCP servers by name, use their full Unity Catalog names (`<catalog>.<schema>.<server-name>`):

```bash
ug mcp add --names system.ai.github,system.ai.slack
```

The names in one command must be in the same schema. Run a separate `ug mcp add` command for each schema.

To add every MCP server in a schema:

```bash
ug mcp add --location "<catalog>.<schema>"
```

For more examples, such as adding servers to specific agents, see [Add MCP servers directly](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-ug-cli.md#add-mcp-servers-directly). To add MCP servers for every developer in a workspace, see [Add MCP servers for all developers](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-ug-cli.md#add-mcp-servers-for-all-developers).

### <a id="other-databricks-mcp-servers" />Add other Databricks MCP servers

For resources outside the MCP server picker, use a selector with `--names`:

| Resource                              | Selector                           |
| ------------------------------------- | ---------------------------------- |
| AI Search indexes in a schema         | `vector-search:<catalog>.<schema>` |
| Unity Catalog functions in a schema   | `uc-functions:<catalog>.<schema>`  |
| Genie Agent                           | `genie-space:<space-id>`           |
| MCP server hosted in a Databricks app | `app:<app-name>`                   |

The AI Search, Unity Catalog functions, and Genie Agent selectors connect to [workspace MCP endpoints governed by resource permissions](https://docs.databricks.com/aws/en/agents/mcp-tools/built-in-mcp-services.md#resource-governed-endpoints). Calls bypass Unity Gateway tracing, MCP grants, policies, and guardrails. A workspace administrator must [enable Managed MCP Servers](https://docs.databricks.com/aws/en/admin/workspace-settings/manage-previews.md#workspace).

Use the AI Search and functions selectors when your coding agent needs MCP tools for those resources. These endpoints and the Genie Agent MCP are in Public Preview. For SQL queries, use [`system.ai.dbsql`](https://docs.databricks.com/aws/en/agents/mcp-tools/databricks-sql.md) through Unity Gateway.

For example, connect an existing Genie Agent:

```bash
ug mcp add --names "genie-space:<space-id>"
```

Replace `<space-id>` with the Genie space ID.

### Check and remove connections

List the MCP servers configured by `ug`:

```bash
ug mcp list
```

To remove connections you added:

```bash
ug mcp remove
```

Select the servers to remove and press **Enter**. Each selected connection is removed from all agents where you added it. The MCP server itself remains available in the workspace.

## <a id="other-mcp-clients" />Other MCP clients

For `system.ai.dbsql`, first enable the [Unity Gateway beta](https://docs.databricks.com/aws/en/agents/mcp-tools/databricks-sql.md).

For Claude Code, Codex, GitHub Copilot, or Cursor, use your [agent's guide](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-supported-agents.md). For Claude on the web or desktop, follow [Claude connectors](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-claude-desktop.md#claude-connectors).

For manual OAuth setup, have an account admin [register a custom OAuth application](https://docs.databricks.com/aws/en/integrations/enable-disable-oauth.md#enable-custom-app-ui) with the client's exact redirect URLs and the `ai-gateway` scope. Desktop and CLI clients use a public client without a client secret. Server-side clients that can securely store a secret can use a confidential client. Databricks MCP endpoints don't support dynamic client registration, so the client must accept a preconfigured client ID. Use **Streamable HTTP** and request `offline_access` for refresh tokens.

For the clients below, choose an MCP under **Unity Gateway > MCPs** and use this URL:

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

Replace the hostname, [workspace ID](https://docs.databricks.com/aws/en/workspace/workspace-details.md#workspace-url), and MCP name. For example, use `system.ai.genie_one_mcp` for Genie One or `system.ai.dbsql` for Databricks SQL. You need [permission to call the MCP](https://docs.databricks.com/aws/en/ai-gateway/govern-mcp-service.md#control-callers), and for per-user MCPs, a [provider sign-in](https://docs.databricks.com/aws/en/ai-gateway/mcp-service-reference.md#provider-sign-in).

### ChatGPT

1. Enable [Developer Mode](https://developers.openai.com/apps-sdk/deploy/connect-chatgpt/) in ChatGPT. Availability depends on your account and workspace policy.

2. Follow the linked ChatGPT instructions to add an MCP connection with your MCP URL and choose **OAuth**.

3. For the OAuth client ID, enter the [default ChatGPT client ID](https://docs.databricks.com/aws/en/partner-connect/ai-agents.md#default-oauth-apps), `https://chatgpt.com/oauth/client.json`. Save the connection and complete sign-in.

   To use your own OAuth app instead, copy the exact OAuth redirect URL shown by ChatGPT. Have an account admin [create a Databricks OAuth client](https://docs.databricks.com/aws/en/integrations/enable-disable-oauth.md#enable-custom-app-ui) with that URL and the `ai-gateway` scope, then enter its client ID and secret, if applicable. See [ChatGPT OAuth redirect URLs](https://developers.openai.com/apps-sdk/build/auth/).

4. Select the MCP connection in a conversation and ask it to use a read-only tool.

If your workspace restricts inbound access, add ChatGPT as a [partner platform](https://docs.databricks.com/aws/en/security/network/front-end/partner-platforms.md) in a context-based ingress policy. Databricks keeps ChatGPT's IP addresses current for you. You can also add ChatGPT's IP addresses to your IP access lists, but OpenAI can change these addresses, so you must build your own automation to keep your lists current. See [OpenAI outbound IP addresses](https://developers.openai.com/api/docs/guides/ip-addresses#outbound-ip-addresses).

ChatGPT connects to your workspace over the public internet. If your workspace uses [inbound Private Link](https://docs.databricks.com/aws/en/security/network/front-end/front-end-private-connect.md) with public access disabled, ChatGPT can't connect.

### Windsurf

Use the [manual OAuth configuration for Cursor](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-cursor.md#mcp-oauth), saving the JSON in `~/.codeium/windsurf/mcp_config.json`. This uses `mcp-remote` with your registered OAuth client ID.

Restart Windsurf, complete browser sign-in, and ask the agent to call a read-only tool. See [Windsurf MCP configuration](https://docs.windsurf.com/windsurf/cascade/mcp).

### Replit

For local testing with a [personal access token](https://docs.databricks.com/aws/en/dev-tools/auth/pat.md):

1. In your Replit workspace, click **Add MCP Server** and enter the MCP URL.
2. Add the custom header `Authorization` with value `Bearer <databricks-pat>`.
3. Save and ask the agent to call a read-only tool.

Keep the token out of source control. For current authentication options, see [Replit MCP documentation](https://docs.replit.com/replitai/mcp/overview).

Verify that the client makes a tool call and returns its result. For `system.ai.dbsql`, try `SELECT 1 AS result`. If the connection fails, see [MCP authentication](https://docs.databricks.com/aws/en/agents/mcp-tools/authentication-networking.md).

## Add skills

You can use skills in two ways:

* **Download skills:** Your agent discovers and uses local skill files through its native skill workflow.
* **Use skills through MCP:** Your agent retrieves instructions from the published skill registry when it uses a skill, without local files to manage.

### Download skills

```bash
ug skills add
```

Select the skills to download in the picker.

`ug` downloads each complete skill folder, including `SKILL.md` and supporting files, into both `~/.claude/skills/` and `~/.agents/skills/`. Ask your agent to use the skill by name. See your [agent's guide](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-supported-agents.md) for its skill commands.

To download specific skills, use their full Unity Catalog names:

```bash
ug skills add --names "<catalog>.<schema>.<skill-name>"
```

To download all skills in a schema:

```bash
ug skills add --location "<catalog>.<schema>"
```

Both options accept comma-separated names. Use `--names` or `--location` in a command, not both. Re-run the same command to fetch updates; `ug` prompts before overwriting existing skill folders.

Downloading also enables discovery and loading through the skill registry, without changing schemas already connected through MCP.

### Download skills into a project

From your project directory, run:

```bash
ug skills add --path "$PWD"
```

Choose your skills. `ug` writes them under the project's `.claude/skills/` and `.agents/skills/` directories. You can also combine `--path` with `--names` or `--location`.

`--path` must point to an existing, absolute project directory. Use project downloads with `ug gemini`, which uses a separate home directory for agent settings.

### <a id="connect-to-published-skills-through-mcp" />Connect to published skills through MCP

To choose schemas whose skills your agent can use through MCP:

```bash
ug skills add --via mcp
```

Select the schemas in the picker. To specify a schema directly:

```bash
ug skills add --location "<catalog>.<schema>" --via mcp
```

`ug` adds these schemas to the skill registry connection, keeping any already connected. You cannot combine `--via mcp` with `--path` or `--names`.

For custom MCP clients and details about the supported interfaces, see [Access skills over MCP](https://docs.databricks.com/aws/en/agents/uc-skills/index.md#access-skills-over-mcp).

In your agent, ask it to use a published skill:

```text
Use <catalog>.<schema>.<skill-name> to review this query.
```

You can also ask the agent to list skills in a schema. Skills loaded through MCP might not appear in the agent's native skill menu.

### List skills

```bash
ug skills list
```

### Remove skills

To select downloaded skills for removal:

```bash
ug skills remove
```

To remove a particular skill from your current project:

```bash
ug skills remove --names "<catalog>.<schema>.<skill-name>" --path "$PWD"
```

Use `--location "<catalog>.<schema>"` instead of `--names` to remove all downloads from a schema. Without `--path`, removal includes copies downloaded by `ug` across your user and project directories. Published skills remain in Unity Catalog.

To remove a schema from the live MCP connection:

```bash
ug skills remove --location "<catalog>.<schema>" --via mcp
```

Omit `--location` to choose schemas in a picker. Removing a schema leaves downloaded files and registry discovery available.

## Next steps

* [ug CLI reference](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-ug-cli.md)
* [Supported coding and work agents](https://docs.databricks.com/aws/en/ai-gateway/coding-agent-supported-agents.md)
