Join our Newsletter — 33% off our NHI Course
Home› Guides› Cursor Security Guide: team controls, privacy mode, MCP…
Guide AI Platforms

Cursor Security Guide: team controls, privacy mode, MCP and agent hardening

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 12 min read
On this page

Cursor puts an AI agent inside the editor with the developer's file system, terminal, credentials and network, and most of the settings that decide what that agent may do live in files a cloned repository can supply. Securing it is less about one switch and more about who controls configuration: the team dashboard, MDM-managed files, the project folder or the individual user. This guide covers how identity and administration work in Cursor Teams and Enterprise, how Privacy Mode and data handling work, how MCP servers, rules files, hooks and API keys are governed, what to log, and a hardening baseline. It goes deeper on Cursor than our cross-product AI IDE and Coding Agent Security Guide, which compares run modes and sandboxes across tools. Facts are from Cursor's documentation, checked on 27 October 2026; Cursor ships frequently, so re-check settings before enforcing them.

This is an independent guide from NHI Mgmt Group, based on Cursor's public documentation as of November 2026. It is not sponsored or reviewed by Cursor. Product features change, so confirm settings against Cursor's current documentation.

Key takeaways

  • Team settings win, so set them. Cursor's documented precedence puts the team admin dashboard above project and user files for run modes, rules and MCP allowlists. If the dashboard is empty, the repository and the developer decide.
  • Allowlists and Auto-review are convenience, not boundaries. Cursor's own docs say permissions files and the Auto-review classifier are not a security boundary. The sandbox, approvals and credential scope are the real controls.
  • Workspace trust is off by default. Enable security.workspace.trust.enabled and enforce it through MDM so untrusted repositories open in restricted mode, which disables AI features.
  • Repository files configure the agent. .cursor/mcp.json, .cursor/rules, .cursor/permissions.json, .cursor/hooks.json and AGENTS.md arrive with a clone. Treat those files as untrusted input until a reviewer has read them.
  • The agent holds the developer's identity. Any token in the workspace, environment or home directory is reachable. Scope and remove ambient credentials before tuning prompts.

How identity and access work in Cursor

Cursor accounts are user accounts. For organisations the controls that matter are on the Teams and Enterprise plans.

ControlWhat Cursor documentsRecommended setting
Single sign-onSAML 2.0 on Teams and Enterprise at no extra cost; Enterprise org admins configure it in the Organization's SettingsConnect to the corporate IdP; enforce MFA and device conditions in the IdP
SSO enforcementNo separate toggle: once a domain is verified and the SSO connection is active, users on that domain must sign in with SSOVerify every corporate email domain, including subsidiaries
ProvisioningJust-in-time provisioning on SSO sign-in; with SCIM, member management is handled through the identity providerUse SCIM where available so leavers are removed when the IdP account is disabled. See the SCIM Provisioning Guide
Personal accountsNot covered by the pages read for this guideDetect personal Cursor use on managed devices (Cursor lists network allowlisting and MDM deployment as enterprise features); a personal account sits outside team policy
Workspace trustDisabled by default; "security.workspace.trust.enabled": true in user settings; organisations can enforce it through MDMEnable and enforce; restricted mode for anything not from approved organisations

Inside the editor, the agent has no identity of its own. It runs with the operating system user, reads the same files and environment variables, and uses whatever Git, cloud and package manager credentials the developer has. Cursor's sandbox narrows what shell commands can reach, but by default the read boundary is System, so the agent can read files outside the workspace without approval. Since Cursor 3.23 admins can set a team read policy of Workspace, which requires approval for reads outside the project unless the path is on the Read Allowlist.

Admin roles and privileged access

Cursor documents three team roles.

RoleCapabilitiesNotes
MemberUses paid features, can invite members and set usage controls; no billing or admin dashboardPaid seat. Restrict invitations through domain settings or SCIM
AdminMember rights plus removing members, changing roles, admin dashboard, SSO and security configuration, billing, analytics and access managementPaid seat. Holds the controls that override every developer's local settings
Unpaid AdminSame administrative capabilities as Admin without paid features; not billableRequires at least one paid user. Useful for a security or IT administrator who does not code

The Admin role is privileged in a way that is easy to miss: it decides run modes, sandbox networking, team rules, team hooks and the MCP allowlist for every member. A compromised admin account can loosen all of them at once. Keep the admin group small, use Unpaid Admin seats for named security owners, require phishing-resistant MFA for those accounts at the IdP, and review role changes monthly. See the Phishing-Resistant MFA Guide.

