Skip to content

Hooks for security and platform teams

by Michael Feldstein, Michael Scherr & Travis McPeak in product

Earlier this year, we released hooks for organizations to observe, control, and extend Cursor's agent loop using custom scripts. Hooks run before or after defined stages of the agent loop and can observe, block, or modify behavior.

We've seen many of our customers use hooks to connect Cursor to their security tooling, observability platforms, secrets managers, and internal compliance systems.

To make it easier to get started, we're partnering with ecosystem vendors who have built hooks support with Cursor.

Hooks partners

Our partners cover MCP governance, code security, dependency scanning, agent safety, and secrets management.

MCP governance and visibility

MintMCP uses beforeMCPExecution and afterMCPExecution hooks to build a complete inventory of MCP servers, monitor tool usage patterns, and scan responses for sensitive data before it reaches the AI model.

Oasis Security extends their Agentic Access Management platform to Cursor, using hooks to enforce least-privilege policies on AI agent actions and maintain full audit trails across enterprise systems.

Runlayer uses hooks to wrap MCP tools and integrate with their MCP broker, giving organizations centralized control and visibility over all agent-to-tool interactions.

Code security and best practices

Corridor provides real-time feedback to the agent on code implementation and security design decisions as code is being written.

Semgrep automatically scans AI-generated code for vulnerabilities using hooks, giving the agent real-time feedback to regenerate code until security issues are resolved.

Dependency security

Endor Labs uses hooks to intercept package installations and scan for malicious dependencies, preventing supply chain attacks like typosquatting and dependency confusion before they enter your codebase.

Agent security and safety

Snyk integrates Evo Agent Guard with hooks to review agent actions in real-time, detecting and preventing issues like prompt injection and dangerous tool calls.

Secrets management

1Password uses hooks to validate that all required environment files from 1Password Environments are properly mounted before shell commands execute, enabling just-in-time secrets access without writing credentials to disk.


To deploy Cursor with enterprise features and priority support, talk to our team.

Filed under: product

Authors: Michael Feldstein, Michael Scherr & Travis McPeak

Hooks for security and platform teams · Cursor