@octen.ai/cli 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -568,11 +568,11 @@ octen configure-mcp --claude-code --cursor
568
568
  octen configure-mcp --all --pin 0.2.1
569
569
  ```
570
570
 
571
- Supported clients: Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex.
571
+ Supported clients: Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex, Devin (Devin CLI and Devin Desktop).
572
572
 
573
573
  Only clients detected as installed are configured; `--all` skips the rest, and an explicitly-named client that isn't detected is skipped unless you pass `--force`.
574
574
 
575
- Options: `--all`, `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--scope` (user|project), `--pin <version>`, `--force` (configure even if the client is not detected).
575
+ Options: `--all`, `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--devin`, `--scope` (user|project), `--pin <version>`, `--force` (configure even if the client is not detected).
576
576
 
577
577
  Run without flags to print current status for each client.
578
578
 
@@ -586,6 +586,7 @@ than a silent fall back to `user`:
586
586
  | Codex | `$HOME/.codex/config.toml` | `<project>/.codex/config.toml` |
587
587
  | Cursor | `$HOME/.cursor/mcp.json` | `<project>/.cursor/mcp.json` |
588
588
  | VS Code | `<project>/.vscode/mcp.json` | `<project>/.vscode/mcp.json` |
589
+ | Devin | `$HOME/.config/devin/mcp_config.json` (`$XDG_CONFIG_HOME/devin/` when set; Windows: `%APPDATA%\devin\`) | `<project>/.devin/mcp_config.local.json` |
589
590
  | Claude Code, Claude Desktop, Windsurf | user config only | same as user |
590
591
 
591
592
  Codex reads a project-level `.codex/config.toml` only in a repository it has
@@ -593,6 +594,18 @@ been told to trust, so a project-scoped entry stays inert until you trust the
593
594
  directory in Codex. `--scope status` and `reset --scope project` read and remove
594
595
  from the same project file.
595
596
 
597
+ Devin CLI and Devin Local in Devin Desktop read the same files; Devin CLI v3000.3
598
+ (Devin Local 3.6) or later is required, since earlier versions read MCP servers
599
+ from `config.json` instead. For Devin the
600
+ entry points at the hosted server (`https://mcp.octen.ai/mcp` with an `x-api-key`
601
+ header), so it needs no local Node.js, and `--pin` does not apply. Without a key
602
+ it writes `${env:OCTEN_API_KEY}`, which Devin reads from its environment. The
603
+ project scope writes Devin's personal `.devin/mcp_config.local.json` rather than
604
+ the shared `.devin/mcp_config.json`, and always with `${env:OCTEN_API_KEY}` instead
605
+ of the key, because the file can be committed until Devin has excluded it from
606
+ git; export `OCTEN_API_KEY` in the shell you start Devin from. For Devin Cloud,
607
+ add the server in the web app instead (Customize → MCPs).
608
+
596
609
  #### Codex cold start
597
610
 
598
611
  On a machine that has never run `octen-mcp`, `npx -y octen-mcp` has to fetch
@@ -683,7 +696,7 @@ octen reset --skills --claude-code
683
696
  octen reset --credentials
