Cursor Integration
This guide shows how to use Tollgate with Cursor IDE to add policy-based access control to MCP servers.Prerequisites
- Cursor installed
- Node.js 20+ installed
@dotsetlabs/cliinstalled globally:
Quick Start
1. Open Cursor Settings
Open Cursor’s MCP configuration:- Open Cursor
- Go to Settings (Cmd+, on macOS)
- Search for “MCP” or navigate to MCP server settings
2. Configure with Tollgate
Instead of configuring the MCP server directly, wrap it with Tollgate. Direct connection (without Tollgate):3. Restart Cursor
Restart Cursor to apply the configuration.Using Configuration Files
For more control, use a Tollgate config file:1. Create Config
2. Configure Cursor
Filesystem Server Example
Protect the filesystem server commonly used with Cursor:Quick Protection
With Policy File
Create~/cursor-tollgate.yaml:
Multiple Servers
Configure multiple protected servers:Development Workflow
Balanced Policy for Development
Troubleshooting
Approval prompts not visible
Tollgate approval prompts appear in the terminal. When using Cursor:- Open Cursor’s integrated terminal
- Or keep a separate terminal window open
Configuration not loading
- Use absolute paths in Cursor config
- Validate config:
dotset tollgate validate -c ~/cursor-tollgate.yaml