> ## 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.

# Claude Code

> Connect Claude Code to a GitAudience project, install its two sub-agents and start the enrichment. Claude Code is the recommended client: each sub-agent is limited to its own tools.

You end with Claude Code connected to the MCP server of one project, its two sub-agents installed in `~/.claude/agents/`, and a prompt that enriches the project's stargazers.

Claude Code is the default and recommended client. It is the only one of the three where each sub-agent file lists the tools that sub-agent may use: the crawler gets `WebFetch` and two MCP tools, the decider one MCP tool, and neither gets a shell or your files.

## Before you start

- Claude Code installed on your computer.
- A project whose setup is finished, with a published configuration. See [Add a project](https://www.gitaudience.com/docs/guides/add-a-project.md).
- The owner role on the instance, to create the token. See [Users](https://www.gitaudience.com/docs/features/users.md).
- Your instance reachable from your computer at its `PUBLIC_URL`, such as `https://gitaudience.example.com`.

While you add a project, step 6, **MCP agent**, shows the same commands and files, and step 7 gives the first prompt. This page follows Settings › **MCP agent**, where you find them once the project is set up.

### 1. Choose Claude Code

Open the project, then Settings › **MCP agent**. At step 1, **Choose your agent**, pick **Claude Code**. It is the default for a new project.

If the project used another client, the console asks you to confirm the switch. Switching resets the crawler and decider models and effort of your configuration draft to Claude Code's defaults.

![Settings › MCP agent for the orbit project with Claude Code chosen at step 1, and step 3 Register the MCP server in Claude Code showing the claude mcp add command with the new token in it](https://www.gitaudience.com/docs/assets/screenshots/claude-code-mcp-agent-steps.png)

### 2. Create an agent token

At step 2, **Create an agent token**, type a name for the token, such as the computer it will run on, and click **Create agent token**.

The token shows once. You don't need to copy it on its own: the command of the next step already contains it.

### 3. Register the MCP server

Step 3, **Register the MCP server in Claude Code**, gives the command with your server name, your address and the token in place. For a project whose slug is `orbit`:

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

Click **Copy command** and run it in a terminal. `gitaudience-orbit` is the project's MCP server name, set under **Advanced** on the same page. See [MCP server](https://www.gitaudience.com/docs/features/mcp-server.md#the-mcp-server-name).

### 4. Install the two sub-agents

At step 4, **Install the two sub-agents**, click **Copy install command** and run it in a terminal. It creates `~/.claude/agents/` if needed and writes two files:

| File                           | Sub-agent                                                                            | Tools it may use                                                                         |
| ------------------------------ | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| `gitaudience-orbit-crawler.md` | Research agent: reads at most 5 public pages about one stargazer and saves a dossier | `WebFetch`, `mcp__gitaudience-orbit__get_person`, `mcp__gitaudience-orbit__save_dossier` |
| `gitaudience-orbit-decider.md` | Evaluation agent: reads that dossier and returns the facts and target profile scores | `mcp__gitaudience-orbit__get_dossier`                                                    |

**Inspect install command** shows the command before you run it, and **Download gitaudience-orbit-crawler.md** and **Download gitaudience-orbit-decider.md** give each file on its own. Claude Code also reads sub-agents from the `.claude/agents/` folder of a project directory.

The files contain no token and no text from your configuration. They carry the server name and, for each sub-agent, the model and effort set in Settings › **Agent instructions**.

### 5. Start the enrichment

Step 5, **Start the enrichment**, gives the prompt. Paste it into Claude Code:

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

Claude Code gets its instructions from the server, then takes the stargazers in batches. For each one it starts the crawler, then the decider, and saves the result. It goes from one batch to the next without asking you, until no stargazer is left or the server tells it to stop.

New stargazers wait until you run the prompt again.

## Check that it works

In Settings › **MCP agent**, the status at the top moves as Claude Code works:

- **Your agent is connected, waiting for its first stargazer** as soon as the token has been used.
- **Your agent is connected** once both sub-agents have called their MCP tools on the same stargazer. Step 4 then shows **MCP tools verified** with the date.

The project's **Enrichment** page shows the stargazers being processed. See [Enrichment](https://www.gitaudience.com/docs/features/enrichment.md).

## Sub-agent models

Each sub-agent has its own model and effort, set in Settings › **Agent instructions**, in the sub-agents card, with the number of people processed in parallel. For Claude Code:

|         | Default model | Default effort |
| ------- | ------------- | -------------- |
| Crawler | `haiku`       | `low`          |
| Decider | `sonnet`      | `medium`       |

The console offers the models `haiku`, `sonnet`, `opus`, `fable` and `inherit`, and the efforts `low`, `medium`, `high`, `xhigh` and `max`.

The files follow the published version. After you publish a change to these settings, run the install command of step 4 again.

## Several projects

Each project has its own server name, token and sub-agent files, such as `gitaudience-orbit-crawler.md` and `gitaudience-beacon-crawler.md`. They can sit in the same `~/.claude/agents/` folder. Register each project's server and install its files, then start each project with its own prompt.

## Read-only access

To let Claude Code read the reports of a project without enriching it, create a **Read only** token from the **Tokens** card of Settings › **MCP agent**. Its banner gives **Copy connection command** and **Copy read-only prompt**. No sub-agent file is needed.

A read-only token can search the audience and read the dashboard counts. See [MCP server](https://www.gitaudience.com/docs/features/mcp-server.md#read-only-tokens).

## If something goes wrong

| What you see                                                                        | What to do                                                                                                                                                                                       |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **The sub-agents cannot reach their tools**, or Claude Code reports `tools_missing` | The server name in the sub-agent files doesn't match the one registered in Claude Code. Check the name under **Advanced**, run the commands of steps 3 and 4 again, then restart the enrichment. |
| **Your agent enriches in fallback mode**                                            | The main agent passes each sub-agent what it needs, because the sub-agents had no MCP tools. The enrichment works. Install the two sub-agents (step 4) to keep reading and scoring apart.        |
| `contract_changed`                                                                  | Your sub-agent files come from an older version of GitAudience. Run the install command of step 4 again.                                                                                         |
| The enrichment stops with `limit_reached`                                           | The project has used its 500 free places. See [Licence](https://www.gitaudience.com/docs/self-hosting/licence.md).                                                                               |

After you rename the MCP server, redo steps 3 and 4: the old entry and the old files no longer match.

## Next steps

- [Calibrate the enrichment](https://www.gitaudience.com/docs/guides/calibrate-enrichment.md) on a first batch of stargazers.
- [Agent instructions](https://www.gitaudience.com/docs/features/agent-instructions.md) to change what the sub-agents look for.
- [Privacy and data](https://www.gitaudience.com/docs/features/privacy.md) for what the agent reads and what never leaves through MCP.
