fathom-mcp 0.2.3 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -1,12 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1 (2026-02-26)
4
+
5
+ - **Agent type registration** — init wizard sends primary agent type when registering workspace with server
6
+ - **Terminal bypass_permissions** — respects per-workspace session settings instead of always forcing bypass
7
+
3
8
  ## 0.2.0 (2026-02-26)
4
9
 
5
10
  Multi-agent support.
6
11
 
7
12
  - **Multi-agent init wizard** — auto-detects installed agents and generates per-agent MCP configs
8
- - **Supported agents:** Claude Code, OpenAI Codex, Gemini CLI, Cursor, VS Code Copilot, Windsurf
9
- - **Per-agent config writers** — `.mcp.json`, `.codex/config.toml`, `.gemini/settings.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `~/.codeium/windsurf/mcp_config.json`
13
+ - **Supported agents:** Claude Code, OpenAI Codex, Gemini CLI, OpenCode
14
+ - **Per-agent config writers** — `.mcp.json`, `.codex/config.toml`, `.gemini/settings.json`, `opencode.json`
15
+ - **Agent instructions boilerplate** — `fathom-agents.md` template for memory discipline, vault conventions, cross-workspace communication
10
16
  - **Conditional hooks** — hook setup only for Claude Code (other agents don't support hooks)
11
17
  - **`agents` array** replaces legacy `architecture` string in `.fathom.json` — backward compatible
12
18
  - **Server-side agent dispatch** — persistent sessions launch the correct agent CLI per workspace
package/README.md CHANGED
@@ -18,9 +18,7 @@ MCP server for [Fathom](https://hifathom.com) — vault operations, search, room
18
18
  | **Claude Code** | `.mcp.json` | `.claude/` directory |
19
19
  | **OpenAI Codex** | `.codex/config.toml` | `.codex/` directory |
20
20
  | **Gemini CLI** | `.gemini/settings.json` | `.gemini/` directory |
21
- | **Cursor** | `.cursor/mcp.json` | `.cursor/` directory |
22
- | **VS Code Copilot** | `.vscode/mcp.json` | `.vscode/` directory |
23
- | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` | `~/.codeium/windsurf/` directory |
21
+ | **OpenCode** | `opencode.json` | `opencode.json` file |
24
22
 
25
23
  The init wizard auto-detects which agents you have and generates the right config for each.
26
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fathom-mcp",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "description": "MCP server for Fathom — vault operations, search, rooms, and cross-workspace communication",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,9 +40,7 @@
40
40
  "claude",
41
41
  "codex",
42
42
  "gemini",
43
- "cursor",
44
- "copilot",
45
- "windsurf",
43
+ "opencode",
46
44
  "ai-agent",
47
45
  "memory"
48
46
  ]
package/src/cli.js CHANGED
@@ -10,7 +10,6 @@
10
10
  */
11
11
 
12
12
  import fs from "fs";
13
- import os from "os";
14
13
  import path from "path";
15
14
  import readline from "readline";
16
15
  import { fileURLToPath } from "url";
@@ -157,42 +156,20 @@ function writeGeminiJson(cwd) {
157
156
  return ".gemini/settings.json";
158
157
  }
159
158
 
