
Ultralytics Platform MCP
io.github.amanharshxv0.1.14更新于 Oct 2, 2026
MCP server for Ultralytics Platform projects, datasets, training, prediction, exports, and models.
概览
让助手通过本地 stdio 服务器管理 Ultralytics Platform 的项目、数据集、模型、训练任务、预测和导出。
- 功能
- 封装 Ultralytics Platform API,使助手可以列出和创建项目、上传数据集(包括通过 ffmpeg 从本地视频上传)、启动并监控训练任务、对图片或文件运行预测、下载模型权重,以及创建或取消导出。它还支持删除模型和项目,项目和数据集会被移入可恢复的回收站。
- 适用场景
- 适合已经使用 Ultralytics Platform、希望以对话方式驱动工作流的场景:创建项目、把视频片段作为数据集上传、微调 YOLO 模型、查看训练轮次指标,或在图片上运行已训练的模型。
- 运行要求
- 需要 Node.js 20 或更高版本,以及能够启动 stdio 服务器的 MCP 客户端。必需的 Ultralytics Platform API 密钥通过环境变量 ULTRALYTICS_API_KEY 传入;可选变量 ULTRALYTICS_API_BASE 用于覆盖 API 基础地址。从本地视频文件上传数据集时,ffmpeg 和 ffprobe 必须在 PATH 中。需要访问 Ultralytics Platform API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Ultralytics Platform MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Ultralytics Platform MCP
[npm version] [CI] [License: MIT]
MCP server for Ultralytics Platform workflows: projects, datasets, models, training, prediction, exports, and dataset uploads.
[!IMPORTANT] Independent community project. Not affiliated with or endorsed by Ultralytics.
Install · Tools · Safety · Troubleshooting
Try Asking
- "Show me my Ultralytics projects and which datasets are ready to train on."
- "Create a private project called
traffic-camsand upload./clips/junction.mp4as a dataset." - "Fine-tune
yolo11nontraffic-camsfor 50 epochs." - "How is that training going? Show me the last 10 epochs of metrics."
- "Run the trained model on
https://example.com/frame.jpg, then download the weights to./weights." - "Move my
scratchproject to trash." (restorable for 30 days)
https://github.com/user-attachments/assets/449d051b-d162-4539-93c5-94be478303f0
Installation
You need:
- Node.js
>=20 - An Ultralytics Platform API key
ffmpegandffprobeonPATH, to upload a dataset from a local video file- Claude Code, Codex, or another MCP client that can launch stdio servers
Get an API key
Sign in at Ultralytics Platform, open
Settings -> API Keys, and create or copy a key. The official
API key docs cover
creation, usage, and revocation.
Environment variables
Treat ULTRALYTICS_API_KEY as a bearer token. Pass it through your MCP client's
environment configuration only. Never paste real keys into prompts, scripts, or
committed config files. Project-scoped .mcp.json files are ignored by this repo
to reduce accidental key commits; if a key is exposed, revoke it in Ultralytics
Platform and create a replacement.
Standard config
Works in MCP clients that accept JSON stdio server definitions.
These examples track the latest published npm release. Restart your MCP client or session after upgrading, so the new server process picks up the latest package.
Antigravity
Add the standard config above through Antigravity settings, or by editing your configuration file directly.
Claude Code
Or add a project-scoped server in repo-root .mcp.json:
Claude Desktop
Follow the MCP install guide with the standard config above.
Codex
Or add it directly to ~/.codex/config.toml:
Cursor
Important The install button writes a placeholder key. After installing, open your Cursor MCP config and replace
ul_your_api_key_herewith your Ultralytics API key, then restart Cursor.
To install manually, go to Cursor Settings -> MCP -> Add new MCP Server
(or edit ~/.cursor/mcp.json) and use the standard config above.
Gemini CLI
Follow the MCP install guide with the standard config above.
VS Code / Copilot
Important The install button writes a placeholder key. After installing, open your VS Code MCP config and replace
ul_your_api_key_herewith your Ultralytics API key, then restart VS Code.
To install manually, follow the MCP install guide, or use the VS Code CLI:
Verify
Run claude mcp list or codex mcp list. You should see ultralytics among
the configured MCP servers.
Tools
See TOOLS.md for the full parameter reference, safety notes, local-path behavior, and examples for the tricky tools.
Safety
- Projects and datasets are created private by default, even though the platform itself defaults to public
export_createrequiresconfirm_cost: truetraining_startrequiresconfirm_cost: true, plusconfirm_history_loss: truewhen restarting training on an existing model that already has a recorded run. That path replaces its status, epoch count, and training result history irrecoverably- Starting a training job or an export is billable immediately, so the estimated cost and remaining balance are reported after the job starts, not before
training_startin checkpoint mode (a base checkpoint likeyolo11n.pt, not an existing model ref) creates the project model before the platform checks the checkpoint's task against the dataset's- If that check fails, the model it already created is not deleted automatically. The error names the model; review it and delete it with
models_deleteif it is unwanted - Cancelling a running training job preserves the latest checkpoint and keeps the model
export_cancelproceeds only when it observes an export asqueued,starting, orrunning, and refuses every other status, including unrecognized ones. Because the status check and the cancel request are not atomic, an export that finishes between them may have its artifact irreversibly deleted- Deleting a project or dataset is a soft delete to trash, restorable for 30 days. Deleting a project reports the cascade count; deleting a dataset moves its images and annotations with it and leaves models trained on it unaffected
- Ambiguous project or dataset refs fail instead of guessing
- Undeclared tool arguments fail instead of being silently ignored
- Signed upload and download URLs do not forward
Authorization - Local upload tools,
model_predictwithfile_path, anddeployment_predictread files from the MCP client host; approve calls only for paths you expect to share with Ultralytics model_downloadwrites to the requested local path; reviewoutput_pathandoverwritebefore approving- Adding a named YOLO ZIP (with
data.yamlclass names) to an existing dataset imports its labels and merges classes - Re-ingest does not re-label images already in the dataset (use the annotation editor); re-uploading the same image under a different split can create a duplicate
Troubleshooting
Invalid API key
ULTRALYTICS_API_KEY must start with ul_ and contain exactly 40 hex
characters after the prefix.
Server not loading
Run claude mcp list or codex mcp list, then verify that npx and Node.js
are installed and that ULTRALYTICS_API_KEY reached the client — passed with
--env when adding the server, or set in ~/.codex/config.toml. In Claude
Code, claude mcp get ultralytics shows the resolved config.
To smoke-test the server on its own:
If the command exits immediately with a config error, fix the environment first.
Platform API errors
For authentication, rate-limit, or endpoint behavior, compare against the official Ultralytics Platform REST API docs. When asking for help, include the tool name, request summary, response status, redacted response body, and a minimal reproduction. Do not include real API keys, signed URLs, private dataset contents, or private model artifacts.
Contributing
See CONTRIBUTING.md for setup, the check suite, and the live smoke test.
来源:README.md,提交 f99f595
工具
0版本历史
1- v0.1.14最新Oct 2, 2026


