> 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/developer/mcp-server.md).

# MCP Server

Work on your Roboflow projects together with AI. Connect Claude Code (or any MCP-compatible agent) to your workspace. It can create projects, upload data, train models, build Workflows, and guide you through the visual steps in the Roboflow UI. You handle what you're best at (seeing, labeling, judging results), your agent handles the rest.

## Demo

{% embed url="<https://www.youtube.com/watch?v=wgp6If3wi0o>" %}

<https://mcp.roboflow.com/>

## Adding MCP

The Roboflow MCP server uses OAuth for authentication - no API key needed. You'll be prompted to sign in to Roboflow on first use.

### Claude Connector (Recommended)

Add Roboflow as a connector in your Claude account. Once connected, it works everywhere - Claude.ai, Claude Desktop, and Claude Code.

[**Add Roboflow to Claude**](https://claude.ai/customize/connectors?modal=add-custom-connector\&connectorName=Roboflow\&connectorUrl=https%3A%2F%2Fmcp.roboflow.com%2Fmcp) - click the link, confirm, and you're done. You'll be prompted to sign in to Roboflow with OAuth on first use.

### Claude Code CLI

```bash
claude mcp add -s user roboflow \
  --transport http https://mcp.roboflow.com/mcp
```

### Cursor

Install the Roboflow plugin from the [Cursor marketplace](https://cursor.com/marketplace/roboflow), or run `/add-plugin roboflow` in Cursor. Either installs the MCP server along with Roboflow's skills. Sign in to Roboflow with OAuth on first use.

To configure the server manually instead, add this to Cursor's MCP config (`~/.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "roboflow": {
      "type": "http",
      "url": "https://mcp.roboflow.com/mcp"
    }
  }
}
```

### Codex

Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.roboflow]
url = "https://mcp.roboflow.com/mcp"
```

### Connecting MCP Gateways (Pre-Registered Credentials)

Most MCP clients (Cursor, Claude Desktop, VS Code, Claude Code) register automatically using Dynamic Client Registration. Some platforms require a pre-registered `client_id` and `client_secret` instead - for example, Azure AI Foundry agents, Microsoft Copilot Studio, and TrueFoundry AI Gateway.

To connect one of these platforms:

