Skip to content

Commit 0a679ad

Browse files
devvaannshabose
authored andcommitted
feat: add shared MCP setup
1 parent e1e9f7d commit 0a679ad

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

‎.codex/config.toml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Share the repository's existing development and Phoenix testing instructions.
2+
project_doc_fallback_filenames = ["CLAUDE.md"]
3+
4+
[mcp_servers.phoenix-builder]
5+
command = "node"
6+
# Codex may start in a subdirectory. Find this checkout without machine-specific
7+
# paths or shell commands, then use the same server entry point as Claude Code.
8+
args = ["-e", '''
9+
const fs = require("node:fs");
10+
const path = require("node:path");
11+
const { pathToFileURL } = require("node:url");
12+
const entry = "phoenix-builder-mcp/index.js";
13+
let root = process.cwd();
14+
while (!fs.existsSync(path.join(root, entry))) {
15+
const parent = path.dirname(root);
16+
if (parent === root) {
17+
throw new Error("Open Codex inside the Phoenix repository to use phoenix-builder.");
18+
}
19+
root = parent;
20+
}
21+
process.chdir(root);
22+
import(pathToFileURL(path.join(root, entry)).href).catch((error) => {
23+
console.error(error);
24+
process.exit(1);
25+
});
26+
''']
27+
env_vars = ["PHOENIX_DESKTOP_PATH", "PHOENIX_MCP_WS_PORT"]
28+
# Live-preview connection and execution can take longer than the default 60s.
29+
tool_timeout_sec = 120

0 commit comments

Comments
 (0)