Skip to main content
← Legba MCP server
Legba MCP

Legba MCP server for Claude Code

Register Legba once from your project directory. Claude Code can then operate a disposable browser through its normal tool flow.

What you get

Browser tools inside the terminal.

Claude Code receives tools for spawning, navigating, acting, extracting, screenshotting, and destroying a browser session. Each session runs real Chromium with a fresh residential IP and fingerprint. The final destroy call removes browser state before another coding task begins.

Install

Add the local server.

Run this command from the project that needs Legba. Claude Code stores the server in its default local scope, so the entry stays private to you and that project. The separator before npx passes the remaining arguments to the MCP server.

The command explicitly selects the stdio transport. It registers the package without creating a shared .mcp.json file. That keeps the key out of the repository while preserving the same server name, executable, arguments, and environment variable documented on the MCP overview.

terminalbash
claude mcp add --env LEGBA_API_KEY=lgb_your_api_key --transport stdio legba -- npx -y legba-browser-mcp

Replace the placeholder before running the command. It registers the server name legba, launches npx -y legba-browser-mcp, and passes the same LEGBA_API_KEY used by the main MCP guide.

Verify

Check the connection.

  1. Run claude mcp get legba. The result should show the stdio command and its arguments.
  2. Start Claude Code and run /mcp. Open the legba entry. Confirm it is connected and all six browser tools are available.
  3. Request a fresh browser session. Confirm session.spawn returns a session ID, then test navigate and finish with session.destroy.

If the entry exists but remains disconnected, inspect claude mcp get legba first. Check the placeholder was replaced and the package name is unchanged. Remove and add the entry again only after correcting the command.