160
- function writeCursorJson(cwd) {
161
- const dir = path.join(cwd, ".cursor");
162
- fs.mkdirSync(dir, { recursive: true });
163
- const filePath = path.join(dir, "mcp.json");
164
- const existing = readJsonFile(filePath) || {};
165
- deepMerge(existing, { mcpServers: { "fathom-vault": MCP_SERVER_ENTRY } });
166
- writeJsonFile(filePath, existing);
167
- return ".cursor/mcp.json";
168
- }
169
-
170
- function writeVscodeJson(cwd) {
171
- const dir = path.join(cwd, ".vscode");
172
- fs.mkdirSync(dir, { recursive: true });
173
- const filePath = path.join(dir, "mcp.json");
159
+ function writeOpencodeJson(cwd) {
160
+ const filePath = path.join(cwd, "opencode.json");
174
161
  const existing = readJsonFile(filePath) || {};
175
162
  deepMerge(existing, {
176
- servers: {
163
+ mcp: {
177
164
  "fathom-vault": {
178
- type: "stdio",
179
- command: "npx",
180
- args: ["-y", "fathom-mcp"],
165
+ type: "local",
166
+ command: ["npx", "-y", "fathom-mcp"],
167
+ enabled: true,
181
168
  },
182
169
  },
183
170
  });
184
171
  writeJsonFile(filePath, existing);
185
- return ".vscode/mcp.json";
186
- }
187
-
188
- function writeWindsurfJson(_cwd) {
189
- const dir = path.join(os.homedir(), ".codeium", "windsurf");
190
- fs.mkdirSync(dir, { recursive: true });
191
- const filePath = path.join(dir, "mcp_config.json");
192
- const existing = readJsonFile(filePath) || {};
193
- deepMerge(existing, { mcpServers: { "fathom-vault": MCP_SERVER_ENTRY } });
194
- writeJsonFile(filePath, existing);
195
- return "~/.codeium/windsurf/mcp_config.json";
172
+ return "opencode.json";
196
173
  }
197
174
 
198
175
  const AGENTS = {
@@ -217,31 +194,17 @@ const AGENTS = {
217
194
  hasHooks: false,
218
195
  nextSteps: "Run `gemini` in this directory — fathom tools load automatically.",
219
196
  },
220
- "cursor": {
221
- name: "Cursor",
222
- detect: (cwd) => fs.existsSync(path.join(cwd, ".cursor")),
223
- configWriter: writeCursorJson,
224
- hasHooks: false,
225
- nextSteps: "Restart Cursor — fathom tools appear in MCP settings.",
226
- },
227
- "vscode": {
228
- name: "VS Code Copilot",
229
- detect: (cwd) => fs.existsSync(path.join(cwd, ".vscode")),
230
- configWriter: writeVscodeJson,
231
- hasHooks: false,
232
- nextSteps: "Reload VS Code — fathom tools appear in Copilot.",
233
- },
234
- "windsurf": {
235
- name: "Windsurf",
236
- detect: () => fs.existsSync(path.join(os.homedir(), ".codeium", "windsurf")),
237
- configWriter: writeWindsurfJson,
197
+ "opencode": {
198
+ name: "OpenCode",
199
+ detect: (cwd) => fs.existsSync(path.join(cwd, "opencode.json")),
200
+ configWriter: writeOpencodeJson,
238
201
  hasHooks: false,
239
- nextSteps: "Restart Windsurf — fathom tools appear in Cascade.",
202
+ nextSteps: "Run `opencode` in this directory — fathom tools load automatically.",
240
203
  },
241
204
  };
242
205
 
243
206
  // Exported for testing
244
- export { AGENTS, writeMcpJson, writeCodexToml, writeGeminiJson, writeCursorJson, writeVscodeJson, writeWindsurfJson };
207
+ export { AGENTS, writeMcpJson, writeCodexToml, writeGeminiJson, writeOpencodeJson };
245
208
 
246
209
  // --- Init wizard -------------------------------------------------------------
247
210
 
@@ -447,6 +410,7 @@ async function runInit() {
447
410
  vault,
448
411
  description,
449
412
  agents: selectedAgents,
413
+ type: selectedAgents[0] || "local",
450
414
  });
451
415
  if (regResult.ok) {
452
416
  console.log(` ✓ Registered workspace "${workspace}" with server`);
@@ -104,11 +104,12 @@ export function createClient(config) {
104
104
  return request("GET", "/api/workspaces/profiles");
105
105
  }
106
106
 
107
- async function registerWorkspace(name, projectPath, { vault, description, agents, architecture } = {}) {
107
+ async function registerWorkspace(name, projectPath, { vault, description, agents, architecture, type } = {}) {
108
108
  const body = { name, path: projectPath };
109
109
  if (vault) body.vault = vault;
110
110
  if (description) body.description = description;
111
111
  if (agents && agents.length > 0) body.agents = agents;
112
+ if (type) body.type = type;
112
113
  // Legacy fallback
113
114
  if (architecture && !agents?.length) body.architecture = architecture;
114
115
  return request("POST", "/api/workspaces", { body });