Legba MCP server for Cursor
Connect Cursor Agent to Legba with one project file. The server adds disposable browser control without local browser orchestration.
The full browser lifecycle.
Cursor receives the full six-tool lifecycle from Legba. It can spawn a fresh Chromium session on a residential IP, navigate pages, act on controls, extract rendered content, and capture screenshots. Once the job finishes, session.destroy removes the session's cookies, storage, tokens, and fingerprint before the next task starts.
Add the project config.
Create .cursor/mcp.json at the workspace root. Use ~/.cursor/mcp.json only when every workspace needs Legba. If the file already lists servers, add legba inside its existing mcpServers object.
Cursor launches this command as a local MCP process. The process receives LEGBA_API_KEY from the env block and uses it when requesting sessions. No alternate server name or package alias is needed. Review the command before approving it inside a shared workspace.
{
"mcpServers": {
"legba": {
"command": "npx",
"args": ["-y", "legba-browser-mcp"],
"env": {
"LEGBA_API_KEY": "lgb_your_api_key"
}
}
}
}Replace the placeholder with your Legba API key. Keep the live key out of source control. Save the file, then restart Cursor or refresh the server from Settings, then MCP.
Confirm Cursor sees Legba.
- Open Cursor settings, then MCP. Confirm
legbaappears as an available server without a startup error. - Open the server's tools. Cursor should discover
session.spawn,navigate,extract,act,screenshot, andsession.destroy. - Ask Agent to spawn a browser session. A successful call returns a session ID. Navigate to a test URL, inspect the result, then destroy the session.
If legba appears but its tools stay empty, check the JSON nesting. Confirm the package is exactly legba-browser-mcp. Restart the server and review Cursor's MCP output before trying another prompt.
Continue with the docs, API quickstart, or cloud API pricing.
Also installing for: Claude Code, Claude Desktop, VS Code, and Windsurf.