The open source coding agent.
TypeScript
Include current working directory in local MCP transport (#6303)
Daniel Polito6e8cd3174c6e
diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.tsindex 88886c4ff4a..8ee54a4bf82 100644--- a/packages/opencode/src/mcp/index.ts+++ b/packages/opencode/src/mcp/index.ts@@ -308,10 +308,12 @@ export namespace MCP {if (mcp.type === "local") {const [cmd, ...args] = mcp.command+ const cwd = Instance.directoryconst transport = new StdioClientTransport({stderr: "ignore",command: cmd,args,+ cwd,env: {...process.env,...(cmd === "opencode" ? { BUN_BE_BUN: "1" } : {}),@@ -334,6 +336,7 @@ export namespace MCP {log.error("local mcp startup failed", {key,command: mcp.command,+ cwd,error: error instanceof Error ? error.message : String(error),})status = {