Windsurf Integration
Windsurf is an AI-powered IDE by Codeium. You can route Windsurf’s AI requests through the LeanMCP AI Gateway to monitor what code is being sent to AI providers.Prerequisites
Get Credits
Purchase credits at ship.leanmcp.com
Create API Key
Create an API key at ship.leanmcp.com/api-keys with SDK permissions
Configuration
Open Windsurf Settings
Press
Cmd + , (Mac) or Ctrl + , (Windows/Linux) to open SettingsOr click the gear icon in the bottom left cornerConfigure Custom API Endpoint
Look for settings related to custom AI providers or API endpoints:Base URL / API Endpoint:API Key:

Alternative: Settings JSON
You can also configure Windsurf via its settings JSON file:Verifying the Setup
- Open a project in Windsurf
- Use the AI assistant (Cascade) to ask a question about your code
- Check your LeanMCP Dashboard to see the request logged
What You Can Monitor
With the AI Gateway, you can see:| Data | Description |
|---|---|
| Code Context | Exact code snippets sent to the AI |
| File Paths | Which files are included in requests |
| Token Usage | Input and output tokens per request |
| Costs | Real-time cost tracking |
| Sensitive Data | Detected secrets, keys, or PII |
Why Use AI Gateway with Windsurf?
See What's Sent
Windsurf sends surrounding code as context. Know exactly what’s included.
Detect Secrets
Get alerts if API keys or passwords are accidentally sent to AI.
Track Costs
Monitor your AI spending across all coding sessions.
Compliance
Maintain audit logs for security and compliance requirements.
Troubleshooting
Cascade not responding
Cascade not responding
- Check your API key is valid and has credits
- Verify the base URL is correct
- Ensure Windsurf is using the custom endpoint (check settings)
Settings not persisting
Settings not persisting
- Make sure to save settings before closing
- Try editing the settings JSON file directly
- Restart Windsurf after making changes
Requests not appearing in dashboard
Requests not appearing in dashboard
- Confirm you’re using the LeanMCP API key (starts with
leanmcp_) - Wait a few seconds - there may be a brief delay
- Check the correct workspace/account in the dashboard