# Integration Config

## MCP config

One file: `~/.config/agenvoy/mcp.json`. The session-scoped layer was removed. Manage servers with `/mcp` in the TUI, the web dashboard, or the `/v1/mcp*` endpoints. See MCP Client for the full schema and `${VAR}` expansion behavior.

## Provider config

There are no static provider catalogs — model lists come from each provider's API, or a local endpoint's `GET /models`, when a model is added. Registered models live in `config.json` under `models` (their order is the fallback priority), tiers under `model_tag`, and custom endpoint URLs under `compats`; credentials never do, they live in the OS keychain under service `agenvoy`. A write to `config.json` reloads the agent registry without a restart. The `claude-code` provider (since v1.1.0) stores no credential — it runs the local `claude` CLI — and is enabled whenever the `claude` binary is on the daemon's `PATH` (the `agen --enable-claude-code` opt-in was Removed in v1.2.3).

### Compat provider URL storage split

`compat` provider URLs use a **two-storage** model:

| What | Where | Why |
|---|---|---|
| URL (e.g. `http://host:8000/v1`) | `~/.config/agenvoy/config.json` `compats[]` — `{"provider": "<NAME>", "url": "..."}` | Non-secret, user-editable |
| API key (`COMPAT_<NAME>_API_KEY`) | OS keychain | Secret |

URL convention follows Zed: the user enters the URL up to `/v1` (e.g. `http://host:8000/v1`) and the router appends `/chat/completions`. Local Ollama (`http://localhost:11434/v1`) and llama.cpp (`http://localhost:8080/v1`) are built in through `configs/jsons/local_compat.json` and need no `compats` entry. The URL is read from config, **not** the keychain — there is no `COMPAT_<NAME>_URL` keychain key (intentionally removed: a historical bug had the TUI writing to config while the runtime read the keychain, always falling back to localhost).

## KuraDB

There is no `kuradb_enabled` flag and no `/v1/kuradb` endpoint. KuraDB is registered as an ordinary MCP server — one entry in `mcp.json` — so its tools arrive under `mcp__kura__*` and vanish when it is unregistered or disconnected. The `/kuradb` TUI wizard was removed in v0.35.0: run `kuradb.sh` yourself (it needs a real TTY for `sudo`), then register through `/mcp`. See KuraDB RAG for the full picture.

| Key | Location |
|---|---|
| `kura` server entry | `~/.config/agenvoy/mcp.json` — `{"command": "kura", "args": ["mcp"]}` |
| `OPENAI_API_KEY` | keychain (`agenvoy` service) — shared with semantic search |
| Binary | `kura` on `PATH` (`/usr/local/bin/kura`, from `kuradb.sh`) |
| KuraDB's own config / data | `~/.config/kuradb/`, managed entirely by KuraDB |
