# 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.loom.com/share/1692bda4cfb242bb9a1041129230dfeb>" %}

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

## Adding MCP

### Claude Code CLI

```bash
claude mcp add roboflow \
  --transport http https://mcp.roboflow.com/mcp \
  --header "x-api-key: YOUR_ROBOFLOW_API_KEY" \
  --header "Accept: application/json, text/event-stream"
```

### MCP Client

For any other MCP client (including Claude Desktop app) you can add Roboflow MCP server to your config (eg. `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "roboflow": {
      "type": "http",
      "url": "https://mcp.roboflow.com/mcp",
      "headers": {
        "x-api-key": "YOUR_ROBOFLOW_API_KEY",
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}
```

You can find your Roboflow API Key at [app.roboflow.com/settings/api](https://app.roboflow.com/settings/api)

### 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
