diff --git a/README.md b/README.md index 41dac75..7f0ee00 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ Now just run `oc` to start OpenCode with Claude Max. |---------------------|---------|-------------| | `CLAUDE_PROXY_PORT` | 3456 | Proxy server port | | `CLAUDE_PROXY_HOST` | 127.0.0.1 | Proxy server host | +| `CLAUDE_PROXY_WORKDIR` | (process cwd) | Base working directory used by MCP file/shell tools | ## How It Works diff --git a/src/mcpTools.ts b/src/mcpTools.ts index ed8b778..84b28f2 100644 --- a/src/mcpTools.ts +++ b/src/mcpTools.ts @@ -8,7 +8,7 @@ import { glob as globLib } from "glob" const execAsync = promisify(exec) -const getCwd = () => process.cwd() +const getCwd = () => process.env.CLAUDE_PROXY_WORKDIR || process.cwd() export const opencodeMcpServer = createSdkMcpServer({ name: "opencode",