Tool call governance is currently in limited beta. Contact Opal support to enable it for your organization.
Requirements
Before you begin, you must:- Be an Opal Admin. Only admins see the Setup tab.
- Have Cursor on Mac or Linux computers.
- Have
bash,curl, andjq1.6 or later on each computer. On macOS,brew install jqinstalls jq. - Make sure each person has an Opal account. They approve a sign-in once, in their browser.
- Decide whether Opal may store conversations. Opal stores none until it turns that on for your organization. See What Opal records.
Install
Start with a few people
Each person runs one command in Terminal. To copy it, go to Agent Center > Setup > Anthropic and find the card that starts with “Try it on your own computer”. Choose macOS and Linux on that card. With your Opal’s address in it, the command for Cursor alone is:-s -- --only=cursor, the command also sets up Claude Code, and it sets up Cursor only if the ~/.cursor folder exists.
- Run the command. The installer shows what leaves the computer and which files it changes, and asks before it changes anything. Enter
y. - Sign in. The installer shows a code and opens Opal in your browser. Check that the page shows the same code, then approve it. The code lasts 10 minutes. If it expires, the installer stops, and you run it again. Don’t approve a code that someone else sent you.
- Restart Cursor if it was open.
Roll out to every Mac and Linux computer
Push Cursor’s enterprise hooks file with your device management tool, so nobody has to run an installer.- In Opal, go to Agent Center > Setup > Cursor. Download
hooks.json, or fetch it fromhttps://<your Opal>/downloads/claude-code-hooks/cursor-hooks.json. - Push the file to
/Library/Application Support/Cursor/hooks.jsonon macOS, or to/etc/cursor/hooks.jsonon Linux. - The first time Cursor runs the hook on a computer, the hook installs Opal’s kit in
~/opal-hook/in the background and opens the Opal sign-in page in the browser. The person approves the code once.
Check that it works
- In Cursor, ask the agent to run
echo opal-check. - In Opal, go to Agent Center > Activity. Within a few seconds, the call appears on the person’s Cursor agent.
- To test a block, make sure Enforce is on for Cursor under Setup > Clients. Create a rule that blocks Cursor calls with arguments matching
*opal-block-test*, then ask the agent to runecho opal-block-test. If Opal enforces rules for your organization, Cursor shows Opal’s reason and doesn’t run the call. If it doesn’t yet, the call runs, and Activity shows Would have blocked on it. Contact Opal support to turn on enforcement. Delete the rule afterwards. For how to create a rule, see Create a rule.
What Opal records
For every call, whatever your conversation setting is, Opal receives:- The tool’s name and arguments, for example the shell command. Arguments are sent as they are, so a secret pasted into a command reaches Opal. Opal masks credentials and personal data, such as email addresses and phone numbers, in the copy it stores. Your rules match the arguments as sent.
- For an MCP call, the server’s name and URL, or a hash of its command.
- Who the person is, as labels: the email set at install, which is their Opal account’s email unless you gave another, the email of the account Cursor is signed in with, their git email, their user name on the computer, and the computer’s name. If a person signed in to Cursor with a personal account, that address is sent.
- The time of the call.
When the conversation is sent, Opal gets each prompt, each reply the model writes, and what each tool printed. Opal masks credentials and personal data in the text and cuts long text to a size limit. These settings apply to your whole organization, and computers pick up a change within a few minutes without a reinstall.
Admins and read-only admins can see all of this, on the agent’s Activity tab. Auditors and other users can’t.
What isn’t covered
- Cursor’s cloud agents don’t run the hooks on your computers. Contact Opal support for the cloud agent setup.
- Windows isn’t supported yet.
- Secrets in prompts. Opal checks Claude Code prompts for secrets and can block them. It doesn’t check Cursor prompts.
- Rules that ask the developer to confirm. Cursor can’t ask, so it refuses a call that such a rule matches, with a message that says so.
Turn it off or remove it
- Switch Cursor off for everyone. Under Agent Center > Setup > Clients, turn Log and Enforce off for Cursor. A client with both off sends nothing, and its tool calls run without Opal’s check. Computers notice within a few minutes, with no reinstall.
- Remove it from one computer. Run
bash ~/opal-hook/uninstall.sh, then restart Cursor. It removes Opal’s entries from~/.cursor/hooks.jsonafter saving a backup, and deletes~/opal-hook/. It also removes Opal’s Claude Code hook from the same computer, because the two share one kit. It doesn’t revoke the token. To revoke it, use Settings > Personal Access Tokens, which admins see, and other people see only if your organization allows all users to create personal access tokens. - Remove the rollout. Take the hooks file off the computers with your device management tool. The kit’s files stay in
~/opal-hook/until you run the uninstall command on each computer.