diff --git a/README.md b/README.md index df67978d3e3..85d94682b2f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/packages/opencode/src/kilocode/docs/migration.md b/packages/opencode/src/kilocode/docs/migration.md index acdc92b0b9c..3eed0b5a532 100644 --- a/packages/opencode/src/kilocode/docs/migration.md +++ b/packages/opencode/src/kilocode/docs/migration.md @@ -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 | | ----------------------------------------------------------- | ------------------------- |