# Set up Claros with your agent

Your user wants Claros connected. Claros holds their team's rules (rule sets, each rule confirmed by its owner) and answers one question before an agent acts: is this allowed, and if not, what is the rule, in whose words, and who to ask.

## First: can you run commands on this machine?

**Yes (Claude Code, Codex, Cursor, Windsurf, Gemini CLI):** use the one command below, verify it, and tell your user what changed.

**No (a hosted assistant: Claude.ai, ChatGPT):** you can't connect yourself. Tell your user, as a numbered list:

1. In Claros (https://claros.sh/signin; anyone can sign up), make an agent key under Account → Agent keys.
2. Open your assistant's settings and add a custom connector (Claude: Settings → Connectors → Add custom connector).
3. Paste the server URL `https://timurs-macbook-pro.tail8a0be4.ts.net/mcp`, add the header `Authorization: Bearer <your clr_ key>` if the connector asks for one, then start a new conversation.

Then skip to "The rule from now on".

## 1. Run the command

```
npx getclaros --yes
```

Run it in a terminal your user can see. It signs your user in through the browser: it opens the sign-in page (or prints a link: show it to your user and wait while they approve). New to Claros? They make an account and a workspace on that page. Then it enrolls this machine's agents: native hooks for Claude Code, Codex and Cursor (shell commands, file edits), a local proxy in front of each MCP server in Claude Code, Claude Desktop, Cursor, VS Code and Codex (reads pass through), and the Claros MCP server (`claros`). Every config is backed up first. `--yes` guards everything it finds; without it, it asks in the terminal. Never ask your user for a key: the command saves its own, readable only by them.

## 2. Verify

Tell your user which apps to restart (the command names them). `npx getclaros status` exits 0 when every agent is guarded; `npx getclaros test` shows a stop; `npx getclaros undo` puts every config back. After the restart, list the tools the `claros` server offers (`check_action`, `get_decision`, …).

## Without the command (CI, a server)

Use an agent key (`clr_<prefix>_<secret>`, made under Account → Agent keys) from the environment variable `CLAROS_AGENT_KEY`; never write it into a committed file. The MCP server is Streamable HTTP at `https://timurs-macbook-pro.tail8a0be4.ts.net/mcp` (SSE at `https://timurs-macbook-pro.tail8a0be4.ts.net/mcp/sse` for older clients), with the header `Authorization: Bearer $CLAROS_AGENT_KEY`. Claude Code:

```
claude mcp add --transport http claros https://timurs-macbook-pro.tail8a0be4.ts.net/mcp --header "Authorization: Bearer $CLAROS_AGENT_KEY"
```

A `401` means the key is missing or wrong; `403` means it isn't an agent-scope key.

## The rule from now on

Before any save or submit in a business app, call `check_action` with the record's fields, for example:

```json
{ "state": { "Amount": 7200, "Expense Head": "Tools and Small Equipment" }, "action": "submit" }
```

- `allowed: false`: do not proceed. Each violation has `action` (`stop` or `ask`), `rule`, `owner` (whose rule it is), `from` (where it came from: a Slack thread, a policy doc, their answers…), `quote` (the owner's words), `who_to_ask` and `next`. Tell your user the rule, whose it is and where it came from.
- `result: "ask"`: Claros has already asked the rule's owner. Call `get_decision` with the `check_id` and `wait: 30`, again while it's `open`, and proceed only when `proceed` is true, with the action exactly as checked. If it's denied or times out, don't.
- `result: "nudge"` (`allowed: true`): go ahead. Each `nudge` violation carries the rule, its owner's words and, when there is one, a `fix`: apply it if you still can and follow the rule from then on. `guidance` says what to do in one line.
- `judge_yourself`: rules that need judgment. Read them, and stop and ask if you're unsure.
- `not_evaluable`: fields the check needed but didn't get. Send them and check again.

## Tools

| Tool | Does |
|---|---|
| `check_action` | Check a record before saving or submitting it |
| `get_decision` | Wait for the owner's answer to an ask (`check_id`, `wait` up to 30 s) |
| `report_override` | Tell the rule's owner a check got it wrong |
| `find_guardrails` | Search rules by keywords, any language |
| `get_workflow` | An approved rule set: steps, rules, quotes |
| `quote` | The owner's exact words behind a rule, translated if needed |

More: https://claros-docs.vercel.app · https://claros.sh/llms.txt
