Skip to content

Add MCP server restart capability #175

@mihaelamj

Description

@mihaelamj

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:

  1. claude mcp remove cupertino -s user
  2. claude mcp add -s user cupertino -- /opt/homebrew/bin/cupertino serve
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions