YOLO
MCP server from GongRzhe/YOLO-MCP-Server
claude mcp add --transport stdio gongrzhe-yolo-mcp-server python server.py \ --env PYTHONPATH="."
How to use
This YOLO MCP Service exposes a Claude-friendly computer vision interface built around YOLO models. It supports object detection, segmentation, classification, and pose estimation, with real-time camera analysis and options to train, validate, and export models. The service can operate on images from file paths or base64-encoded data, and it integrates with Claude via MCP to allow conversational prompts to trigger specific vision tasks. To get started, run the MCP server locally and connect Claude (or other MCP clients) using the generated configuration. Once running, you can list available models, perform single-image detections, run comprehensive analyses that combine multiple capabilities, segment objects, classify entire images, or stream live detections from your camera. The included tools are designed to be invoked via structured function calls embedded in Claude prompts, enabling a smooth, hands-free workflow for vision tasks.
How to install
Prerequisites:
- Python 3.10 or higher
- Git (optional, for cloning the repository)
Installation steps:
-
Create a project directory and navigate to it mkdir yolo-mcp-service cd yolo-mcp-service
-
Obtain the project files
If you have the files locally, place them in this directory
If using Git:
git clone https://github.com/GongRzhe/YOLO-MCP-Server.git .
-
Create a Python virtual environment
On Windows
python -m venv .venv
On macOS/Linux
python3 -m venv .venv
-
Activate the virtual environment
On Windows
.venv\Scripts\activate
On macOS/Linux
source .venv/bin/activate
-
Install dependencies and set up MCP configuration python setup.py
The setup script will:
- Check your Python version
- Create a virtual environment (if not already created)
- Install required dependencies
- Generate an MCP configuration file (mcp-config.json)
- Output configuration information for different MCP clients including Claude
-
Note the MCP configuration output generated by the setup script and the path to the server script, which you will use to connect via MCP (e.g., in Claude Desktop or Windsurf).
-
Prepare YOLO models
- Create a models directory in the running directory
- Download required models (e.g., yolov8n.pt, yolov8n-seg.pt, yolov8n-cls.pt, yolov8n-pose.pt) into models/
- Example commands: mkdir models curl -L https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt -o models/yolov8n.pt curl -L https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-seg.pt -o models/yolov8n-seg.pt curl -L https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-cls.pt -o models/yolov8n-cls.pt curl -L https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-pose.pt -o models/yolov8n-pose.pt
-
Run or deploy the MCP server as configured (the exact command is provided in the setup output). For local development, you typically run the server script (server.py) under the configured Python environment and ensure the mcp-config.json is accessible to Claude or your MCP client.
Additional notes
Tips and common considerations:
- Ensure your Python environment (virtualenv) is activated whenever running the server.
- The MCP configuration may be different depending on your environment (local vs. Claude Desktop). Keep the generated mcp-config.json in a location accessible to Claude.
- Models should be placed in the expected directories (current working directory, a models/ subdirectory, or other directories defined by CONFIG["model_dirs"] in server.py).
- If you update models or paths, re-run the setup script to regenerate configuration for MCP clients.
- When using real-time camera analysis, ensure your system has a webcam available and the necessary permissions configured for camera access.
- For image inputs, the service supports both file paths and base64-encoded images; adjust your function calls accordingly in Claude prompts.
- If you encounter issues, verify that the environment variables (such as PYTHONPATH) are correctly set in the MCP configuration.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP