Cursor
Cursor now ships a Claude-Code-compatible first-party hook API (cursor.com/docs/hooks), which replaces the older Arrakis-shipped Python hook. Deploy hooks.json via MDM (or via the Cursor admin dashboard for cloud-synced Team-level policy). Pair the hook path with periodic admin-API polling for administrative audit events. Privacy mode is enforced at the team level; the MDM AllowedTeamId policy blocks sign-in to personal (non-privacy) accounts on corporate machines.
When to use this
Use this page if your fleet uses any Cursor product — the IDE, Cursor CLI, Cloud Agents, or Mobile Remote Control. All four products share the hook-and-admin-API governance shape; the hook config auto-applies across IDE, CLI, and Cloud Agents. Mobile Remote Control is admin-gated per team.
3-step Quickstart
- In the Arrakis platform, paste your Cursor admin API key under Settings → Integrations → Cursor.
- Download the tenant-specific
hooks.jsonfragment from Settings → Integrations → Deployment → Cursor. - Deploy via your MDM to
/Library/Application Support/Cursor/hooks.json(macOS),C:\ProgramData\Cursor\hooks.json(Windows), or/etc/cursor/hooks.json(Linux). Confirm asessionStartevent reaches the Arrakis ingest.
Where tenant-specific values come from
Sign in to the Arrakis platform → Settings → Integrations → Deployment. The Arrakis ingest endpoint, header secret, and per-tool MDM payload templates for your tenant live there.
Reference: full configuration walkthrough
Cursor hook API overview
Cursor’s hook system is a subprocess-over-stdio model — Cursor invokes a customer-supplied binary with a JSON payload, reads the JSON reply. Supported events:
| Event | Fires on |
|---|---|
sessionStart / sessionEnd | Session lifecycle |
workspaceOpen | Workspace open |
beforeSubmitPrompt | Prompt submission (pre) — can rewrite or block |
preToolUse / postToolUse | Tool invocation |
beforeShellExecution | Shell command execution (pre) — can rewrite or block |
beforeReadFile | File read (pre) — can redact or block |
afterFileEdit | File edit committed |
beforeMCPExecution | MCP tool invocation (pre) |
afterAgentResponse | Agent turn completion |
Tab hooks exist for tab-completion events; see the Cursor docs for the full list.
Config precedence (last wins): Enterprise (MDM) → Team (dashboard, cloud-synced) → Project → User.
MDM paths per OS:
| Platform | Path |
|---|---|
| macOS | /Library/Application Support/Cursor/hooks.json |
| Windows | C:\ProgramData\Cursor\hooks.json |
| Linux | /etc/cursor/hooks.json |
Env vars provided to hook subprocesses: CURSOR_PROJECT_DIR, CURSOR_USER_EMAIL, CURSOR_TRANSCRIPT_PATH, plus a CLAUDE_PROJECT_DIR alias for Claude-Code-compatible hook binaries.
The Arrakis hooks.json fragment configures each event to invoke the Arrakis hook binary (also delivered by MDM) with the tenant-specific ingest endpoint and bearer token baked in.
Admin API — audit-log pull
Poll GET https://api.cursor.com/teams/audit-logs for administrative events. Auth is Basic — API key as username, empty password.
| Field | Detail |
|---|---|
| Rate limit | 20 req/min per team |
| Retention window | 30 days |
| Auth | Basic (API key as username) |
| Envelope | metadata.timestamp, event_id, team_id, ip_address, user_email, event-specific fields |
Event catalog: login, logout, add_user, update_user_role, team_api_key, user_api_key, privacy_mode, team_hook, team_command, team_repo, mcp_server_config, bugbot_*, directory-group events.
Important: Audit logs are metadata only. Cursor’s own docs state “We do not log agent responses or generated code content.” Prompt / tool-call / file-edit content is captured exclusively through the hook path — the admin API complements it, not the other way around.
Other admin/organization endpoints available on the same key: /teams/members, /teams/user-spend-limit, /teams/daily-usage-data, /teams/spend, /teams/filtered-usage-events, /teams/groups*, /settings/repo-blocklists/*; and (Enterprise) /organizations/members, /organizations/team-memberships/sync, /organizations/pooled-usage, /organizations/filtered-usage-events, /organizations/daily-usage-data, /organizations/groups*.
Webhook status
Cursor supports streaming audit logs to S3 / SIEM / webhook / Elasticsearch / CloudWatch, but only via manual setup — the customer emails hi@cursor.com. There is no self-serve HMAC-signed webhook API documented; do not promise one to customers. When the streaming path is available, Arrakis prefers it over the 20-req/min pull; where it is not, the pull path suffices.
Privacy mode
Privacy Mode is the toggle that governs whether Cursor logs prompts for training and retention. Team-level admins can enforce Privacy Mode across the team (“members cannot disable it individually”). On Enterprise, Privacy Mode is on by default.
For corporate machines, deploy the MDM AllowedTeamId policy to block sign-in to personal (non-privacy) accounts. Per-model retention approvals exist for models outside the standard Zero Data Retention set (e.g. “Claude Fable 5”).
Product coverage
- Cursor IDE. The primary surface. Hooks apply.
- Cursor CLI (
curl https://cursor.com/install). Agent, plan, and ask modes;-pnon-interactive; sandbox controls; Cloud Agent handoff via&. Hooks apply. Usage events flow through the same/teams/filtered-usage-eventsendpoint. - Cloud Agents. Separate opt-in per team. Encrypted repo storage during the run, deleted after. Governance via
.cursordirectory protection and browser origin allowlists. Hooks apply to a subset of events; see the Cursor docs for the current supported list. - Cursor Mobile (Remote Control). Admins enable Remote Control from the team dashboard. Usage flows through the same admin API endpoints.
- Team Marketplaces. MCPs and skills distributed across IDE, CLI, and Cloud Agents. Governed by
mcp_server_configandteam_commandaudit events.
MDM payloads
Jamf Pro (macOS)
- Files & Processes payload: deploy
hooks.jsonto/Library/Application Support/Cursor/(mode 0644, owner root:wheel). - Files & Processes payload: deploy the Arrakis hook binary (also downloaded from the Arrakis platform; signed — verify signature before packaging) to its install directory with mode 0755, owner root:wheel.
- Custom Configuration Profile: set the Cursor
AllowedTeamIdpreference to force sign-in to your team. - Smart Group: scope to machines with Cursor installed.
Microsoft Intune
- macOS: shell-script policy that installs
hooks.jsonand the hook binary. SetAllowedTeamIdvia Custom Configuration Profile. - Windows: Win32 app (.intunewin) installs
hooks.jsontoC:\ProgramData\Cursor\and the hook binary to Program Files. Settings catalog policy applies theAllowedTeamIdregistry key. - Assignment: developer device or user group.
Iru (macOS)
- Custom Script library item (install) — marked Continuously Enforced so a missing hooks.json or binary is re-installed on each check-in.
- Custom Profile library item — sets
AllowedTeamIdvia.mobileconfig.
Generic
- macOS launchd plist for env; file deploy for
hooks.jsonand the binary. - Windows: PowerShell install script; Settings-catalog-equivalent for
AllowedTeamId.
The
hooks.jsonbody, the hook binary artifact, and the tenant-specific ingest endpoint and bearer token are provisioned per-tenant in the Arrakis platform under Settings → Integrations → Deployment, or available from Arrakis support. Verify artifact signatures before MDM packaging.
Egress verification
Cross-link to OTel Collector & Arrakis Endpoint → Verifying connectivity for TCP/TLS, synthetic ingest, and failure-mode probes shared across tools.
Cursor-specific debug commands:
| Command | What it shows |
|---|---|
cat /Library/Application Support/Cursor/hooks.json | Verify the file is present with the expected contents. |
Cursor: Show Logs (Command Palette) | Confirm hook invocation and any subprocess errors. |
curl -u '<api-key>:' https://api.cursor.com/teams/audit-logs | Confirm admin API auth works. |
Troubleshooting matrix:
| Symptom | Likely cause |
|---|---|
| Hook file absent | MDM scope did not include the device, or install script failed |
| Hook invocations missing from Arrakis ingest | Hook binary path in hooks.json incorrect, or binary lacks execute permission |
401 Unauthorized on admin API | API key wrong or rotated — re-pull from the Arrakis platform |
| Personal-account sign-ins on corporate machines | AllowedTeamId policy not applied — force MDM sync |
| Connection refused / timeout to ingest | Egress firewall does not allowlist the ingest host |
Vendor-side complement
The Connectors → Coding Agents page (Cursor row) covers the vendor-side coverage scoring across the four pillars.