ultralytics-mcp 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,11 +19,9 @@ dataset uploads.
19
19
  - [Get API Key](#get-api-key)
20
20
  - [Environment Variables](#environment-variables)
21
21
  - [Installation](#installation)
22
- - [Claude Code](#claude-code)
23
- - [Codex](#codex)
24
22
  - [Verify Setup](#verify-setup)
25
23
  - [What You Can Do](#what-you-can-do)
26
- - [Tools](#tools-27)
24
+ - [Tools](#tools)
27
25
  - [Safety](#safety)
28
26
  - [Troubleshooting](#troubleshooting)
29
27
  - [Development](#development)
@@ -61,7 +59,7 @@ Works in many MCP clients that accept JSON stdio server definitions.
61
59
  "mcpServers": {
62
60
  "ultralytics": {
63
61
  "command": "npx",
64
- "args": ["-y", "ultralytics-mcp"],
62
+ "args": ["-y", "ultralytics-mcp@latest"],
65
63
  "env": {
66
64
  "ULTRALYTICS_API_KEY": "ul_your_api_key_here"
67
65
  }
@@ -70,12 +68,34 @@ Works in many MCP clients that accept JSON stdio server definitions.
70
68
  }
71
69
  ```
72
70
 
73
- ### Claude Code
71
+ <details>
72
+ <summary>Antigravity</summary>
73
+
74
+ Add via the Antigravity settings or by updating your configuration file:
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "ultralytics": {
80
+ "command": "npx",
81
+ "args": ["-y", "ultralytics-mcp@latest"],
82
+ "env": {
83
+ "ULTRALYTICS_API_KEY": "ul_your_api_key_here"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ </details>
91
+
92
+ <details>
93
+ <summary>Claude Code</summary>
74
94
 
75
95
  Add server with Claude Code CLI:
76
96
 
77
97
  ```bash
78
- claude mcp add ultralytics --env ULTRALYTICS_API_KEY=ul_your_api_key_here -- npx -y ultralytics-mcp
98
+ claude mcp add ultralytics --env ULTRALYTICS_API_KEY=ul_your_api_key_here -- npx -y ultralytics-mcp@latest
79
99
  ```
80
100
 
81
101
  Or add a project-scoped server in repo-root `.mcp.json`:
@@ -85,7 +105,7 @@ Or add a project-scoped server in repo-root `.mcp.json`:
85
105
  "mcpServers": {
86
106
  "ultralytics": {
87
107
  "command": "npx",
88
- "args": ["-y", "ultralytics-mcp"],
108
+ "args": ["-y", "ultralytics-mcp@latest"],
89
109
  "env": {
90
110
  "ULTRALYTICS_API_KEY": "ul_your_api_key_here"
91
111
  }
@@ -94,12 +114,22 @@ Or add a project-scoped server in repo-root `.mcp.json`:
94
114
  }
95
115
  ```
96
116
 
97
- ### Codex
117
+ </details>
118
+
119
+ <details>
120
+ <summary>Claude Desktop</summary>
121
+
122
+ Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config above.
123
+
124
+ </details>
125
+
126
+ <details>
127
+ <summary>Codex</summary>
98
128
 
99
129
  Add server with Codex CLI:
100
130
 
101
131
  ```bash
102
- codex mcp add ultralytics --env ULTRALYTICS_API_KEY=ul_your_api_key_here -- npx -y ultralytics-mcp
132
+ codex mcp add ultralytics --env ULTRALYTICS_API_KEY=ul_your_api_key_here -- npx -y ultralytics-mcp@latest
103
133
  ```
104
134
 
105
135
  Or add it directly to `~/.codex/config.toml`:
@@ -107,12 +137,62 @@ Or add it directly to `~/.codex/config.toml`:
107
137
  ```toml
108
138
  [mcp_servers.ultralytics]
109
139
  command = "npx"
110
- args = ["-y", "ultralytics-mcp"]
140
+ args = ["-y", "ultralytics-mcp@latest"]
111
141
 
112
142
  [mcp_servers.ultralytics.env]
113
143
  ULTRALYTICS_API_KEY = "ul_your_api_key_here"
114
144
  ```
115
145
 
146
+ </details>
147
+
148
+ <details>
149
+ <summary>Cursor</summary>
150
+
151
+ #### Click the button to install:
152
+
153
+ [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=ultralytics&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInVsdHJhbHl0aWNzLW1jcEBsYXRlc3QiXSwiZW52Ijp7IlVMVFJBTFlUSUNTX0FQSV9LRVkiOiJ1bF95b3VyX2FwaV9rZXlfaGVyZSJ9fQ%3D%3D)
154
+
155
+ > **Important**
156
+ > The install button writes a placeholder key. After installing, open your Cursor MCP config and replace `ul_your_api_key_here` with your Ultralytics API key, then restart Cursor.
157
+
158
+ #### Or install manually:
159
+
160
+ Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server` (or edit `~/.cursor/mcp.json` directly) and use the standard config above: `command` set to `npx`, `args` set to `["-y", "ultralytics-mcp@latest"]`, and `ULTRALYTICS_API_KEY` in `env`.
161
+
162
+ </details>
163
+
164
+ <details>
165
+ <summary>Gemini CLI</summary>
166
+
167
+ Follow the MCP install [guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#configure-the-mcp-server-in-settingsjson), use the standard config above.
168
+
169
+ </details>
170
+
171
+ <details>
172
+ <summary>VS Code / Copilot</summary>
173
+
174
+ #### Click the button to install:
175
+
176
+ [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522ultralytics%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522ultralytics-mcp%2540latest%2522%255D%252C%2522env%2522%253A%257B%2522ULTRALYTICS_API_KEY%2522%253A%2522ul_your_api_key_here%2522%257D%257D)
177
+
178
+ > **Important**
179
+ > The install button writes a placeholder key. After installing, open your VS Code MCP config and replace `ul_your_api_key_here` with your Ultralytics API key, then restart VS Code.
180
+
181
+ #### Or install manually:
182
+
183
+ Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server), use the standard config above. You can also install the server using the VS Code CLI:
184
+
185
+ ```bash
186
+ # For VS Code
187
+ code --add-mcp '{"name":"ultralytics","command":"npx","args":["-y","ultralytics-mcp@latest"],"env":{"ULTRALYTICS_API_KEY":"ul_your_api_key_here"}}'
188
+ ```
189
+
190
+ After installation, the Ultralytics MCP server will be available for use with your GitHub Copilot agent in VS Code.
191
+
192
+ </details>
193
+
194
+ These examples track latest published npm release. Restart MCP client or session after upgrading so new server process picks up latest package.
195
+
116
196
  ## Verify Setup
117
197
 
118
198
  ### Claude Code
@@ -141,65 +221,19 @@ You should see `ultralytics` in configured MCP servers.
141
221
  - Run model prediction from image URL or base64 input
142
222
  - Download model weights to local path
143
223
  - Create exports and training jobs with explicit cost confirmation
224
+ - Pass advanced YOLO training settings through `training_start.train_args`
225
+ - Start training from existing project models or official YOLO base checkpoints
226
+
227
+ ## Tools
228
+
229
+ See [TOOLS.md](./TOOLS.md) for full parameter reference, safety notes, local-path behavior, and examples for tricky tools.
144
230
 
145
- ## Tools (27)
146
-
147
- ### Projects (5 tools)
148
-
149
- | Tool | Description |
150
- | --- | --- |
151
- | `projects_list` | List projects in your Ultralytics workspace |
152
- | `projects_get` | Get one project by id, slug, `username/slug`, or `ul://` |
153
- | `projects_create` | Create a new project |
154
- | `projects_delete` | Soft-delete a project |
155
- | `explore_projects` | Search public projects on Ultralytics Explore |
156
-
157
- ### Datasets (12 tools)
158
-
159
- | Tool | Description |
160
- | --- | --- |
161
- | `datasets_list` | List datasets in your Ultralytics workspace |
162
- | `datasets_get` | Get one dataset by id, slug, `username/slug`, or `ul://` |
163
- | `datasets_create` | Create a new dataset |
164
- | `datasets_delete` | Soft-delete a dataset |
165
- | `dataset_images_list` | List images in a dataset with optional filters |
166
- | `dataset_ingest` | Start a remote ingest job from a source URL |
167
- | `dataset_upload_file` | Upload a local archive file for dataset ingest |
168
- | `dataset_upload_folder` | Upload a local image folder for dataset ingest |
169
- | `dataset_upload_video` | Upload a local video by extracting frames for dataset ingest |
170
- | `dataset_export` | Get an export link for latest or frozen dataset version |
171
- | `dataset_version_create` | Create a frozen dataset version snapshot |
172
- | `explore_datasets` | Search public datasets on Ultralytics Explore |
173
-
174
- ### Models (4 tools)
175
-
176
- | Tool | Description |
177
- | --- | --- |
178
- | `models_list` | List trained models and summary metrics |
179
- | `models_get` | Get one model and its details |
180
- | `model_predict` | Run inference from an image URL or base64 input |
181
- | `model_download` | Download a model weight file to a local path |
182
-
183
- ### Training (2 tools)
184
-
185
- | Tool | Description |
186
- | --- | --- |
187
- | `training_monitor` | Inspect status, progress, latest metrics, and optional history |
188
- | `training_start` | Start a cloud training job with explicit cost confirmation |
189
-
190
- ### Exports (3 tools)
191
-
192
- | Tool | Description |
193
- | --- | --- |
194
- | `exports_list` | List export jobs |
195
- | `export_status` | Check export job status |
196
- | `export_create` | Create an export job with explicit cost confirmation |
197
-
198
- ### Infrastructure (1 tool)
199
-
200
- | Tool | Description |
201
- | --- | --- |
202
- | `gpu_availability` | Check cloud GPU availability |
231
+ - Projects: 5 tools
232
+ - Datasets: 12 tools
233
+ - Models: 4 tools
234
+ - Training: 2 tools
235
+ - Exports: 3 tools
236
+ - Infrastructure: 1 tool
203
237
 
204
238
  ## Safety
205
239
 
@@ -207,6 +241,8 @@ You should see `ultralytics` in configured MCP servers.
207
241
  - `training_start` requires `confirm_cost: true`
208
242
  - Ambiguous project or dataset refs fail instead of guessing
209
243
  - Signed upload and download URLs do not forward `Authorization`
244
+ - Local upload tools read files from the MCP client host; approve calls only for paths you expect to share with Ultralytics
245
+ - `model_download` writes to the requested local path; review `output_path` and `overwrite` before approving
210
246
 
211
247
  ## Troubleshooting
212
248
 
@@ -231,7 +267,7 @@ characters after prefix.
231
267
  ### Manual server smoke test
232
268
 
233
269
  ```bash
234
- ULTRALYTICS_API_KEY=ul_your_api_key_here npx -y ultralytics-mcp
270
+ ULTRALYTICS_API_KEY=ul_your_api_key_here npx -y ultralytics-mcp@latest
235
271
  ```
236
272
 
237
273
  If command exits immediately with config error, fix environment first.
@@ -243,4 +279,5 @@ npm install
243
279
  npm run check
244
280
  npm test
245
281
  npm run build
282
+ npm run generate:tools
246
283
  ```