opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(mcp): add restart all MCP servers functionality

Open Timorleiderman opened this issue 3 weeks ago • 2 comments

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/restart API endpoint
  • Add r keybind in MCP dialog to restart all servers
  • Add /restart-mcp slash command
  • Add "Restart MCPs" to command palette
  • Regenerate SDK with new endpoint

Usage

  1. Open MCP dialog with /mcp, then press r to restart all
  2. Use /restart-mcp slash command
  3. Use command palette → "Restart MCPs"

Timorleiderman avatar Dec 26 '25 20:12 Timorleiderman