Skip to main content

One-command setup

From the repo root:
npx enagrams init
The CLI writes everything Claude Code needs:
  • .mcp.json — MCP server config at the repo root (Claude Code reads this)
  • .claude/settings.json — hook wiring that points to the shared .cursor/hooks/enagrams-hooks.mjs script
The hook script is shared with Cursor and Codex, so all three IDEs emit activity to the same workspace without duplication. Restart Claude Code after init so the MCP server registers.

Verify

In Claude Code, check that the enagrams server is connected (settings → MCP). You should see 26 tools.
enagrams status
With Claude Code open you should see an active agent session tagged agent_type: claude_code.

What’s in .claude/settings.json

Claude Code’s hook format is slightly different from Cursor’s, but the underlying script is identical — the CLI translates automatically.
{
  "hooks": {
    "PreToolUse": [{
      "matcher": "Write|Edit|MultiEdit",
      "hooks": [{ "type": "command", "command": "node .cursor/hooks/enagrams-hooks.mjs preToolUse" }]
    }],
    "PostToolUse": [{
      "matcher": "Write|Edit|MultiEdit",
      "hooks": [{ "type": "command", "command": "node .cursor/hooks/enagrams-hooks.mjs postToolUse" }]
    }],
    "SessionStart": [{
      "hooks": [{ "type": "command", "command": "node .cursor/hooks/enagrams-hooks.mjs sessionStart" }]
    }],
    "SessionEnd": [{
      "hooks": [{ "type": "command", "command": "node .cursor/hooks/enagrams-hooks.mjs sessionEnd" }]
    }]
  }
}
.mcp.json (at repo root):
{
  "mcpServers": {
    "enagrams": {
      "command": "npx",
      "args": ["-y", "enagrams", "--mcp"],
      "env": {
        "ENAGRAMS_API_KEY": "...",
        "ENAGRAMS_WORKSPACE": "..."
      }
    }
  }
}

Troubleshooting

Server connects but no tools show — your API key may be invalid. Run enagrams login to refresh. File writes blocked unexpectedly — another session owns the file, or a must-tier convention applies. The denial message explains which.