Coding agents and the API
Let Claude Code, Codex, Cursor, or Gemini CLI build, test, and publish assistants in your workspace, with named tools and no shell.
On this page
Behavior speaks MCP, the standard way coding agents plug into apps. Once connected, an agent can create assistants, add sources, run checks, read visibility results, and publish, all through named tools. It never gets a shell. Everything it does shows up in the app as if you had done it yourself.
Connect Claude Code#
- Make a token under Settings → Developer → Coding agent tokens. Name it after the machine it lives on, and choose whether it expires after 30 days, 90 days, a year, or never. You can revoke it there at any time. A token cannot make another token, so new ones are always made here.
- Run this command in any terminal.
claude mcp add --transport http behavior https://your-behavior-address/api/mcp --header "Authorization: Bearer YOUR_TOKEN"
- Ask it for something. "Build me a support assistant from docs.example.com, write five checks, and run them."
Codex, Cursor, and Gemini CLI take the same address and header in their MCP settings. Any agent that lets you set a header on an MCP server address works the same way.
Connect Claude Desktop#
Claude Desktop cannot send a header itself, so a small helper, mcp-remote, sends it. Add this to its MCP settings file, with your token in place of YOUR_TOKEN. It needs Node.js on the same computer.
{
"mcpServers": {
"behavior": {
"command": "npx",
"args": ["mcp-remote", "https://your-behavior-address/api/mcp", "--header", "Authorization: Bearer YOUR_TOKEN"]
}
}
}
Connectors that ask you to sign in instead of taking a token, such as connectors in Claude on the web or in ChatGPT, are not supported yet.
A token that was revoked, expired, or mistyped is refused with a note saying so. Make a new one in Settings and replace it in your agent's settings.
The tools#
Agents see tools for assistants (create, configure, add sources, chat, run checks, publish), data (tables, refresh), monitoring (brands, checks, results, cost estimates), and the workspace. Each tool's description says what it does and what it costs, so an agent can tell you the price of a check before running it.
The HTTP API#
Everything the app does goes through /api/…, and a token works there too, as a bearer header. These are the most useful for integrations.
| Request | What it returns |
|---|---|
GET /api/tables/:id/rows?limit=100 | A table's rows as JSON. |
GET /api/bots/:id/evals/:run | A model comparison as CSV. |
POST /api/visibility/:id/import | Adds answers collected elsewhere. |
GET /api/visibility/:id | A brand's answers and settings. |
The chat widget and a published assistant's chat work without any token, within the plan's visitor limits.
Updated Nov 10, 2026