Skip to main content

Cursor Client Setup

Use these steps to connect Cursor's local agent loop to the MintMCP Gateway. The hooks forward activity to MintMCP so you can monitor runs, enforce rules, and keep an audit trail.

Prerequisites

  • Access to MintMCP Agent Monitor Setup with appropriate admin permissions.
  • Cursor v1.7 or later desktop app with the Hooks feature enabled (check in Cursor Settings → Hooks).

1. Generate an Organization Gateway Key

  1. Visit MintMCP Agent Monitor Setup.
  2. Select the Cursor tab.
  3. Click Generate Organization Key if a key is not already listed.
Cursor setup screenshot

2. Install Cursor Hook Files

There are two ways to install the hooks: User-specific and Global (Enterprise-managed).

User-specific

Create the hooks directory if it does not exist:

mkdir -p ~/.cursor

Create ~/.cursor/hooks.json with the configuration provided on the MintMCP page. A typical file looks like:

{
"version": 1,
"hooks": {
"beforeSubmitPrompt": [
{ "command": "sh mint.sh" }
],
"beforeShellExecution": [
{ "command": "sh mint.sh" }
],
"beforeMCPExecution": [
{ "command": "sh mint.sh" }
],
"beforeReadFile": [
{ "command": "sh mint.sh" }
]
}
}

Save ~/.cursor/mint.sh with the script from the MintMCP UI.

Global (Enterprise-managed)

You can deploy hooks to your organization using enterprise tooling by storing the hooks.json and mint.sh files in the appropriate shared location. See the official Cursor documentation for more details.

And storing the mint.sh file in the appropriate shared location.

3. Verify the Installation

  • Open Cursor and go to Cursor Settings → Hooks. Ensure the Configured Hooks section shows sh mint.sh for each hook.
Cursor hooks configured screenshot
  • Run an agent action (e.g., have Cursor read a file or execute a command). You should see the activity in MintMCP Live Activity tagged with the user you configured. You should also see the activity in Cursor Settings Hooks tab.
Cursor hooks logs screenshot
  • If nothing appears:
    • Confirm both files exist in ~/.cursor or the appropriate shared location.
    • Check the Hooks Output panel in Cursor for error messages.
    • Make sure the organization key has not been regenerated or revoked.