Skip to main content

install_claude_mcp_config

Function install_claude_mcp_config 

Source
pub fn install_claude_mcp_config() -> Result<bool>
Expand description

Register sqz-mcp as an MCP server in ~/.claude.json.

Idempotent: if an sqz entry already exists and points at sqz-mcp --transport stdio, we leave it alone and return Ok(false). If the entry exists but diverges (user edited the command args), we also leave it alone — the user’s customisation wins. Only fresh installs write a new entry.

Returns:

  • Ok(true) when a new entry was added.
  • Ok(false) when an entry already existed (either sqz-managed or user-customised).
  • Err(_) on JSON parse error or write failure.