mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-10-30 19:32:39 +08:00
docs: add MCP config file path (~/.config/kilo/opencode.json) (#319)
* docs: add MCP config file path (~/.config/kilo/opencode.json) - README: state where MCP is configured and format (mcp object, type local, command array) - migration.md: add config file location section for macOS/Linux/Windows and format * docs(mcp): align with code — path, filenames, schema refs - README: mention opencode.jsonc; optional fields (environment, enabled, timeout); link to global/index.ts and config.ts McpLocal - migration.md: document config load order (config.json, opencode.json, opencode.jsonc); Windows note (xdg-basedir); Config.McpLocal and file refs
This commit is contained in:
@@ -59,6 +59,8 @@ If you're coming from the Kilo Code VS Code extension, your configurations are a
|
||||
| Workflows (`.kilocode/workflows/`) | Converted to commands |
|
||||
| MCP servers | Migrated to `mcp` config |
|
||||
|
||||
MCP servers are configured in **`~/.config/kilo/opencode.json`** (or `opencode.jsonc`; on Windows the config directory may be under `%USERPROFILE%` depending on your environment). Use a top-level `"mcp"` object: each key is a server name, value is `type: "local"` and `command: ["executable", "arg1", ...]`. Optional per-server: `environment`, `enabled`, `timeout`. Restart the CLI after editing for changes to take effect. (Path from [`packages/opencode/src/global/index.ts`](packages/opencode/src/global/index.ts); schema in [`config.ts`](packages/opencode/src/config/config.ts) `McpLocal`.)
|
||||
|
||||
**Default mode mappings:**
|
||||
|
||||
- `code` → `build` agent
|
||||
|
||||
@@ -333,7 +333,16 @@ Kilocode workflows are migrated to Opencode commands. See [`workflows-migrator.t
|
||||
|
||||
Kilocode MCP server configurations are migrated to Opencode's `mcp` config. See [`mcp-migrator.ts`](../mcp-migrator.ts).
|
||||
|
||||
## Source Location
|
||||
## Config file location
|
||||
|
||||
The CLI reads global config from `~/.config/kilo/` (see [`global/index.ts`](../../global/index.ts): `Global.Path.config` = `xdgConfig` + `"kilo"`). It merges, in order, `config.json`, `opencode.json`, and `opencode.jsonc` in that directory. You can put MCP config in **`opencode.json`** or **`opencode.jsonc`**.
|
||||
|
||||
- **macOS / Linux:** `~/.config/kilo/opencode.json` (or `opencode.jsonc`)
|
||||
- **Windows:** Config directory depends on `xdg-basedir` (often under `%LOCALAPPDATA%` or `%USERPROFILE%`); filename is still `opencode.json` or `opencode.jsonc`.
|
||||
|
||||
Use a top-level `"mcp"` object. Each key is the server name. For a local server, value must have `type: "local"` and `command: ["executable", "arg1", ...]`. Optional: `environment` (env vars), `enabled` (boolean), `timeout` (ms). See `Config.McpLocal` in [`config.ts`](../../config/config.ts). Restart the CLI after editing.
|
||||
|
||||
## Source Location (migration from Kilocode)
|
||||
|
||||
| Location | Description |
|
||||
| ----------------------------------------------------------- | ------------------------- |
|
||||
|
||||
Reference in New Issue
Block a user