> ## Documentation Index
> Fetch the complete documentation index at: https://www.gitaudience.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your agent

> Create an agent token, register the project's MCP server in Claude Code, Codex or Antigravity, install the two sub-agents and start the enrichment.

You end with an MCP client on your computer that enriches the stargazers of one project: it is registered with the project's MCP server, has the project's two sub-agents installed, and has processed its first stargazer.

Your own MCP client does the enrichment, on your computer and on your plan. GitAudience runs no AI model itself. A main agent takes stargazers in batches from the MCP server and hands each one to two sub-agents:

- the **research agent** (crawler) reads the stargazer's public pages and saves a dossier, page by page;
- the **evaluation agent** (decider) reads that dossier and returns the facts and the target profile scores.

The main agent never reads the web itself. See [MCP server](https://www.gitaudience.com/docs/features/mcp-server.md) for the tools and [Enrichment](https://www.gitaudience.com/docs/features/enrichment.md) for what happens to each stargazer.

You do this setup at step 6 of [adding a project](https://www.gitaudience.com/docs/guides/add-a-project.md), and again in Settings › **MCP agent** when something changes: a new computer, a new token, another client, a renamed server. This guide follows Settings › **MCP agent**, whose five steps are ticked as GitAudience sees your agent do them.

## Before you start

- A project with a published configuration. See [Configure a project with your AI](https://www.gitaudience.com/docs/guides/configure-with-ai.md).
- An **owner** account to create an agent token. Members can read the page but not create tokens.
- One of the supported clients installed: [Claude Code](https://www.gitaudience.com/docs/integrations/claude-code.md), [Codex CLI](https://www.gitaudience.com/docs/integrations/codex.md) or [Antigravity CLI](https://www.gitaudience.com/docs/integrations/antigravity.md).
- Your computer can reach the public address of your instance, the `PUBLIC_URL` it was installed with. The MCP server answers on `<PUBLIC_URL>/mcp`.

### 1. Choose your agent

Open Settings › **MCP agent**. Under **Choose your agent**, pick **Claude Code**, **Codex** or **Antigravity**. The project remembers the choice, and the commands, files and launch prompt below follow it.

Switching client asks for confirmation. It resets the models and effort of the two sub-agents in your configuration draft to the new client's defaults, and keeps your facts, instructions, target profiles and parallelism.

| Client          | Sub-agents                                                                                                          |
| --------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Claude Code** | Isolated: the research agent only has `WebFetch` and its two MCP tools, the evaluation agent only its one MCP tool. |
| **Codex**       | Custom sub-agents and a project skill, without strict tool isolation.                                               |
| **Antigravity** | Custom sub-agents and a project skill, without strict tool isolation.                                               |

> [!WARNING]
>
> Codex and Antigravity sub-agents inherit the tools of the session. Launch them from an empty dedicated folder, with no source code or secrets in it. The server still checks every call: the token only reaches this project, and each call is bound to one stargazer and one operation.

### 2. Create an agent token

Under **Create an agent token**, type a name, such as `Enrichment laptop`, and create the token. It is shown once: copy it now, or go straight to the next step, where the command already contains it.

A token belongs to one project and reaches only that project. To replace a token, create another one, then **Revoke** the old one in the **Tokens** list. Any agent using a revoked token loses access at once.

### 3. Register the MCP server in your client

Copy the command or configuration block shown for your client and run it. The console fills in the server name, your instance address and the token you just created. With project `orbit` on an instance at `https://gitaudience.acme.example`, it looks like this:

**Claude Code**

```bash
claude mcp add --transport http gitaudience-orbit https://gitaudience.acme.example/mcp \
  --header "Authorization: Bearer <YOUR_TOKEN>"
```

**Codex**

Add this block to `~/.codex/config.toml`, then restart Codex:

```toml ~/.codex/config.toml
[mcp_servers.gitaudience-orbit]
url = "https://gitaudience.acme.example/mcp"
http_headers = { "Authorization" = "Bearer <YOUR_TOKEN>" }
```

The console also gives the alternative with `codex mcp add` and the token in an environment variable.

The research agent reads public pages with `curl` in the Codex sandbox: allow network access (`[sandbox_workspace_write] network_access = true` in `~/.codex/config.toml`) or approve the requests by hand.

**Antigravity**

```bash
agy mcp add --type http --header "Authorization: Bearer <YOUR_TOKEN>" \
  gitaudience-orbit https://gitaudience.acme.example/mcp
```

`--type` and `--header` come before the server name. The console also gives the block to add to `~/.gemini/config/mcp_config.json` by hand.

The step is ticked once your agent has called the MCP server with an agent token of this project.

### 4. Install the two sub-agents

Click **Copy install command** and run it in a terminal, or download each file and put it in place yourself. **Inspect install command** shows what the command writes.

| Client          | Files                                            | Folder                              |
| --------------- | ------------------------------------------------ | ----------------------------------- |
| **Claude Code** | `<server>-crawler.md`, `<server>-decider.md`     | `~/.claude/agents/`                 |
| **Codex**       | `<server>-crawler.toml`, `<server>-decider.toml` | `~/.codex/agents/`                  |
|                 | `SKILL.md`                                       | `~/.agents/skills/<server>/`        |
| **Antigravity** | `<server>-crawler.md`, `<server>-decider.md`     | `~/.gemini/config/agents/`          |
|                 | `SKILL.md`                                       | `~/.gemini/config/skills/<server>/` |

`<server>` is the project's MCP server name, `gitaudience-orbit` by default. Because the files carry that name, the sub-agents of several projects can sit in the same folder.

The files contain no token and none of your configuration's text. They are generated from the published version, with the models and effort of the sub-agent settings. After you change those settings in Settings › **Agent instructions** and publish, install the files again.

The step is ticked once the two sub-agents have used their MCP tools on a stargazer.

### 5. Start the enrichment

Under **Start the enrichment**, copy the prompt and paste it into your client, in a new session. For project `orbit`:

```text Claude Code
Enrich my GitAudience stargazers for project "orbit".
```

```text Codex
$gitaudience-orbit Enrich my GitAudience stargazers for project "orbit".
```

```text Antigravity
/gitaudience-orbit Enrich my GitAudience stargazers for project "orbit".
```

The agent then runs on its own, batch after batch, without asking you to continue. It stops when nobody is left to enrich, when the free limit is reached, or when the console has something for you to fix, and tells you why.

Run the same prompt again whenever new stargazers arrive.

## Check that it works

The header of Settings › **MCP agent** shows one state:

| State                                                        | What it means                                                                                                              |
| ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| **Not connected yet**                                        | No agent token of this project has reached the MCP server. The header counts the steps left.                               |
| **Your agent is connected, waiting for its first stargazer** | The client reached the server. Start the enrichment (step 5).                                                              |
| **Your agent is connected**                                  | The two sub-agents used their MCP tools on the same stargazer: **MCP tools verified**, with the date.                      |
| **Your agent enriches in fallback mode**                     | Your client doesn't give MCP tools to its sub-agents. The main agent passes them what they need, and the enrichment works. |
| **The sub-agents cannot reach their tools**                  | The sub-agents didn't find their MCP tools. The server name in your client and in the agent files must be the same.        |

For the last state, open **Advanced** and check the **MCP server name**, install the two files again (step 4), then restart your client.

**Enrichment** shows the same tool state and the stargazers processed.

![Settings › MCP agent of the orbit project with Claude Code: the header Your agent is connected, MCP tools verified, and the five setup steps ticked](https://www.gitaudience.com/docs/assets/screenshots/settings-mcp-agent-connected.png)

## Rename the MCP server

The **MCP server name** is in **Advanced**: letters, digits, `_` or `-`, 56 characters at most, never `__`, and unique across projects. After a rename, redo steps 3 and 4: register the server again under its new name and install the renamed files. Existing tokens keep working.

## Read-only tokens

A read-only token lets an agent or tool read the project's reports and search its stargazers, without enriching. Click **New read-only token**, then **Copy connection command** and **Copy read-only prompt**. A read-only token needs no sub-agent files.

## Next steps

- [Calibrate the enrichment](https://www.gitaudience.com/docs/guides/calibrate-enrichment.md) to check the first results.
- The client pages cover each one in detail: [Claude Code](https://www.gitaudience.com/docs/integrations/claude-code.md), [Codex](https://www.gitaudience.com/docs/integrations/codex.md), [Antigravity](https://www.gitaudience.com/docs/integrations/antigravity.md).
