# 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`).

#### Projects: manage projects in your workspace

| Tool              | Description                                                                                  |
| ----------------- | -------------------------------------------------------------------------------------------- |
| `projects_list`   | List all projects in the workspace associated with the API key.                              |
| `projects_create` | Create a new computer vision project (detection, classification, segmentation, or keypoint). |
| `projects_get`    | Get detailed info about a project including versions, classes, splits, and trained models.   |

#### Images: prepare image uploads for a project

| Tool                        | Description                                                                                                   |
| --------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `images_prepare_upload`     | Get a pre-built upload URL to upload a single image to a project via `curl`.                                  |
| `images_prepare_upload_zip` | Get 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`.                               |
| `images_search`             | Search for images inside a project with filters for tag, class, batch, annotation job, and visual similarity. |

#### Annotations: save annotations to a project image

| Tool               | Description                                                    |
| ------------------ | -------------------------------------------------------------- |
| `annotations_save` | Save an annotation (XML, JSON, or text) for an existing image. |

#### Batch: organize images into batches and create labeling jobs

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

#### Versions: create and inspect dataset versions

| Tool                | Description                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------ |
| `versions_generate` | Create a new dataset version with optional preprocessing and augmentation settings.                    |
| `versions_get`      | Get info about a dataset version including splits, preprocessing, augmentation, and model metrics.     |
| `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_infer`               | Run hosted inference on an image using a trained model and return JSON predictions. |
| `models_train`               | Start training a model (RF-DETR, YOLO, etc.) on a dataset version.                  |
| `models_get_training_status` | Get the training progress and metrics (epoch, mAP, loss) for a dataset version.     |

#### Workflows: build and execute 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. |

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

| Tool              | Description                                                                                                                        |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `universe_search` | Search Roboflow Universe for public datasets or pre-trained models, with operators for class, image count, project type, and sort. |

#### Meta: report issues or suggestions

| Tool                 | Description                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------- |
| `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.
