Skip to main content

run_mcp_server

Function run_mcp_server 

Source
pub async fn run_mcp_server(
    path: Option<PathBuf>,
    cancel_token: CancellationToken,
) -> Result<()>
Expand description

Run the MCP server using stdio transport with file watching for live index updates.

§Multi-instance Support

When another instance is already running with write access to the same database, this server will automatically start in readonly mode:

  • Searches work normally
  • No file watching (index won’t auto-update)
  • No incremental refresh

This allows multiple terminal windows to use codesearch simultaneously.