> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/agents/setup.md).

# Roboflow Agent Setup

Setup instructions a coding agent follows to connect Roboflow to itself.

Instructions for a coding agent. If you are a person, read [MCP Server](/agents/mcp-server.md) instead.

Connect this session to the Roboflow MCP server at `https://mcp.roboflow.com/mcp`. Two steps are the user's, not yours: OAuth sign-in happens in a browser, and the server only loads when the client restarts. Do your part, then hand them one instruction at a time.

## 1. Add the server

Skip this if `roboflow` already shows up in `claude mcp list` or `codex mcp list`. Do not add it twice.

```bash
claude mcp add -s user roboflow --transport http https://mcp.roboflow.com/mcp   # Claude Code
codex mcp add roboflow --url https://mcp.roboflow.com/mcp                       # Codex
```

In Cursor, tell the user to run `/add-plugin roboflow`. For any other client, add `roboflow` to its MCP config as `{"type": "http", "url": "https://mcp.roboflow.com/mcp"}`, reading the file first so you keep the servers already in it.

## 2. Ask the user to sign in

Authentication is OAuth, so there is no API key and nothing for them to paste to you. In Claude Code they run `/mcp`, select "roboflow", and choose "Authenticate". In Codex they run `codex mcp login roboflow` in their own terminal. Other clients prompt on first use. An account is free at [app.roboflow.com](https://app.roboflow.com).

## 3. Verify

Ask them to restart the client, unless Roboflow's tools are already loaded in this session. Then call `projects_list`, named `mcp__roboflow__projects_list` in some clients, and tell them which workspace answered and how many projects it holds.

Never report success from a config file. A 401 means step 2 is unfinished; a missing tool means the restart did not happen.

## If OAuth cannot run

Where OAuth cannot run, as in CI or an older client, have the user export `ROBOFLOW_API_KEY` from [app.roboflow.com/settings/api](https://app.roboflow.com/settings/api) and pass it to the same URL as an `x-api-key` header, alongside `Accept: application/json, text/event-stream`. Gateways that need a pre-registered OAuth app are covered on the [MCP Server](/agents/mcp-server.md#connecting-mcp-gateways-pre-registered-credentials) page.