1. Go to **Workspace Settings > Developer** in the Roboflow dashboard
2. Click "Create OAuth App" and fill in a name, redirect URI (matching your gateway's callback URL), and allowed scopes
3. Set "Token endpoint authentication" to match your gateway: `client_secret_basic` (HTTP Basic header, used by Azure and TrueFoundry) or `client_secret_post` (secret in the form body)
4. Copy the Client ID and Client Secret (shown once)
5. In your gateway's connector form, enter:

| Field                         | Value                                                                               |
| ----------------------------- | ----------------------------------------------------------------------------------- |
| MCP Server URL                | `https://mcp.roboflow.com/mcp`                                                      |
| Authorization URL             | `https://app.roboflow.com/oauth/authorize`                                          |
| Token URL                     | `https://app.roboflow.com/oauth/token`                                              |
| Discovery (OAuth AS metadata) | `https://app.roboflow.com/.well-known/oauth-authorization-server`                   |
| Scopes                        | Space-separated list (ex: `workspace:read project:read model:infer offline_access`) |

Include `offline_access` in your scope list if the gateway supports refresh tokens.

For the full scope catalog, see [Available Scopes](/developer/authentication/sign-in-with-roboflow-getting-started.md#available-scopes).

### Tools

The Roboflow MCP server exposes the following tools, grouped by category. Tools are namespaced as `mcp__<server>__<tool_name>` by your MCP client (e.g. `mcp__roboflow__projects_list`).

#### Agent: chat with the Roboflow agent and build workflows

| Tool                       | Description                                                                                        |
| -------------------------- | -------------------------------------------------------------------------------------------------- |
| `agent_chat`               | Chat with the Roboflow AI agent (Roboflow Q\&A, advanced Workflow building, CV solution planning). |
| `agent_conversation_get`   | Get a single agent conversation with its full message history.                                     |
| `agent_conversations_list` | List Roboflow agent conversations in the workspace.                                                |
| `agent_workflow_publish`   | Publish the latest agent-edited draft of a workflow.                                               |

#### Projects: manage projects in your workspace

| Tool                 | Description                                                                                       |
| -------------------- | ------------------------------------------------------------------------------------------------- |
| `projects_list`      | List all projects in the workspace associated with the API key.                                   |
| `projects_get`       | Get detailed info about a project including versions, classes, splits, and trained models.        |
| `projects_create`    | Create a new computer vision project (detection, classification, segmentation, or keypoint).      |
| `projects_fork`      | Enqueue an async fork of a public Universe project into your workspace.                           |
| `projects_health`    | Get the dataset health check for a project.                                                       |
| `create_project_app` | Open a Prefab UI so the human can create a Roboflow project (calls `projects_create` on confirm). |

#### Images: upload and search project images

| Tool                        | Description                                                                                                   |
| --------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `images_search`             | Search for images inside a project with filters for tag, class, batch, annotation job, and visual similarity. |
| `images_prepare_upload`     | Get a pre-built upload URL to upload a single image to a project via `curl`.                                  |
| `images_prepare_upload_zip` | Prepare a signed URL to bulk-upload a zip of images (and optional COCO/YOLO/VOC/folder annotations).          |
| `images_upload_zip_status`  | Check the status of a zip upload task started with `images_prepare_upload_zip`.                               |

#### Annotation: save annotations and run autolabeling

| Tool                | Description                                                    |
| ------------------- | -------------------------------------------------------------- |
| `annotations_save`  | Save an annotation (XML, JSON, or text) for an existing image. |
| `autolabel_start`   | Start a hosted auto-label job over a batch of images.          |
| `autolabel_job_get` | Get per-subjob status and progress for an auto-label job.      |

#### Batch: create and manage labeling jobs

| Tool                      | Description                                                                     |
| ------------------------- | ------------------------------------------------------------------------------- |
| `annotation_jobs_create`  | Create an annotation job to assign a batch of images to a labeler and reviewer. |
| `annotation_batches_list` | List upload batches in a project.                                               |
| `annotation_batches_get`  | Get details about a specific batch including image count and status.            |

#### Versions: create and export dataset versions

| Tool                | Description                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------ |
| `versions_get`      | Get info about a dataset version including splits, preprocessing, augmentation, and model metrics.     |
| `versions_generate` | Create a new dataset version with optional preprocessing and augmentation settings.                    |
| `versions_export`   | Check or trigger a dataset export for a version in a specific format (e.g. `coco`, `yolov8`, `jsonl`). |

#### Models: train models and monitor training progress

| Tool                         | Description                                                                         |
| ---------------------------- | ----------------------------------------------------------------------------------- |
| `models_list`                | List trained models associated with a project.                                      |
| `models_get`                 | Get details for a trained model.                                                    |
| `models_train`               | Start training a model (RF-DETR, YOLO, etc.) on a dataset version.                  |
| `models_infer`               | Run hosted inference on an image using a trained model and return JSON predictions. |
| `models_get_training_status` | Get the training progress and metrics (epoch, mAP, loss) for a dataset version.     |
| `models_star_nas`            | Star or unstar a NAS-trained model.                                                 |
| `trainings_get_results`      | Get the run-level training results bundle.                                          |
| `trainings_stop`             | Request an early stop on an in-flight training run.                                 |
| `trainings_cancel`           | Cancel an in-flight training run.                                                   |

#### 8. Model Evaluations: view mAP, confusion matrices, and per-class performance

| Tool                                   | Description                                                      |
| -------------------------------------- | ---------------------------------------------------------------- |
| `model_evals_list`                     | List model evaluations in the current workspace.                 |
| `model_evals_get`                      | Get the top-level summary for a single model evaluation.         |
| `model_evals_get_map_results`          | Get per-split mAP results for an eval.                           |
| `model_evals_get_confusion_matrix`     | Get the confusion matrix for an eval.                            |
| `model_evals_get_confidence_sweep`     | Get the precision/recall/F1 confidence sweep for an eval.        |
| `model_evals_get_performance_by_class` | Get per-class performance metrics for a single split.            |
| `model_evals_get_image_predictions`    | Get per-image prediction stats for an eval (paginated).          |
| `model_evals_get_vector_analysis`      | Get UMAP + HDBSCAN clustering of image embeddings for an eval.   |
| `model_evals_get_recommendations`      | Get the LLM-generated recommendations for an eval, if available. |

#### 9. Workflows: build and run inference pipelines

| Tool                         | Description                                                                         |
| ---------------------------- | ----------------------------------------------------------------------------------- |
| `workflows_list`             | List saved workflows in the current workspace.                                      |
| `workflows_get`              | Get details for a saved workflow.                                                   |
| `workflows_create`           | Create and save a new Workflow in the workspace from a JSON definition.             |
| `workflows_update`           | Update an existing saved Workflow's name and definition.                            |
| `workflows_run`              | Execute a saved Workflow by ID on one or more images.                               |
| `workflow_blocks_list`       | List all available Workflow blocks with a short summary of each.                    |
| `workflow_blocks_get_schema` | Get the full schema (properties, required fields) of a specific Workflow block.     |
| `workflow_specs_validate`    | Validate a Workflow JSON definition without executing it.                           |
| `workflow_specs_run`         | Execute a Workflow directly from an inline JSON definition without saving it first. |

#### Devices & Streams: manage edge devices and video streams

| Tool                         | Description                                               |
| ---------------------------- | --------------------------------------------------------- |
| `devices_list`               | List devices registered in the workspace.                 |
| `devices_get`                | Get a single device by id.                                |
| `devices_create`             | Provision a new v2 device.                                |
| `devices_get_config`         | Get the device's current runtime configuration.           |
| `devices_get_default_config` | Get the workspace's default device configuration.         |
| `devices_get_config_history` | List prior configuration revisions, newest first.         |
| `devices_update_config`      | Update the device's runtime configuration.                |
| `devices_get_logs`           | Fetch device logs from Elasticsearch.                     |
| `devices_get_events`         | List device and stream lifecycle events.                  |
| `devices_get_telemetry`      | Get aggregated hardware metrics (cpu, memory, disk, gpu). |
| `devices_streams_list`       | List streams configured on the device.                    |
| `devices_streams_get`        | Get a single stream by id.                                |

#### Universe: search public datasets on Roboflow Universe

| Tool                             | Description                                                                                                            |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `universe_search`                | Search Roboflow Universe for public datasets or models, with operators for class, image count, project type, and sort. |
| `universe_search_app`            | Open a Prefab Universe UI for search, visual comparison, image skim, and fork - the human picks the dataset.           |
| `universe_dataset_images_search` | Search images inside a public Universe dataset URL.                                                                    |

#### Misc: poll long-running tasks and send feedback

| Tool                 | Description                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `async_tasks_get`    | Poll an async task by id (e.g. project forks). Poll every 5 seconds; processing may take up to 30 seconds to start. |
| `meta_feedback_send` | Report a bug, missing feature, UX friction, or documentation issue back to the Roboflow team.                       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/developer/mcp-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
