# Connecting an agent

Let Claude Code, Codex or claude.ai build, test and publish Decisions for you.

## What an agent can do

Claude Code, Codex and claude.ai can work on your Decisions for you: write and review a Definition,
add Examples and Test cases, run the Sandbox and tests, start Comparisons, publish versions and
request deployments. They use the TypeFuse skill, which teaches them how Decisions work, and the
TypeFuse tools over MCP.

The [Agents page](https://typefuse.dev/agents) has every step for each agent, with commands you can copy. In the app,
**Connect an agent** at the foot of the sidebar shows the same steps.

## Setting up

For Claude Code and Codex, one command installs the skill and adds the TypeFuse tools to Claude
Code. It writes only under `~/.claude` and `~/.codex`, and you can
[read the script](https://typefuse.dev/install) first:

```sh
curl -fsSL https://typefuse.dev/install | sh
```

Then sign in:

- **Claude Code**: run `/mcp`, choose **typefuse** and **Authenticate**.
- **Codex**: add the tools with `codex mcp add typefuse --url https://api.typefuse.dev/v1/mcp`, then run
  `codex mcp login typefuse`.
- **claude.ai**: in Settings → Connectors, add a custom connector with the URL `https://api.typefuse.dev/v1/mcp`, then
  sign in when asked.

Signing in opens TypeFuse in your browser, where you choose which organisation the agent may use
(or all of yours) and how much it may do.

Or paste this into any agent and let it set itself up:

```text
Install the TypeFuse skill and MCP server from https://typefuse.dev/agents.md, then ask me to sign in.
```

## What you allow

| Access | The agent can |
| --- | --- |
| Read | See Decisions, runs, Test runs, Evaluations, Datasets and your notifications |
| Run | Also run drafts and tests, evaluate and compare |
| Full | Also create and edit Decisions, publish versions and request deployments |

An agent can never approve a deployment, and it can't manage members, keys or billing. A deployment
it requests to Production waits for one click from you (or another approver) in the app; its answer
includes the link to that page.

Your connected apps are listed under **Connect an agent**, then **Manage**, where you can revoke any
of them. A connection that goes unused for 30 days ends on its own.

## CI and scripts

For CI and other automated agents that can't sign in through a browser, create a personal access
token with Read, Run or Full access, and give it to the tool as `TYPEFUSE_TOKEN`. Treat it like a
password, and never paste it into a conversation.

The `typefuse` CLI also signs in through the browser with `typefuse login`, or with a device code.
It isn't on npm yet; it will be published with the move to the `typefuse.ai` domain.

## Where agents read more

- [The TypeFuse skill](https://typefuse.dev/agents/typefuse/SKILL.md)
- [These guides as Markdown](https://typefuse.dev/guides.md), and each guide on its own at `/guides/<guide>.md`
- [llms.txt](https://typefuse.dev/llms.txt)
- [The API reference](https://api.typefuse.dev/docs)