684
697
  ```
685
698
 
686
- Options: `--all` (both surfaces, all clients), `--mcp`, `--skills`, `--credentials`, plus per-client flags: `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--openclaw`, `--hermes`, `--scope` (user|project).
699
+ Options: `--all` (both surfaces, all clients), `--mcp`, `--skills`, `--credentials`, plus per-client flags: `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--devin`, `--openclaw`, `--hermes`, `--scope` (user|project).
687
700
 
688
701
  `--credentials` is **not** included in `--all` — `--all`'s existing meaning is "both
689
702
  surfaces (MCP + skills) across all clients", and folding in the login credential would mean
@@ -1,6 +1,6 @@
1
1
  import os from "node:os";
2
2
  import pc from "picocolors";
3
- import { MCP_CLIENTS } from "../mcp/clients.js";
3
+ import { HOSTED_MCP_URL, MCP_CLIENTS } from "../mcp/clients.js";
4
4
  import { installMcp } from "../mcp/install.js";
5
5
  import { mcpStatus } from "../mcp/detect.js";
6
6
  import { resolveApiKey } from "../config/resolve.js";
@@ -20,6 +20,7 @@ export function registerConfigureMcp(program, internal = {}) {
20
20
  .option("--windsurf", "configure Windsurf")
21
21
  .option("--vscode", "configure VS Code")
22
22
  .option("--codex", "configure Codex")
23
+ .option("--devin", "configure Devin (CLI and Devin Desktop)")
23
24
  .option("--scope <s>", "config scope: user | project (default: user)", parseScopeOpt("--scope"), "user")
24
25
  .option("--pin <ver>", "pin octen-mcp to a specific version, e.g. 0.2.1")
25
26
  .option("--force", "configure even if the client is not detected")
@@ -45,6 +46,7 @@ export function registerConfigureMcp(program, internal = {}) {
45
46
  windsurf: "windsurf",
46
47
  vscode: "vscode",
47
48
  codex: "codex",
49
+ devin: "devin",
48
50
  };
49
51
  const anySelected = opts.all ||
50
52
  opts.claudeCode ||
@@ -52,7 +54,8 @@ export function registerConfigureMcp(program, internal = {}) {
52
54
  opts.claudeDesktop ||
53
55
  opts.windsurf ||
54
56
  opts.vscode ||
55
- opts.codex;
57
+ opts.codex ||
58
+ opts.devin;
56
59
  if (!anySelected) {
57
60
  // STATUS MODE: print status for each client
58
61
  for (const client of MCP_CLIENTS) {
@@ -89,6 +92,12 @@ export function registerConfigureMcp(program, internal = {}) {
89
92
  args: ["-y", pin ? `octen-mcp@${pin}` : "octen-mcp"],
90
93
  env: { OCTEN_API_KEY: key },
91
94
  };
95
+ // Hosted clients reach mcp.octen.ai directly. Devin expands ${env:VAR}, not ${VAR}, in headers.
96
+ // A project file can be committed, so it never gets the key itself.
97
+ const envRef = (c) => c.hosted && (keyMissing || scope === "project");
98
+ const entryFor = (c) => c.hosted
99
+ ? { url: HOSTED_MCP_URL, headers: { "x-api-key": envRef(c) ? "${env:OCTEN_API_KEY}" : key } }
100
+ : entry;
92
101
  // Determine which clients to act on, gated by detection.
93
102
  let selected;
94
103
  if (opts.all) {
@@ -121,10 +130,13 @@ export function registerConfigureMcp(program, internal = {}) {
121
130
  process.stdout.write("no installed clients to configure\n");
122
131
  return;
123
132
  }
133
+ if (pin && selected.some((c) => c.hosted)) {
134
+ process.stderr.write(`note: --pin does not apply to ${selected.filter((c) => c.hosted).map((c) => c.label).join(", ")}, which use the hosted server\n`);
135
+ }
124
136
  let anyFailed = false;
125
137
  for (const client of selected) {
126
138
  try {
127
- const result = installMcp(client, scope, entry, home, cwd, installOpts);
139
+ const result = installMcp(client, scope, entryFor(client), home, cwd, installOpts);
128
140
  if (result.method === "claude-cli") {
129
141
  process.stdout.write(`${client.label}: configured via claude CLI\n`);
130
142
  }
@@ -144,5 +156,8 @@ export function registerConfigureMcp(program, internal = {}) {
144
156
  if (keyMissing) {
145
157
  process.stderr.write("warning: no API key found — set OCTEN_API_KEY in each client's environment\n");
146
158
  }
159
+ else if (scope === "project" && selected.some((c) => c.hosted)) {
160
+ process.stderr.write(`note: ${selected.filter((c) => c.hosted).map((c) => c.label).join(", ")} project config references \${env:OCTEN_API_KEY} instead of the key; export OCTEN_API_KEY in the shell you start it from\n`);
161
+ }
147
162
  });
148
163
  }
@@ -15,6 +15,7 @@ const CLIENT_FLAG_MAP = {
15
15
  windsurf: "windsurf",
16
16
  vscode: "vscode",
17
17
  codex: "codex",
18
+ devin: "devin",
18
19
  openclaw: "openclaw",
19
20
  hermes: "hermes",
20
21
  };
@@ -32,6 +33,7 @@ export function registerReset(program, internal = {}) {
32
33
  .option("--windsurf", "target Windsurf")
33
34
  .option("--vscode", "target VS Code")
34
35
  .option("--codex", "target Codex")
36
+ .option("--devin", "target Devin")
35
37
  .option("--openclaw", "target OpenClaw")
36
38
  .option("--hermes", "target Hermes")
37
39
  .option("--scope <s>", "config scope: user | project (default: user)", parseScopeOpt("--scope"), "user")
@@ -1,9 +1,15 @@
1
1
  export type McpFormat = "json-mcpServers" | "json-servers" | "toml" | "claude-code";
2
+ /** Octen's hosted MCP server, for clients configured with it instead of a local npx server. */
3
+ export declare const HOSTED_MCP_URL = "https://mcp.octen.ai/mcp";
2
4
  export interface McpClient {
3
- id: "claude-code" | "claude-desktop" | "cursor" | "windsurf" | "vscode" | "codex";
5
+ id: "claude-code" | "claude-desktop" | "cursor" | "windsurf" | "vscode" | "codex" | "devin";
4
6
  label: string;
5
7
  format: McpFormat;
6
8
  supportsProject: boolean;
7
- pathFor(scope: "user" | "project", home: string, cwd: string): string;
9
+ /** Configure the hosted server (url + x-api-key header) rather than `npx octen-mcp`. */
10
+ hosted?: boolean;
11
+ pathFor(scope: "user" | "project", home: string, cwd: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): string;
8
12
  }
13
+ /** Devin's user config directory: %APPDATA%\devin on Windows, else $XDG_CONFIG_HOME/devin or ~/.config/devin. */
14
+ export declare function devinConfigDir(home: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): string;
9
15
  export declare const MCP_CLIENTS: McpClient[];
@@ -1,4 +1,13 @@
1
- import { join } from "node:path";
1
+ import { isAbsolute, join, win32 } from "node:path";
2
+ /** Octen's hosted MCP server, for clients configured with it instead of a local npx server. */
3
+ export const HOSTED_MCP_URL = "https://mcp.octen.ai/mcp";
4
+ /** Devin's user config directory: %APPDATA%\devin on Windows, else $XDG_CONFIG_HOME/devin or ~/.config/devin. */
5
+ export function devinConfigDir(home, platform = process.platform, env = process.env) {
6
+ if (platform === "win32")
7
+ return win32.join(env.APPDATA ?? win32.join(home, "AppData", "Roaming"), "devin");
8
+ const xdg = env.XDG_CONFIG_HOME;
9
+ return xdg && isAbsolute(xdg) ? join(xdg, "devin") : join(home, ".config/devin");
10
+ }
2
11
  export const MCP_CLIENTS = [
3
12
  {
4
13
  id: "claude-code",
@@ -59,4 +68,20 @@ export const MCP_CLIENTS = [
59
68
  : join(home, ".codex/config.toml");
60
69
  },
61
70
  },
71
+ {
72
+ id: "devin",
73
+ label: "Devin",
74
+ format: "json-mcpServers",
75
+ // Devin CLI and Devin Local (in Devin Desktop) read the same files:
76
+ // https://docs.devin.ai/cli/extensibility/mcp/configuration
77
+ // Project scope uses the personal local file; configure-mcp puts only an env reference there.
78
+ supportsProject: true,
79
+ hosted: true,
80
+ pathFor(scope, home, cwd, platform, env) {
81
+ if (scope === "project")
82
+ return join(cwd, ".devin/mcp_config.local.json");
83
+ const dir = devinConfigDir(home, platform, env);
84
+ return (platform ?? process.platform) === "win32" ? win32.join(dir, "mcp_config.json") : join(dir, "mcp_config.json");
85
+ },
86
+ },
62
87
  ];
@@ -1,4 +1,13 @@
1
1
  import type { McpClient } from "./clients.js";
2
+ export type StdioEntry = {
3
+ command: string;
4
+ args: string[];
5
+ env: Record<string, string>;
6
+ };
7
+ export type HostedEntry = {
8
+ url: string;
9
+ headers: Record<string, string>;
10
+ };
2
11
  export interface InstallOpts {
3
12
  /** Override claude-CLI availability detection for testing */
4
13
  hasClaudeCli?: boolean;
@@ -12,9 +21,5 @@ export interface RemoveResult {
12
21
  removed: boolean;
13
22
  method: "claude-cli" | "file";
14
23
  }
15
- export declare function installMcp(client: McpClient, scope: "user" | "project", entry: {
16
- command: string;
17
- args: string[];
18
- env: Record<string, string>;
19
- }, home: string, cwd: string, opts?: InstallOpts): InstallResult;
24
+ export declare function installMcp(client: McpClient, scope: "user" | "project", entry: StdioEntry | HostedEntry, home: string, cwd: string, opts?: InstallOpts): InstallResult;
20
25
  export declare function removeMcp(client: McpClient, scope: "user" | "project", home: string, cwd: string, opts?: InstallOpts): RemoveResult;
@@ -12,7 +12,7 @@ function claudeAvailable(override) {
12
12
  }
13
13
  }
14
14
  export function installMcp(client, scope, entry, home, cwd, opts = {}) {
15
- if (client.id === "claude-code") {
15
+ if (client.id === "claude-code" && "command" in entry) {
16
16
  const apiKey = entry.env["OCTEN_API_KEY"] ?? "";
17
17
  // A real key must never reach another process's argv: `ps -ww` and
18
18
  // /proc/<pid>/cmdline expose it to every local user for the child's
package/dist/mcp/write.js CHANGED
@@ -9,9 +9,8 @@ import { writeSecretFile } from "../util/secretFile.js";
9
9
  * becomes a secret-bearing file.
10
10
  */
11
11
  function carriesLiteralSecret(entry) {
12
- const env = entry.env;
13
- const value = env?.["OCTEN_API_KEY"];
14
- return typeof value === "string" && value !== "" && !value.startsWith("${");
12
+ const { env, headers } = entry;
13
+ return [env?.["OCTEN_API_KEY"], headers?.["x-api-key"]].some((value) => typeof value === "string" && value !== "" && !value.startsWith("${"));
15
14
  }
16
15
  function assertNever(x) {
17
16
  throw new Error(`unhandled McpFormat: ${String(x)}`);
@@ -2,6 +2,7 @@ import { execFileSync } from "node:child_process";
2
2
  import { existsSync } from "node:fs";
3
3
  import os from "node:os";
4
4
  import { join } from "node:path";
5
+ import { devinConfigDir } from "../mcp/clients.js";
5
6
  /** Returns true if `bin` is resolvable on PATH (via `which`). */
6
7
  function binOnPath(bin) {
7
8
  try {
@@ -55,6 +56,11 @@ export function isClientInstalled(id, opts) {
55
56
  existsSync(join(home, ".codeium/windsurf")));
56
57
  case "vscode":
57
58
  return binOnPath("code") || appExists("Visual Studio Code");
59
+ case "devin":
60
+ // Only files Devin creates; configure-mcp --force itself writes mcp_config.json there.
61
+ return (binOnPath("devin") ||
62
+ existsSync(join(devinConfigDir(home), "config.json")) ||
63
+ existsSync(join(home, ".local/share/devin")));
58
64
  default:
59
65
  // Unknown id — don't block.
60
66
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octen.ai/cli",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "description": "Command-line tool for Octen — web search, extract, chat, embeddings, and one-command MCP/Skills setup.",
5
5
  "type": "module",
6
6
  "license": "MIT",