The second privileged layer is the device. Enterprise hooks are read from MDM-managed paths: /Library/Application Support/Cursor/hooks.json on macOS, /etc/cursor/hooks.json on Linux and WSL, and C:\ProgramData\Cursor\hooks.json on Windows. Cursor does not manage those files; your MDM does, so write access to those paths must be restricted to administrators.

Integrations, API tokens and service accounts

MCP servers

MCP servers are configured in .cursor/mcp.json (project) and ~/.cursor/mcp.json (global). Cursor supports stdio, SSE and Streamable HTTP transports. Remote servers can use OAuth with the authorisation code flow and PKCE; with dynamic client registration Cursor registers as a public client. Cursor asks for approval before MCP tool calls by default and MCP follows the same run modes as terminal commands.

  • Team MCP allowlist: in Team Settings, MCP Configuration, approve stdio servers by command pattern and remote servers by URL pattern. Tool allowlists limit which tools run automatically; an empty tool list allows every tool from that server, so list tools explicitly.
  • Network controls: remote URLs must match an approved pattern; local servers can be set to Allow all, Allowlist, Deny all or No sandbox. Use the User MCP Network Denylist if you allow users to add their own servers.
  • Secrets in configuration: use ${env:NAME} interpolation rather than literal keys in mcp.json, and give each server a restricted API key, as Cursor's docs advise. Never commit a populated mcp.json.
  • Project files: a project mcp.json is attacker-supplied in an untrusted repository. Combine workspace trust with the team allowlist so a cloned file cannot introduce a new server. See the Coding Agent Configuration File Attacks guide.

Cursor API keys and model provider keys

  • Personal Cursor API keys: members can create keys for scripts and integrations. On Enterprise, admins can view keys per member and revoke one or all; revoked keys fail immediately and revocations appear in the audit log as user_api_key events with the revoke action. Revoke all of a leaver's keys at offboarding.
  • Bring-your-own model keys: Cursor's data use page says requests made with your own API key still pass through Cursor's backend, where final prompt building happens. A provider key entered in Cursor is a shared secret with a third party: use a dedicated, spend-capped key per team. See the LLMjacking Guide.
  • Credentials the agent can find: an agent can read and use tokens stored in unrelated files in the workspace. Use .cursorignore for secret-bearing files, but treat it as hygiene: the fix is removing standing tokens from the workspace and scoping the rest.

Extensions

Cursor is built on VS Code and installs extensions from the Open VSX registry. The GlassWorm campaign spread through Open VSX extensions and stole npm, GitHub, Git and Open VSX tokens from developers using VS Code-compatible editors. See the GlassWorm Campaign 2025 analysis and the GlassWorm VS Code Extension Worm Guide. Maintain an extension allowlist through your device management and review publisher changes.

Logging and detection

Cursor lists audit logs among its enterprise features. The documentation read for this guide confirms API key revocation events; check the Enterprise compliance and monitoring documentation for the full event list on your plan. Plan detection on three layers:

LayerSourceWhat to watch
Cursor organisationEnterprise audit logs, admin dashboardRole changes, SSO and security setting changes, MCP allowlist and hook changes, API key creation and revocation
Agent actions on the deviceHooks: beforeShellExecution, afterShellExecution, beforeMCPExecution, beforeReadFile, afterFileEdit, beforeSubmitPromptCommands, MCP calls and file reads by the agent, forwarded to your log pipeline by an enterprise hook script
Downstream systemsGit host, cloud and SaaS audit logsActions by developer credentials from developer devices at unusual volume, deletes, permission changes, new tokens

Hooks return allow, deny or ask; across multiple hooks deny overrides ask, which overrides allow, and exit code 2 blocks the action. Dashboard-managed team hooks sync about every 30 minutes and do not support the failClosed or matcher options, so use MDM-deployed enterprise hooks where you need a hook to fail closed. Endpoint detection should also flag writes to .cursor/ configuration files outside normal Git operations.

Metrics

  • Managed coverage: percentage of Cursor users signed in through team SSO rather than personal accounts.
  • Policy coverage: percentage of team members with Run Everything unavailable and a team MCP allowlist applied.
  • Trust enforcement: percentage of managed devices with workspace trust enforced by MDM.
  • Ambient credential count: long-lived tokens found in developer workspaces and home directories per scan; target a falling trend.
  • Hook denials: agent actions blocked per week by category, reviewed for false positives and real attempts.

