Description
Each local MCP server spawns twice at startup under the same opencode serve --service parent. The log shows one mcp connected per server with directory=<project>, and a second with directory=/home/ray. Both stay alive for the whole session.
Only one session is open (session_v2 has a single row updated in the last hour, in the project dir). Killing the service and relaunching from the project dir does not fix it — the home pair comes back at launch ("starting bg server" on every start).
Plugins
opencode-magic-context, aft-opencode, oh-my-opencode-slim, local V2 adapter (file shim in ~/.config/opencode/plugins/)
OpenCode version
2.0.18
Steps to reproduce
- Configure a local MCP server (I have daisyui + skeleton-ui).
cd <project> && opencode
- Check processes:
ps -o pid,ppid,lstart,rss,args | grep mcp_server — two processes per server, started the same second.
- Check the log: two
mcp connected lines per server, one with directory=<project>, one with directory=/home/ray.
Operating System
Ubuntu (Linux x64)
Terminal
opencode TUI
Description
Each local MCP server spawns twice at startup under the same
opencode serve --serviceparent. The log shows onemcp connectedper server withdirectory=<project>, and a second withdirectory=/home/ray. Both stay alive for the whole session.Only one session is open (
session_v2has a single row updated in the last hour, in the project dir). Killing the service and relaunching from the project dir does not fix it — the home pair comes back at launch ("starting bg server" on every start).Plugins
opencode-magic-context, aft-opencode, oh-my-opencode-slim, local V2 adapter (file shim in ~/.config/opencode/plugins/)
OpenCode version
2.0.18
Steps to reproduce
cd <project> && opencodeps -o pid,ppid,lstart,rss,args | grep mcp_server— two processes per server, started the same second.mcp connectedlines per server, one withdirectory=<project>, one withdirectory=/home/ray.Operating System
Ubuntu (Linux x64)
Terminal
opencode TUI