You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent-schema.json
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -844,6 +844,10 @@
844
844
"items": {
845
845
"type": "string"
846
846
}
847
+
},
848
+
"version": {
849
+
"type": "string",
850
+
"description": "Package reference for auto-installation of MCP/LSP tool binaries. Format: 'owner/repo' or 'owner/repo@version'. Set to 'false' to disable auto-install for this toolset."
When configuring MCP or LSP tools that require a binary command, cagent can **automatically download and install** the command if it's not already available on your system. This uses the [aqua registry](https://github.com/aquaproj/aqua-registry) — a curated index of CLI tool packages.
350
+
351
+
### How It Works
352
+
353
+
1. When a toolset with a `command` is loaded, cagent checks if the command is available in your `PATH`
354
+
2. If not found, it checks the cagent tools directory (`~/.cagent/tools/bin/`)
355
+
3. If still not found, it looks up the command in the aqua registry and installs it automatically
356
+
357
+
### Explicit Package Reference
358
+
359
+
Use the `version` property to specify exactly which package to install:
360
+
361
+
```yaml
362
+
toolsets:
363
+
- type: mcp
364
+
command: gopls
365
+
version: "golang/tools@v0.25.0"
366
+
args: ["mcp"]
367
+
- type: lsp
368
+
command: rust-analyzer
369
+
version: "rust-lang/rust-analyzer@2024-01-01"
370
+
file_types: [".rs"]
371
+
```
372
+
373
+
The format is `owner/repo` or `owner/repo@version`. When a version is omitted, the latest release is used.
374
+
375
+
### Automatic Detection
376
+
377
+
If the `version` property is not set, cagent tries to auto-detect the package from the command name by searching the aqua registry:
378
+
379
+
```yaml
380
+
toolsets:
381
+
- type: mcp
382
+
command: gopls # auto-detected as golang/tools
383
+
args: ["mcp"]
384
+
```
385
+
386
+
### Disabling Auto-Install
387
+
388
+
You can disable auto-installation in two ways:
389
+
390
+
**Per toolset** — set `version` to `"false"` or `"off"`:
391
+
392
+
```yaml
393
+
toolsets:
394
+
- type: mcp
395
+
command: my-custom-server
396
+
version: "false"
397
+
```
398
+
399
+
**Globally** — set the `DOCKER_AGENT_AUTO_INSTALL` environment variable:
| `DOCKER_AGENT_AUTO_INSTALL` | (enabled) | Set to `false` to disable all auto-installation |
410
+
| `DOCKER_AGENT_TOOLS_DIR` | `~/.cagent/tools/` | Base directory for installed tools |
411
+
| `GITHUB_TOKEN` | — | GitHub token to raise API rate limits (optional) |
412
+
413
+
Installed binaries are placed in `~/.cagent/tools/bin/` and cached so they are only downloaded once.
414
+
415
+
<div class="callout callout-tip">
416
+
<div class="callout-title">💡 Tip
417
+
</div>
418
+
<p>Auto-install supports both Go packages (via <code>go install</code>) and GitHub release binaries (via archive download). The aqua registry metadata determines which method is used.</p>
419
+
420
+
</div>
421
+
346
422
## Tool Filtering
347
423
348
424
Toolsets may expose many tools. Use the `tools` property to whitelist only the ones your agent needs. This works for any toolset type — not just MCP:
| `version` | string | ✗ | Package reference for [auto-installing](/configuration/tools/#auto-installing-tools) the command binary (e.g., `"golang/tools@v0.25.0"`) |
47
48
48
49
## Available Tools
49
50
@@ -77,6 +78,7 @@ Here are configurations for popular languages:
77
78
toolsets:
78
79
- type: lsp
79
80
command: gopls
81
+
version: "golang/tools@v0.25.0" # optional: auto-install if not in PATH
80
82
file_types: [".go"]
81
83
```
82
84
@@ -196,9 +198,9 @@ All LSP tools use **1-based** line and character positions:
196
198
}
197
199
```
198
200
199
-
<div class="callout callout-warning">
200
-
<div class="callout-title">⚠️ Server Installation
201
+
<div class="callout callout-tip">
202
+
<div class="callout-title">💡 Auto-Installation
201
203
</div>
202
-
<p>The LSP server must be installed and available in the system PATH. docker-agent does not install LSP servers automatically. Install them using your language's package manager (e.g., <code>go install golang.org/x/tools/gopls@latest</code>).</p>
204
+
<p>docker-agent can automatically download and install LSP servers if they are not found in your PATH. Use the <code>version</code> property to specify a package, or let docker-agent auto-detect it from the command name. See <a href="/configuration/tools/#auto-installing-tools">Auto-Installing Tools</a> for details.</p>
0 commit comments