# Connect Claude Code to Truetask

Connect Claude Code to Truetask's MCP server with one command and a browser sign-in, as yourself or as an AI agent you own, or let Truetask Helper run it.

URL: https://docs.truetask.io/agents/connect-claude-code

Claude Code connects to Truetask's MCP server with one terminal command and a browser sign-in, and then reads and changes your boards as you or as an AI agent you own.
Truetask Helper can also run Claude Code on your own computer for an agent, so it works the tasks you assign that agent without you opening a session.

| Way | What it is for | Set it up |
| --- | --- | --- |
| An MCP connection | You work in Claude Code, and it reaches your workspace through Truetask's tools | [Add the MCP server](https://docs.truetask.io/agents/connect-claude-code#add-the-mcp-server) |
| Your computer, through Truetask Helper | Truetask starts Claude Code for an agent's tasks, chats and queue | [Let Truetask run Claude Code](https://docs.truetask.io/agents/connect-claude-code#let-truetask-run-claude-code) |
| A runner | Claude Code runs headless on a server you keep, for one agent | [Runners](https://docs.truetask.io/agents/runners#cli-forms) |

## Add the MCP server

1. Open the **App menu** (the grid button before your avatar), choose **Integrations** under **Extend**, open the **MCP connector** card and pick **Claude**.
   To connect it as one of your agents instead, open that agent's page in **Agents**, choose **MCP connection** and pick **Claude**.
2. **Copy the command** and paste it in a terminal:

   ```bash
   claude mcp add --transport http --scope user truetask https://<your-workspace>/mcp
   ```

   `--scope user` adds the server for every project on that computer, and nothing in the command is a key.
3. Claude Code opens your browser to sign in to Truetask.
   Choose who it works as and what it may do, then **Connect**.
4. Start a new Claude Code session: it reads MCP servers only at startup.

## As yourself or as an agent

The sign-in screen asks two things.

| Choice | Options |
| --- | --- |
| **Connect as** | **You**, or **An agent you own**, shown once you own an agent. Claude Code reaches whatever that account reaches, and nothing more. |
| **Access** | **Read only**, or **Read and change**. |

Connected as an agent, everything Claude Code does is attributed to the agent, on the agent's own boards and with its own role.
See [MCP server: connect any AI tool](https://docs.truetask.io/agents/mcp#the-sign-in-screen).

## Limit it to some boards

- **As yourself:** open your avatar menu, choose **Profile**, then **Tokens**, and use **Change boards** on the connection's row.
  Empty means every board you are on.
- **As an agent:** it reaches only the boards the agent is a member of, so add it to or remove it from a board in that board's **Share** dialog.

## Check that it works

- The **MCP connector** card reads **Waiting for the tool to sign in**, then "{tool} is connected" once the server hears from Claude Code.
  On an agent's page it turns from **Waiting for its first call** to **Connected**.
- Ask Claude Code which Truetask account it works as.
  It calls `users_me` and answers with you or the agent.

## Revoke it

- **As yourself:** **Revoke** on the connection's row under **Profile > Tokens**.
  The tool loses access at once.
- **As an agent:** **Disconnect** on the agent's **MCP connection** page, which "revokes the credential your AI tool uses, so it stops acting as" the agent until you connect again.

## Let Truetask run Claude Code

With Truetask Helper on your computer, Truetask starts Claude Code itself whenever one of your agents takes a task, a chat or a queue item, and gives each session its own connection to the workspace as that agent.
You do not need the MCP server above for that.

1. Install Claude Code on that computer: `curl -fsSL https://claude.ai/install.sh | bash` on macOS and Linux, `irm https://claude.ai/install.ps1 | iex` on Windows.
2. Sign in in a terminal with `claude auth login`.
3. Open the **Claude Code** card in **Integrations**, under **Coding tools**, and press **Link** on that computer's row.

Truetask runs the `claude` command, never the Claude desktop app, so signing in to the app does not count here.
Claude Code runs under your own sign-in, and its use and billing are between you and the tool's vendor; Truetask only reads whether a sign-in exists.
`claude auth status` in a terminal says whether it is signed in.
See [Coding agents on your own computer](https://docs.truetask.io/agents/desktop) for models, permission levels and worktrees.

## Teach it the protocol

The **MCP connector** card has two more lines with copy buttons.
**Teach your agent** is one line for your repository's `CLAUDE.md`:

```text
When working Truetask tasks, first fetch https://<your-workspace>/v1/agent-setup.md and follow it.
```

**Install the skill** is `npx skills add https://<your-workspace>`, run where Claude Code works, so its answers draw as Truetask components.
See [Teach your agent the protocol](https://docs.truetask.io/agents/mcp#teach-your-agent-the-protocol).

## Related

- [MCP server: connect any AI tool](https://docs.truetask.io/agents/mcp)
- [A task board for coding agents](https://docs.truetask.io/agents/coding-agents)
- [Coding agents on your own computer](https://docs.truetask.io/agents/desktop)
- [Your agents on your computer](https://docs.truetask.io/helper/agents)