Hardening baseline

  1. Identity first: enable SAML SSO, verify all domains, connect SCIM where available and keep Admin to a named few with phishing-resistant MFA.
  2. Privacy Mode: enable it at team level so new members inherit it. With Privacy Mode on, Cursor states that customer data is not used for training and that it has zero data retention agreements with model providers, with an exception for providers' abuse classifiers. Non-ZDR models are labelled or need admin opt-in: decide that opt-in deliberately.
  3. Run modes: restrict available modes in the team dashboard. Remove Run Everything. Use Auto-review or Allowlist with the sandbox on, and set the network mode to sandbox.json Only or sandbox.json + Defaults rather than Allow All.
  4. Read boundary: set the team read policy to Workspace for developers handling sensitive code or credentials, with a short Read Allowlist.
  5. Keep extra protections on: Browser Protection, File-Deletion Protection and External-File Protection force approval even in automatic modes.
  6. MCP: apply a team MCP allowlist with explicit tool lists, require OAuth for remote servers where supported, and deny user-added servers unless there is a reviewed need.
  7. Workspace trust: enforce through MDM; open unknown repositories in restricted mode or in a disposable container.
  8. Rules: publish security rules as Team Rules with "Enforce this rule" so members cannot disable them, and protect .cursor/, .cursorrules and AGENTS.md with code owner review. Cursor's docs say AI guidance should not be your only security control: rules guide the model, they do not enforce anything.
  9. Hooks: deploy an enterprise hooks.json through MDM that logs shell and MCP calls and denies known destructive patterns.
  10. Updates: keep Cursor current through managed deployment and apply Cursor's security updates promptly; see Cursor Security.

Rollout and rollback: pilot the baseline with one team for two weeks, measure approval prompts and hook denials, then apply organisation-wide. Roll back individual settings in the dashboard (for example widening the read allowlist), not by re-enabling Run Everything. For small teams without Enterprise, the minimum is SSO on Teams, Privacy Mode, workspace trust in user settings, a committed reviewed permissions.json, and no secrets in repositories.

Common misconfigurations

  • Empty team dashboard: no team run-mode or MCP policy, so each developer's local settings and each repository's files decide what the agent can do.
  • Treating permissions.json as a control: terminal allowlist entries use prefix matching and the docs describe the file as not a security boundary. A broad entry such as npm or git permits far more than intended.
  • Allow All sandbox networking: removes the egress restriction that stops an injected command sending secrets out.
  • Empty MCP tool lists: approving a server with an empty tool list allows every tool, including ones added in a later server update.
  • Literal keys in mcp.json: committed to Git or synced through dotfile repositories, they leak to everyone with read access.
  • Old clients: unmanaged installs lag behind Cursor's security fixes.

Framework mapping

Risk or controlReference
Injected instructions from repository content or tool outputMITRE ATLAS AML.T0051.001 Indirect prompt injection; OWASP LLM Top 10 LLM01 Prompt Injection Guide
Agent using found credentialsATT&CK T1552.001 Credentials In Files; NIST SP 800-53 IA-5 Authenticator Management, AC-6 Least Privilege
Malicious extensions and developer toolsATT&CK T1195.001 Compromise Software Dependencies and Development Tools; NIST SP 800-53 CM-11 User-installed Software
Agent shell executionATT&CK T1059 Command and Scripting Interpreter; NIST SP 800-53 CM-7 Least Functionality
Team policy, managed configurationNIST SP 800-53 CM-6 Configuration Settings; NIST CSF 2.0 PR.PS-01
SSO, SCIM, admin rolesNIST SP 800-53 IA-2, AC-2; NIST CSF 2.0 PR.AA-05
Hooks and audit logsNIST SP 800-53 AU-12 Audit Record Generation
Sandbox egress restrictionNIST SP 800-53 SC-7 Boundary Protection

Practitioner checklist

  • Enable SAML SSO, verify every domain and connect SCIM where your plan supports it.
  • Limit Admin and Unpaid Admin roles to named owners with phishing-resistant MFA; review monthly.
  • Turn on Privacy Mode at team level and decide explicitly on non-ZDR model opt-ins.
  • Remove Run Everything from available run modes and keep the sandbox with restricted networking.
  • Set the team read policy to Workspace for sensitive codebases.
  • Apply a team MCP allowlist with explicit tools and OAuth for remote servers.
  • Enforce workspace trust through MDM and protect .cursor/ files with code owner review.
  • Deploy an MDM-managed enterprise hooks.json that logs and blocks destructive actions.
  • Scan developer workspaces for long-lived tokens and replace them with scoped, short-lived credentials.
  • Revoke all Cursor API keys and model keys at offboarding and keep clients on a managed update channel.

Standards and references

Related NHI Mgmt Group resources: AI IDE and Coding Agent Security Guide · Coding Agent Configuration File Attacks · Developer Workstation and IDE Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.