Skip to main content

Module cursor

Module cursor 

Source
Expand description

Cursor AI installer adapter.

§What we touch

  • ~/.cursor/mcp.jsonmcpServers.spool entry
  • ~/.cursor/settings.json — hook entries under cursor.hooks
  • ~/.cursor/hooks/spool-*.sh — two hook scripts

§Cursor hook format

Cursor uses a settings.json with the shape:

{
  "cursor.hooks": {
    "onSessionStart": [{"command": "...", "timeout": 5000}],
    "onSessionEnd":   [{"command": "...", "timeout": 10000}]
  }
}

Unlike Claude Code (which wraps each entry in a {matcher, hooks: [...]} envelope) and Codex (flat hooks.json), Cursor puts hooks inside its main settings.json under the cursor.hooks namespace.

§Binary resolution

Same strategy as Claude/Codex: default to ~/.cargo/bin/spool-mcp, with --binary-path as an escape hatch.

Structs§

CursorInstaller