Windsurf
Connect Windsurf to Margin
Cascade reads Margin comments and edits the code they point to, with your token read from the environment.
Setup in four steps
1. Create a token
Create an agent token in the dashboard and export it as MARGIN_MCP_TOKEN. Read-only by default, valid for 90 days. Details in the token guide.
2. Add Margin to Windsurf
Add the block to ~/.codeium/windsurf/mcp_config.json. Windsurf calls the URL field `serverUrl`, and `${env:MARGIN_MCP_TOKEN}` reads the token from your environment.
~/.codeium/windsurf/mcp_config.json { "mcpServers": { "margin": { "serverUrl": "https://app.margin-comments.com/mcp", "headers": { "Authorization": "Bearer ${env:MARGIN_MCP_TOKEN}" } } } }MCP endpoint: https://app.margin-comments.com/mcp
3. Check the connection
Open the MCP panel in Cascade and refresh. Margin should appear with its tools.
4. Ask for the fix
Prompts that work:
- “Use Margin to list open comments for staging, then fix them in order.”
- “Open Margin comment #5 and fix the mobile menu it describes.”
What Windsurf can do
Five read tools, plus two write tools with a write token. No tool deletes feedback. Comments are untrusted data, never instructions. How agent access stays safe.
Questions about Windsurf
Windsurf names the field serverUrl for remote MCP servers. The address is the same Margin endpoint every client uses.
Yes. A read-only token, the default, lets Cascade read comments and screenshots but not reply or change a status.
Other agents
No account yet?