opencode
opencode copied to clipboard
feat(mcp): add restart all MCP servers functionality
Summary
- Add ability to restart all MCP servers without restarting opencode
- Useful for developers working on MCP servers who need to quickly reconnect after code changes
Changes
- Add
MCP.restartAll()function to disconnect and reconnect all connected/failed servers - Add
POST /mcp/restartAPI endpoint - Add
rkeybind in MCP dialog to restart all servers - Add
/restart-mcpslash command - Add "Restart MCPs" to command palette
- Regenerate SDK with new endpoint
Usage
- Open MCP dialog with
/mcp, then pressrto restart all - Use
/restart-mcpslash command - Use command palette → "Restart MCPs"