# Connect your agent to the gateway

Your company's Axiad Agentic Gateway gives your AI agent one address for the
applications your company has connected. Every call the agent makes is checked against
your company's rules and tied to you. This page shows how to add the gateway to
the AI client you use, and how sign-in works.

## Before you begin

- **Your gateway address.** Where you find it depends on your workspace:
  - **Agentic Gateway workspace**, including a trial: copy the address from
    **Connect your agent** in your workspace. It usually looks like this:

    ```text
    https://<company>.mesh.axiad.io/mcp
    ```

  - **Invited as a Member:** you have no dashboard, so there is no **Connect
    your agent** screen for you. Follow the steps in your invitation email to
    connect your AI agent.
  - **Full Axiad Mesh workspace:** ask your Mesh admin for the address.
    Admins find it under **Settings** > **Runtime AI Gateway** >
    **Integrations**, as **Default endpoint**. See
    [Connect an application](./ai-agent-gateway.md#connect-an-integration).
    The address may use a different host from the example above.

  The examples on this page use `https://<company>.mesh.axiad.io/mcp`. Replace
  it with your own address. If your admin gave you an address with a name after
  `/mcp`, such as `/mcp/finance`, use that one: it is a bundle that offers only
  some of your company's applications. See
  [Group applications into bundles](./ai-agent-gateway.md#offer-several-integrations-on-one-endpoint).
- **An account in your company's workspace.** You sign in with Axiad when the
  client connects.
- **A client that supports remote MCP servers with OAuth sign-in.** Every client
  on this page does. For any other client, see
  [Any other MCP client](#any-other-mcp-client).

## How sign-in works

The first time your client connects, it opens an Axiad sign-in page in your
browser.

1. Sign in to your workspace. In a trial workspace, you enter the 6-digit code
   we email to your work address.
2. Check the request. The page names the client and shows where you will be
   sent back to. Approve it only if you started this connection yourself.
3. Select **Approve**. Your browser returns you to the client.

What happens next depends on the kind of client:

| Client | After you approve |
| --- | --- |
| **Browser clients** that finish sign-in on a web page, such as claude.ai, Claude Desktop, ChatGPT, and Antigravity | Active right away. Your company's rules decide what it may do. |
| **Command-line and local clients** that finish sign-in on your own computer, such as Claude Code, Codex, VS Code, goose, OpenCode, and Factory Droid | **Pending** until an admin approves it. Calls are refused until then. |

Each person's client is a separate agent. If your agent shows as pending, ask an
admin in your company to approve it. Admins approve agents in the workspace,
and can revoke an agent at any time. See
[Approve an agent](./manage-agents.md#approve-an-agent).

## Connect a client

In each example, the gateway is named `axiad`. You can use any name.

### Claude (claude.ai and Claude Desktop)

Claude Desktop uses the same connectors as claude.ai, so you add the gateway
once in your Claude account.

On a Free, Pro, or Max plan (a Free plan allows one custom connector):

1. In Claude, go to **Customize** > **Connectors**.
2. Select **+ Add**, then **Add custom connector**.
3. Enter a name, for example `Axiad gateway`.
4. Enter your gateway address as the remote MCP server URL, then select
   **Continue**.
5. Keep the detected sign-in settings, select **Continue**, then **Add**.
6. Select **Connect** and complete the Axiad sign-in.

On a Team or Enterprise plan, an owner adds the connector first, in
**Organization settings** > **Connectors** > **Add** > **Custom** > **Web**,
with the same name and address. Each person then goes to **Customize** >
**Connectors**, finds the connector, and selects **Connect**.

To use the gateway in a chat, select **+** in the chat box, choose
**Connectors**, and turn the gateway on.

### Claude Code

1. Add the gateway in your terminal:

   ```bash
   claude mcp add --transport http axiad https://<company>.mesh.axiad.io/mcp
   ```

   To use it in every project, add `--scope user` before the name.

2. Open Claude Code, run `/mcp`, select **axiad**, and choose
   **Authenticate**. Complete the Axiad sign-in in your browser.

Claude Code stays pending until an admin approves it.

### ChatGPT

Who can add a custom MCP server in ChatGPT depends on your plan. On Business
plans, only workspace admins and owners can add one. On Enterprise and Edu
plans, admins and owners can add one, and admins can also give selected members
permission to add one. See OpenAI's
[Connecting custom MCP servers in ChatGPT](https://help.openai.com/en/articles/12584461-connecting-custom-mcp-servers-in-chatgpt).

These steps are for ChatGPT on the web. You don't need to turn on developer mode
first.

1. In ChatGPT, go to **Plugins**.
2. Select **+**, then **Add custom MCP server**.
3. Enter a name, for example `Axiad gateway`.
4. Under **Connection**, enter your gateway address.
5. Set up authentication to use OAuth.
6. Read the risk warning and select **I understand and want to continue**.
7. Select **Create as a plugin** and complete the Axiad sign-in.
8. Install the plugin. In a new chat, type `@` and select it.

### Codex

The Codex CLI, the Codex IDE extension, and the ChatGPT desktop app share one
Codex configuration.

1. Add the gateway in your terminal:

   ```bash
   codex mcp add axiad --url https://<company>.mesh.axiad.io/mcp
   codex mcp login axiad
   ```

   `codex mcp login` opens the Axiad sign-in in your browser.

2. Restart any Codex session that was already open.

To add the gateway to one project only, put this in `.codex/config.toml` at the
root of a trusted project, then run `codex mcp login axiad` from that folder:

```toml
[mcp_servers.axiad]
url = "https://<company>.mesh.axiad.io/mcp"
```

In the ChatGPT desktop app or the IDE extension, you can also add it from
**Settings** > **MCP servers** > **Add server**. Choose **Streamable HTTP**,
enter your gateway address, and select **Authenticate** next to the server.

Codex stays pending until an admin approves it.

### VS Code (GitHub Copilot)

1. Open the Command Palette and run **MCP: Add Server**.
2. Choose **HTTP**, enter your gateway address, and enter `axiad` as the
   server ID.
3. Choose where to save it.

To share it with your team, add it to `.mcp.json` at the root of your project
instead:

```json
{
  "mcpServers": {
    "axiad": {
      "type": "http",
      "url": "https://<company>.mesh.axiad.io/mcp"
    }
  }
}
```

When VS Code connects, follow its prompt to sign in, and complete the Axiad
sign-in in your browser.

VS Code stays pending until an admin approves it.

### Antigravity

1. Open your MCP configuration:
   - **Antigravity IDE:** at the top of the agent panel, select **…** >
     **MCP Servers** > **Manage MCP Servers** > **View raw config**.
   - **Antigravity App:** go to **Customizations** > **Installed** and, under
     **MCP Servers**, select **Copy Config File Path**. Open that file.
2. Add the gateway and save the file:

   ```json
   {
     "mcpServers": {
       "axiad": {
         "serverUrl": "https://<company>.mesh.axiad.io/mcp"
       }
     }
   }
   ```

3. Under **MCP Servers**, select **Authenticate** next to **axiad**, and
   complete the Axiad sign-in in your browser.
4. If Antigravity asks for an authorization code, copy it from the browser,
   paste it into **Enter authorization code**, and select **Submit**.

### goose

In the goose CLI:

1. Run `goose configure`.
2. Select **Add Extension**, then **Remote Extension (Streamable HTTP)**.
3. Enter `axiad` as the name and your gateway address as the endpoint.

In goose Desktop, open the sidebar, select **Extensions** > **Add custom
extension**, and enter the same details.

You can also add it to `~/.config/goose/config.yaml`:

```yaml
extensions:
  axiad:
    name: axiad
    type: streamable_http
    uri: https://<company>.mesh.axiad.io/mcp
    enabled: true
    timeout: 300
```

goose opens the Axiad sign-in in your browser the first time it connects.
goose stays pending until an admin approves it.

### OpenCode

1. Add the gateway to `opencode.json`:

   ```json
   {
     "$schema": "https://opencode.ai/config.json",
     "mcp": {
       "servers": {
         "axiad": {
           "type": "remote",
           "url": "https://<company>.mesh.axiad.io/mcp"
         }
       }
     }
   }
   ```

2. Sign in from your terminal:

   ```bash
   opencode mcp auth axiad
   ```

   You can also open `/mcps` in OpenCode, select **axiad**, and sign in.

OpenCode stays pending until an admin approves it.

### Factory

1. Add the gateway to Droid in your terminal:

   ```bash
   droid mcp add axiad https://<company>.mesh.axiad.io/mcp --type http
   ```

   This saves it in `~/.factory/mcp.json`:

   ```json
   {
     "mcpServers": {
       "axiad": {
         "type": "http",
         "url": "https://<company>.mesh.axiad.io/mcp"
       }
     }
   }
   ```

2. Sign in with `droid mcp auth`, or type `/mcp` in Droid and complete the
   Axiad sign-in in your browser.

Droid stays pending until an admin approves it.

### Any other MCP client

Any client can connect if it:

- connects to remote MCP servers over **streamable HTTP**, and
- signs in with **OAuth**, registering itself automatically.

Add your gateway address as a remote MCP server. Many clients take an entry like
this one, but check your client's documentation for its own format:

```json
{
  "mcpServers": {
    "axiad": {
      "url": "https://<company>.mesh.axiad.io/mcp"
    }
  }
}
```

After sign-in, the client must return to an `https` web address, or to a local
address on your own computer (`http://127.0.0.1`, `http://[::1]`, or
`http://localhost`). Clients
that return to a custom app link, such as `cursor://`, can't complete the Axiad
sign-in.

## Next steps

- [Govern AI agents with the Agentic Gateway](./ai-agent-gateway.md): set what
  agents may do, approve or revoke agents, and review every call.
