Cursor: Enforce Governed MCP Usage
Apply organization-wide MCP usage policies to your Cursor team by copying the JFrog MCP and Agent Guard allowlist entries from the Coding Assistants page and applying them in the Cursor team dashboard.
JFrog enables Cursor team administrators to enforce MCP usage policies at the team level. Instead of relying on individual developers to select approved MCP servers, you define which servers are available to your team and lock that allowlist in the Cursor team dashboard. Only servers you approve are available to developers; they cannot add or enable any others.
Cursor's MCP Configuration feature (in the Cursor team dashboard) works with JFrog Agent Guard to restrict MCP usage. This is one of three organization-wide MCP enforcement models. For a comparison of Claude Code, Cursor, and VS Code enforcement, see Enforce Organization-Wide MCP Policies.
Prerequisites
- Cursor Enterprise Plan with team admin access.
- JFrog Platform administrator access.
- JFrog AI Catalog entitlement with MCP Registry enabled.
- At least one MCP server allowed in your JFrog AI Catalog project.
Enforce MCP Usage in Cursor
To enforce MCP usage in Cursor with team MCP Configuration:
-
In JFrog, navigate to Administration > AI/ML Settings > Coding Assistants.
-
Set Enable MCP registry to active.
-
Click Discover MCP servers and allow each MCP server your team approves. Only servers allowed to developers are available.
-
Return to the Coding Assistants (AI/ML Settings) page and select the Cursor card.
-
Copy the three generated allowlist entries. Each entry has a type, either URL or Command:
-
URL entry — Approves the remote JFrog MCP.
https://<JPD HOSTNAME HERE>/mcp -
Command entry 1 — Approves Agent Guard for user and project MCP servers.
npx --yes --registry https://releases.jfrog.io/artifactory/api/npm/coding-agents-npm/ @jfrog/agent-guard --server <SERVER NAME HERE> -
Command entry 2 — Approves the plugin MCP servers that Agent Guard rewrites.
npx --yes --registry https://releases.jfrog.io/artifactory/api/npm/coding-agents-npm/ @jfrog/agent-guard --server <SERVER NAME HERE> --source plugin
Where:
npx --yes— Runs the JFrog Agent Guard package without interactive prompts.--registry— The npm source for the@jfrog/agent-guardpackage. The default is the JFrog public source. For a restricted network, replace this value with your internal npm remote repository:https://<JFROG_URL>/artifactory/api/npm/<REPO_NAME>.@jfrog/agent-guard— Restricts Cursor to the JFrog Agent Guard command. Only this proxy is permitted as an MCP server, so any other MCP server a developer adds is blocked.--server— Pins Agent Guard to your JFrog Platform server name. The server name and hostname are pre-filled from the JFrog Platform you are signed in to. To allow Agent Guard to be unpinned, drop--serverand the server name from both Command entries. Keep both entries (with and without--source plugin). Pinning is recommended.--source plugin— Allows the Agent Guard command that a JFrog plugin starts. Without this entry, plugin-provided MCP servers may not start correctly.
Note: Multiple JFrog Platform Deployments (JPD)
If you have multiple JFrog Platform deployments, add one URL entry and one command pair per JPD, each with its own server name and hostname.
IMPORTANT: Make sure you have enabled the MCP Registry for each JPD.
-
-
In the Cursor team dashboard, navigate to Team Settings > MCP Configuration.
-
Under MCP Allowlist, click Add MCP for each entry you copied.
-
Select the entry type, URL or Command, and paste the entry into the field.
-
Click Save.
After you save the entries, Cursor applies them to every developer on your team on the next session start. Developers can use only the MCP servers you allow in AI Catalog; they cannot add or enable any other MCP servers.
Verify Enforcement
To verify that enforcement is active:
-
Restart Cursor to start a new session.
-
Confirm that only the approved servers load. You should see JFrog Agent Guard and the JFrog MCP. Any MCP server that doesn't match an allowlist entry is blocked.
Frequently Asked Questions
This section provides answers to frequently asked questions.
FAQs
Q. What if the Cursor team dashboard rejects the MCP Configuration entry?
A: Confirm that you copied the complete entry from the Cursor card and selected the matching type. A URL entry is the JFrog MCP address ending in /mcp. A command entry is a single-line string starting with npx --yes --registry....
Q. Can developers still use unapproved MCP servers if I add this configuration?
A: No. The allowlist restricts Cursor to the JFrog MCP and the JFrog Agent Guard proxy. Any attempt to add or use an unapproved MCP server is blocked at the team level. The restriction applies on the next developer session start.
Q. Do developers need to take any action after I apply the MCP Configuration?
A: Developers restart Cursor to pick up the policy. It applies on the next session start, and no manual configuration is needed.
Q. Why do I need a separate entry with --source plugin?
--source plugin?A: JFrog plugins start Agent Guard with --source plugin, and the allowlist matches the command exactly. Without that entry, the plugin MCP servers Agent Guard rewrites may not start correctly.
Q. What if no MCP servers are available to developers after I apply this configuration?
A: Confirm that you have allowed at least one MCP server in the JFrog AI Catalog. The MCP Configuration entry restricts where MCPs come from (JFrog Agent Guard), but the specific servers must be allowed in AI Catalog.
Related Topics
Updated 13 days ago
