Skip to main content
← Legba MCP server
Legba MCP

Legba MCP server for Cursor

Connect Cursor Agent to Legba with one project file. The server adds disposable browser control without local browser orchestration.

What you get

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.

Install

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.

.cursor/mcp.jsonjson
{
  "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.

Verify

Confirm Cursor sees Legba.

  1. Open Cursor settings, then MCP. Confirm legba appears as an available server without a startup error.
  2. Open the server's tools. Cursor should discover session.spawn, navigate, extract, act, screenshot, and session.destroy.
  3. 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.