diff --git a/docs/features/integrations/mcp-clients.md b/docs/features/integrations/mcp-clients.md index c36a2f91185..d57b736d9f1 100644 --- a/docs/features/integrations/mcp-clients.md +++ b/docs/features/integrations/mcp-clients.md @@ -91,15 +91,15 @@ and Codex, runs their `mcp add` command: loom install --client cursor --server-url https://loom.example.com --token "$LOOM_API_KEY" ``` -| Flag | Default | Meaning | -| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `--client` | every supported client whose config directory exists (Gemini CLI: its `settings.json` or the `gemini` binary, since Google Antigravity also creates `~/.gemini/`; OpenCode: `~/.config/opencode/`) | one or more of `claude-desktop`, `claude-code`, `codex`, `cursor`, `vscode`, `cline`, `windsurf`, `zed`, `gemini`, `opencode`, `kiro` | -| `--server-url` | `LOOM_BASE_URL`, then `~/.loom/config.json`, else `http://localhost:7777` | the Loom base URL; the entry points at `/mcp` | -| `--token` | `LOOM_API_KEY`, then `~/.loom/config.json`, then `~/.loom/token` | the JWT the entry authenticates with; required | -| `--name` | `loom` | the server key in the config file, and the name `claude mcp add` / `codex mcp add` registers | -| `--toolset` | empty: `coding` for Claude Code, Codex, Cursor, Gemini CLI and OpenCode, else the server default (`LOOM_MCP_TOOLSET`) | appended as `?toolset=`; a toolset name or a `+` union of curated rosters such as `coding+tracker`; anything else is rejected before writing | -| `--dry-run` | off | print what would be written or run, touching nothing | -| `--force` | off | Claude Code only: add the user-scope entry even when the `loom` plugin is installed | +| Flag | Default | Meaning | +| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `--client` | every supported client whose config directory exists (Gemini CLI: its `settings.json` or the `gemini` binary, since Google Antigravity also creates `~/.gemini/`; OpenCode: `~/.config/opencode/`) | one or more of `claude-desktop`, `claude-code`, `codex`, `cursor`, `vscode`, `cline`, `windsurf`, `devin`, `zed`, `gemini`, `opencode`, `kiro` | +| `--server-url` | `LOOM_BASE_URL`, then `~/.loom/config.json`, else `http://localhost:7777` | the Loom base URL; the entry points at `/mcp` | +| `--token` | `LOOM_API_KEY`, then `~/.loom/config.json`, then `~/.loom/token` | the JWT the entry authenticates with; required | +| `--name` | `loom` | the server key in the config file, and the name `claude mcp add` / `codex mcp add` registers | +| `--toolset` | empty: `coding` for Claude Code, Codex, Cursor, Gemini CLI and OpenCode, else the server default (`LOOM_MCP_TOOLSET`) | appended as `?toolset=`; a toolset name or a `+` union of curated rosters such as `coding+tracker`; anything else is rejected before writing | +| `--dry-run` | off | print what would be written or run, touching nothing | +| `--force` | off | Claude Code only: add the user-scope entry even when the `loom` plugin is installed | Restart the client afterwards. Exit codes: `2` no token, `5` no client detected, `1` any client failed (the others still run). See the [CLI reference](../../reference/cli.md). @@ -118,7 +118,8 @@ that only reads can use a `viewer` token; see | `cursor` | `~/.cursor/mcp.json` | `mcpServers` | `url` + `headers` | | `vscode` | `~/.config/Code/User/mcp.json` (default Stable profile; `settings.json` is left alone); [use with Copilot](vscode.md#editor-profile-entry) | `servers` | `url` + `headers` + `type: "http"` | | `cline` | `~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` | `mcpServers` | `npx mcp-remote` bridge | -| `windsurf` | `~/.codeium/windsurf/mcp_config.json` | `mcpServers` | `url` + `headers` | +| `windsurf` | `~/.codeium/windsurf/mcp_config.json` (Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`) | `mcpServers` | `url` + `headers` | +| `devin` | `~/.config/devin/mcp_config.json` (Windows: `%APPDATA%\devin\mcp_config.json`) | `mcpServers` | `url` + `headers` | | `zed` | `~/.config/zed/settings.json` | `context_servers` | `url` + `headers` | | `gemini` | `~/.gemini/settings.json` | `mcpServers` | `httpUrl` + `headers` (Gemini CLI reads streamable HTTP from `httpUrl`) | | `opencode` | `~/.config/opencode/opencode.json`, or `opencode.jsonc` when that is the file there (`$OPENCODE_CONFIG_DIR` or `$XDG_CONFIG_HOME/opencode` when set) | `mcp.servers` | `type: "remote"` + `url` + `headers` | @@ -276,7 +277,7 @@ reload the client afterwards. | Kilo Code (extension and CLI) | `kilo.jsonc` in the project, or `~/.config/kilo/kilo.jsonc` | `{"mcp": {"loom": {"type": "remote", "url": "URL", "headers": {…}}}}` | connected (CLI) | | [Cline CLI](#use-shared-memory-in-cline-cli) | `~/.cline/data/settings/cline_mcp_settings.json` | `cline mcp add loom URL --transport http --header "Authorization: Bearer " --yes` (the Cline extension: [`loom install`](#what-it-writes-per-client)) | verified read | | Google Antigravity | `~/.gemini/config/mcp_config.json`, or `.agents/mcp_config.json` in the workspace | `{"mcpServers": {"loom": {"serverUrl": "URL", "headers": {…}}}}` (`url` also works) | | -| Devin Desktop and Devin CLI | `.devin/mcp_config.local.json` in the project (git-ignored, for the token), or `~/.config/devin/mcp_config.json` | `{"mcpServers": {"loom": {"url": "URL", "transport": "http", "headers": {…}}}}` (`loom install --client windsurf` writes the older `~/.codeium/windsurf/` path) | accepted (CLI 3000.12.57 configuration only); Desktop unmeasured | +| Devin Desktop and Devin CLI | `.devin/mcp_config.local.json` in the project (git-ignored, for the token), or `~/.config/devin/mcp_config.json` | `{"mcpServers": {"loom": {"url": "URL", "transport": "http", "headers": {…}}}}` (`loom install --client devin` writes this path; `--client windsurf` writes the older `~/.codeium/windsurf/` one) | accepted (CLI 3000.12.57 configuration only); Desktop unmeasured | | Qwen Code | `~/.qwen/settings.json`, or `.qwen/settings.json` | `qwen mcp add --transport http loom URL --header "Authorization: Bearer "` | connected (`qwen mcp list`) | | Kimi Code CLI | `~/.kimi-code/mcp.json`, or `.kimi-code/mcp.json` in the working directory (read once the folder is trusted); or `/mcp-config` in the TUI | `{"mcpServers": {"loom": {"url": "URL", "headers": {…}}}}`, or `"bearerTokenEnvVar": "LOOM_API_KEY"` in place of `headers` | installed (2.5.3); MCP status unmeasured | | Grok Build | `~/.grok/config.toml`, or `.grok/config.toml`; below those it also reads a project `.mcp.json`, `~/.claude.json` and `.cursor/mcp.json`, so an existing Claude Code or Cursor entry is picked up (`[compat.claude] mcps = false` and `[compat.cursor] mcps = false` turn that off) | `grok mcp add --transport http loom URL --header "Authorization: Bearer "` | accepted (1.0.77); connection unmeasured | @@ -342,15 +343,18 @@ with `type: "streamable-http"`; use its assuming a hand-written entry is accepted by every version. `enabled` in Muse's output means configured, not connected. -Devin CLI's [native configuration](https://docs.devin.ai/cli/extensibility/mcp/configuration) -uses the dedicated user file in the table. The tested CLI also reads -`~/.codeium/windsurf/mcp_config.json` through its default -[Windsurf import](https://docs.devin.ai/cli/reference/configuration/read-config-from). -`loom install --client windsurf` writes that imported file; disabling -`read_config_from.windsurf` removes that route from Devin. The CLI check wrote a native -entry and listed distinct disabled entries from both files; it did not connect to Loom. -Current [Devin Local documentation](https://docs.devin.ai/desktop/devin-local/customizations) -describes shared CLI configuration discovery; Desktop itself was not run. +The `devin` target, `~/.config/devin/mcp_config.json`, is the user file that Devin CLI and +Devin Local read. Devin CLI's [native configuration](https://docs.devin.ai/cli/extensibility/mcp/configuration) +and the [Devin Local customizations](https://docs.devin.ai/desktop/devin-local/customizations) +both name it, so `loom install --client devin` writes that file. `loom install --client windsurf` +writes the legacy Windsurf editor's `~/.codeium/windsurf/mcp_config.json`, which the CLI still +imports by default through its [Windsurf import](https://docs.devin.ai/cli/reference/configuration/read-config-from), +so an entry written there stays until it is removed or `read_config_from.windsurf` is set to `false`. +Devin Desktop's [editor FAQ](https://docs.devin.ai/desktop/devin-desktop-faq#per-user-configuration-directory) +lists a different file, `~/.codeium/mcp_config.json`, for its per-user configuration. Do not write +the token there when following the Desktop editor configuration. Desktop itself was not run, so +that path rests on the FAQ alone. The CLI check wrote a native entry and listed distinct disabled +entries from both files; it did not connect to Loom. Kimi's `/mcp` and `/mcp-config` are TUI commands. Kimi's `doctor` does not validate its MCP file, and the tested MiniMax binary has no diff --git a/frontend/src/lib/clientSetups.fixture.json b/frontend/src/lib/clientSetups.fixture.json index 8a1fb5c18b5..96be0119ad3 100644 --- a/frontend/src/lib/clientSetups.fixture.json +++ b/frontend/src/lib/clientSetups.fixture.json @@ -112,6 +112,22 @@ "command": "", "env": {} }, + "devin": { + "config_key": "mcpServers", + "config": { + "mcpServers": { + "loom": { + "url": "http://x/mcp", + "headers": { + "Authorization": "Bearer T" + } + } + } + }, + "config_toml": "", + "command": "", + "env": {} + }, "zed": { "config_key": "context_servers", "config": { @@ -278,6 +294,22 @@ "command": "", "env": {} }, + "devin": { + "config_key": "mcpServers", + "config": { + "mcpServers": { + "loom": { + "url": "http://x/mcp?a=1", + "headers": { + "Authorization": "Bearer T" + } + } + } + }, + "config_toml": "", + "command": "", + "env": {} + }, "zed": { "config_key": "context_servers", "config": { @@ -458,6 +490,22 @@ "command": "", "env": {} }, + "devin": { + "config_key": "mcpServers", + "config": { + "mcpServers": { + "loom": { + "url": "http://x/mcp?mytoolset=x", + "headers": { + "Authorization": "Bearer T" + } + } + } + }, + "config_toml": "", + "command": "", + "env": {} + }, "zed": { "config_key": "context_servers", "config": { diff --git a/frontend/src/lib/clients.ts b/frontend/src/lib/clients.ts index 86ca092a57b..4adddbdd6ea 100644 --- a/frontend/src/lib/clients.ts +++ b/frontend/src/lib/clients.ts @@ -16,6 +16,7 @@ export type ClientId = | "vscode" | "cline" | "windsurf" + | "devin" | "zed" | "gemini" | "opencode"; @@ -33,6 +34,7 @@ export const CLIENTS: MCPClient[] = [ { id: "vscode", label: "VS Code" }, { id: "cline", label: "Cline" }, { id: "windsurf", label: "Windsurf" }, + { id: "devin", label: "Devin" }, { id: "zed", label: "Zed" }, { id: "gemini", label: "Gemini CLI" }, { id: "opencode", label: "OpenCode" }, diff --git a/server/identity/app/token_clients.py b/server/identity/app/token_clients.py index 088feb14b05..8d2bc2def15 100644 --- a/server/identity/app/token_clients.py +++ b/server/identity/app/token_clients.py @@ -54,6 +54,14 @@ "linux": "~/.codeium/windsurf/mcp_config.json", "win32": "%USERPROFILE%\\.codeium\\windsurf\\mcp_config.json", }, + # Windsurf is now Devin Desktop; its user MCP file is ~/.config/devin/mcp_config.json + # (docs.devin.ai/desktop/cascade/mcp, scope "User"). The Devin CLI reads the same file. + # The Windows location is inferred from the CLI's %APPDATA%\devin config directory. + "devin": { + "darwin": "~/.config/devin/mcp_config.json", + "linux": "~/.config/devin/mcp_config.json", + "win32": "%APPDATA%\\devin\\mcp_config.json", + }, "zed": { "darwin": "~/.config/zed/settings.json", "linux": "~/.config/zed/settings.json", diff --git a/tests/unit/snapshots/cli_help.json b/tests/unit/snapshots/cli_help.json index 7acda9d829c..d5e8fc496d9 100644 --- a/tests/unit/snapshots/cli_help.json +++ b/tests/unit/snapshots/cli_help.json @@ -590,8 +590,8 @@ "options: -h, --help show this help message and exit" ], "loom install": [ - "usage: loom install [-h] [--client {claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,zed,gemini,opencode,kiro} [{claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,zed,gemini,opencode,kiro} ...]] [--server-url SERVER_URL] [--token TOKEN] [--name NAME] [--toolset TOOLSET] [--dry-run] [--force]", - "options: -h, --help show this help message and exit --client {claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,zed,gemini,opencode,kiro} [{claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,zed,gemini,opencode,kiro} ...] Which client(s) to wire. Omit to auto-detect and wire every supported client found on this machine. --server-url SERVER_URL Loom server URL (default LOOM_BASE_URL, else http://localhost:7777). --token TOKEN JWT to embed in the client config. Defaults to LOOM_API_KEY, then ~/.loom/token. Use `loom mint-token` to generate one. --name NAME Server name: the key under mcpServers (cursor) or servers (vscode), and the name `claude mcp add` / `codex mcp add` registers. --toolset TOOLSET MCP toolset the client lists, as `?toolset=` on the URL; when omitted, `coding` for claude-code, codex, cursor, gemini, opencode, else the server default (LOOM_MCP_TOOLSET). --dry-run Print what would be written without touching the file. --force claude-code: add the user-scope MCP entry even when the loom plugin is installed (it mounts the server itself; both = every tool listed twice)." + "usage: loom install [-h] [--client {claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,devin,zed,gemini,opencode,kiro} [{claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,devin,zed,gemini,opencode,kiro} ...]] [--server-url SERVER_URL] [--token TOKEN] [--name NAME] [--toolset TOOLSET] [--dry-run] [--force]", + "options: -h, --help show this help message and exit --client {claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,devin,zed,gemini,opencode,kiro} [{claude-desktop,claude-code,codex,cursor,vscode,cline,windsurf,devin,zed,gemini,opencode,kiro} ...] Which client(s) to wire. Omit to auto-detect and wire every supported client found on this machine. --server-url SERVER_URL Loom server URL (default LOOM_BASE_URL, else http://localhost:7777). --token TOKEN JWT to embed in the client config. Defaults to LOOM_API_KEY, then ~/.loom/token. Use `loom mint-token` to generate one. --name NAME Server name: the key under mcpServers (cursor) or servers (vscode), and the name `claude mcp add` / `codex mcp add` registers. --toolset TOOLSET MCP toolset the client lists, as `?toolset=` on the URL; when omitted, `coding` for claude-code, codex, cursor, gemini, opencode, else the server default (LOOM_MCP_TOOLSET). --dry-run Print what would be written without touching the file. --force claude-code: add the user-scope MCP entry even when the loom plugin is installed (it mounts the server itself; both = every tool listed twice)." ], "loom demo": [ "usage: loom demo [-h] [--file FILE] [--question QUESTION] [--tags TAGS] [--base-url BASE_URL] [--token TOKEN] [--org ORG] [--namespace NAMESPACE] [--root ROOT] [--search-only]", diff --git a/tests/unit/snapshots/cli_tree.json b/tests/unit/snapshots/cli_tree.json index d04ecf56059..e7cf714cd64 100644 --- a/tests/unit/snapshots/cli_tree.json +++ b/tests/unit/snapshots/cli_tree.json @@ -17582,6 +17582,7 @@ "vscode", "cline", "windsurf", + "devin", "zed", "gemini", "opencode", diff --git a/tests/unit/test_cli_install.py b/tests/unit/test_cli_install.py index e5afd6c11ba..2f235d3fbeb 100644 --- a/tests/unit/test_cli_install.py +++ b/tests/unit/test_cli_install.py @@ -1788,3 +1788,26 @@ def test_install_with_no_client_wires_opencode_when_its_config_dir_exists( assert cli._cmd_install(p.parse_args(["--token", "T", "--server-url", "https://h"])) == 0 written = json.loads((tmp_path / "config" / "opencode" / "opencode.json").read_text()) assert written["mcp"]["servers"]["loom"] == _opencode_entry("T") + + +@pytest.mark.parametrize("platform", ["linux", "darwin"]) +def test_windsurf_install_targets_its_own_user_file( + tmp_path, monkeypatch: pytest.MonkeyPatch, platform: str +) -> None: + monkeypatch.setenv("HOME", str(tmp_path)) + monkeypatch.setattr(sys, "platform", platform) + assert ( + cli._resolve_install_path("windsurf") + == tmp_path / ".codeium" / "windsurf" / "mcp_config.json" + ) + + +@pytest.mark.parametrize("platform", ["linux", "darwin"]) +def test_devin_install_targets_the_devin_user_file( + tmp_path, monkeypatch: pytest.MonkeyPatch, platform: str +) -> None: + """Windsurf is now Devin Desktop, whose user MCP file is ~/.config/devin/mcp_config.json + (docs.devin.ai/desktop/cascade/mcp); the Windsurf file is not read by it.""" + monkeypatch.setenv("HOME", str(tmp_path)) + monkeypatch.setattr(sys, "platform", platform) + assert cli._resolve_install_path("devin") == tmp_path / ".config" / "devin" / "mcp_config.json" diff --git a/tests/unit/test_token_mint.py b/tests/unit/test_token_mint.py index 58c1dc43ae5..29684b9ada9 100644 --- a/tests/unit/test_token_mint.py +++ b/tests/unit/test_token_mint.py @@ -114,6 +114,7 @@ async def test_the_default_token_follows_live_grants_and_drops_org_wide_roles( "vscode", "cline", "windsurf", + "devin", "zed", "gemini", "opencode",