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

# Claude Code

> Connect Claude Code to the Agent Golf MCP server, sign in, and sign out.

Claude Code connects to the Agent Golf MCP server over HTTP and signs in with OAuth. Server URL:

```text theme={null}
https://mcp.agent.golf/mcp
```

## Add the server

Use one of these.

> [tab] Agent Golf plugin
>
> The Agent Golf plugin 0.8.0 adds the server and the `/agentgolf:attribute` and `/agentgolf:health` commands. It also adds skills for rework, session health, and pull-request cost. Its tools need Claude Code 2.1.308 or later. Enter in Claude Code:
>
> ```text theme={null}
> /plugin marketplace add agentgolf/agent-plugins
> /plugin install agentgolf@agentgolf-plugin-marketplace
> /reload-plugins
> ```
>
> Claude Code names the server `plugin:agentgolf:agentgolf`. Use that name in the steps below.

> [tab] claude mcp add
>
> Run in a shell:
>
> ```bash theme={null}
> claude mcp add --scope user --transport http agentgolf https://mcp.agent.golf/mcp
> ```
>
> Claude Code names the server `agentgolf`.

## Sign in

1. In Claude Code, run `/mcp`, select the server, and select **Authenticate**. Or run `claude mcp login <server name>` in a shell. Without a local browser, add `--no-browser` and paste the redirect URL back.
2. In the browser, sign in to Agent Golf, select the workspace and the permissions, and select **Approve**. See [Sign in](https://docs.agent.golf/mcp/access.md#sign-in).
3. `/mcp` shows the server as connected, with its tools.

Claude Code keeps the token and renews it. When the sign-in ends, `/mcp` shows that the server needs authentication. Sign in again.

## Sign out

Run `/mcp`, select the server, and select **Clear authentication**. Or run `claude mcp logout <server name>` in a shell. This removes the token from Claude Code.

To end the access on the Agent Golf side too, revoke the client on the **MCP Clients** card of the **Account** page. See [Revoke a client](https://docs.agent.golf/mcp/access.md#revoke-a-client).

## Local transcripts

The remote server cannot read your local Claude Code transcripts. To let Claude read them, also add the local server of the CLI. It needs `agentgolf login`:

```bash theme={null}
claude mcp add --scope user agentgolf-local -- agentgolf mcp
```

The plugin's `agentgolf-session-health` skill then reads the transcript around a failing tool call. For the CLI versions that the local server needs, see [Local transcripts](https://docs.agent.golf/mcp/overview.md#local-transcripts).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.