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
@@ -848,6 +848,10 @@
848
848
"items": {
849
849
"type": "string"
850
850
}
851
+
},
852
+
"version": {
853
+
"type": "string",
854
+
"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.
351
+
352
+
### How It Works
353
+
354
+
1. When a toolset with a `command` is loaded, cagent checks if the command is available in your `PATH`
355
+
2. If not found, it checks the cagent tools directory (`~/.cagent/tools/bin/`)
356
+
3. If still not found, it looks up the command in the aqua registry and installs it automatically
357
+
358
+
### Explicit Package Reference
359
+
360
+
Use the `version` property to specify exactly which package to install:
361
+
362
+
```yaml
363
+
toolsets:
364
+
- type: mcp
365
+
command: gopls
366
+
version: "golang/tools@v0.25.0"
367
+
args: ["mcp"]
368
+
- type: lsp
369
+
command: rust-analyzer
370
+
version: "rust-lang/rust-analyzer@2024-01-01"
371
+
file_types: [".rs"]
372
+
```
373
+
374
+
The format is `owner/repo` or `owner/repo@version`. When a version is omitted, the latest release is used.
375
+
376
+
### Automatic Detection
377
+
378
+
If the `version` property is not set, cagent tries to auto-detect the package from the command name by searching the aqua registry:
379
+
380
+
```yaml
381
+
toolsets:
382
+
- type: mcp
383
+
command: gopls # auto-detected as golang/tools
384
+
args: ["mcp"]
385
+
```
386
+
387
+
### Disabling Auto-Install
388
+
389
+
You can disable auto-installation in two ways:
390
+
391
+
**Per toolset** — set `version` to `"false"` or `"off"`:
392
+
393
+
```yaml
394
+
toolsets:
395
+
- type: mcp
396
+
command: my-custom-server
397
+
version: "false"
398
+
```
399
+
400
+
**Globally** — set the `DOCKER_AGENT_AUTO_INSTALL` environment variable:
| `DOCKER_AGENT_AUTO_INSTALL` | (enabled) | Set to `false` to disable all auto-installation |
411
+
| `DOCKER_AGENT_TOOLS_DIR` | `~/.cagent/tools/` | Base directory for installed tools |
412
+
| `GITHUB_TOKEN` | — | GitHub token to raise API rate limits (optional) |
413
+
414
+
Installed binaries are placed in `~/.cagent/tools/bin/` and cached so they are only downloaded once.
415
+
416
+
<div class="callout callout-tip">
417
+
<div class="callout-title">💡 Tip
418
+
</div>
419
+
<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>
420
+
421
+
</div>
422
+
347
423
## Tool Filtering
348
424
349
425
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