Problem
When Claude Code connects to the cupertino MCP server, the server process is long-running and keeps its initial database connection for the entire session. If the underlying data changes (e.g., after cupertino save or a schema migration), the MCP server returns stale/empty results even though the CLI works fine.
Claude Code has no mcp restart command (anthropics/claude-code#17690, #30224), so the current workaround is:
claude mcp remove cupertino -s user
claude mcp add -s user cupertino -- /opt/homebrew/bin/cupertino serve
- Exit and restart the Claude Code session
Proposal
Add a mechanism for the cupertino MCP server to detect data changes and reload its database connection, or expose a restart / reload tool that clients can call to refresh the connection.
Possible approaches:
- Watch
~/.cupertino/search.db for changes and reconnect automatically
- Add a
reload MCP tool that re-opens the database connection
- Respond to a signal (e.g., SIGHUP) to trigger a reload
Problem
When Claude Code connects to the cupertino MCP server, the server process is long-running and keeps its initial database connection for the entire session. If the underlying data changes (e.g., after
cupertino saveor a schema migration), the MCP server returns stale/empty results even though the CLI works fine.Claude Code has no
mcp restartcommand (anthropics/claude-code#17690, #30224), so the current workaround is:claude mcp remove cupertino -s userclaude mcp add -s user cupertino -- /opt/homebrew/bin/cupertino serveProposal
Add a mechanism for the cupertino MCP server to detect data changes and reload its database connection, or expose a
restart/reloadtool that clients can call to refresh the connection.Possible approaches:
~/.cupertino/search.dbfor changes and reconnect automaticallyreloadMCP tool that re-opens the database connection