# autologin-mcp

> autologin-mcp is an open-source MCP server for browser automation. Lets AI coding agents log into the web app under test without exposing the password. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Self-hosted
- **Website:** https://olgaysezgin.github.io/autologin-mcp/
- **Repository:** https://github.com/olgaysezgin/autologin-mcp
- **MCP Registry name:** io.github.olgaysezgin/autologin-mcp
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation), [qa testing](https://ai-powered.com/categories/qa-testing)
- **Listing updated:** 2026-11-27

## About

Coding agents that test a web app in a real browser often hit a login wall when a session expires or a token is revoked. This MCP server takes over that step: the agent asks it to log in, and it fills the form on the page using credentials kept in a local file on the user's machine.

The model only receives a one-time loader script with a short-lived local URL and the final outcome, such as success, a failure message, or a request for a human when SSO, passkeys, captchas or one-time codes are involved. Credentials are released only to pages on the profile's own site, and tool results are scrubbed of passwords.

It is aimed at developers and QA engineers who run Claude Code with Claude in Chrome, Playwright MCP or chrome-devtools-mcp against staging or local apps and want long test runs to continue without manual sign-ins.

## Features

- **Automatic login on demand:** The agent calls the login tool when it sees a login form, a 401/403, a login redirect or a session-expired message.
- **Password kept out of chat:** Credentials go from a local file straight into the page, so the model never handles them.
- **Origin-checked credential release:** Credentials are sent only to pages whose browser-set Origin matches the profile's site.
- **One-time 127.0.0.1 bridge:** Each loader script works once, binds to loopback and expires after 60 seconds.
- **Handoff for hard logins:** SSO, passkeys, captchas and one-time codes are returned to the user instead of retried.
- **Lockout protection:** Three failed logins in five minutes pause the profile to avoid locking the account.

## Good for

- Keep an AI agent testing a checkout or dashboard flow after the session expires
- Run end-to-end browser tests on a staging app that requires login
- Let a coding agent reproduce bugs behind authentication without sharing the password
- Switch between several test accounts for the same app during a run

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add autologin-mcp -- npx -y autologin-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add autologin-mcp -- npx -y autologin-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.autologin-mcp]
command = "npx"
args = ["-y", "autologin-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user autologin-mcp npx -- -y autologin-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "autologin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "autologin-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 of 4 tools read data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `list_profiles` (name suggests: reads): Lists profile name, root URL and username for each profile. Never passwords.
- `login`: Returns a one-time loader script in bridge mode, or the login result directly in CDP mode; reports needs_human when a person must finish.
- `login_status` (name suggests: reads): Returns the latest login outcome per profile.
- `open_config`: Opens the credentials file in an editor or returns its path; the content is never returned.

## FAQ

### How do I let Claude Code log in to my web app without giving autologin-mcp my password?

Install autologin-mcp with npx autologin-mcp install and add a login profile in a normal terminal with npx autologin-mcp add. When Claude Code's browser tab shows a login form, Claude calls the login tool and autologin-mcp fills the form with the credentials stored on your machine. Claude only sees the outcome, never the password.

### Does the password ever reach the AI model?

No. The password goes from a local credentials file directly into the page, over a one-time 127.0.0.1 bridge that checks the page's origin or through the Chrome DevTools Protocol. Tool results are redacted, and a guard hook blocks the agent from reading the credentials file.

### Do I need to enable Chrome remote debugging?

No. The default bridge mode needs no browser setup. Remote debugging enables CDP mode, which helps when the app's Content-Security-Policy blocks the bridge.

### Does autologin-mcp support SSO, two-factor authentication or multi-step logins?

It fills the common username and password form on the app's own page, including identifier-first logins. Single sign-on, passkeys, captchas and a one-time code after the password are handed to the user. Filling TOTP codes, logins that navigate to a second document, and iframes are on the roadmap.

### Is autologin-mcp free?

Yes. autologin-mcp is open source, so you can use and self-host it for free.

### How do I add autologin-mcp to Claude Code?

Run this command in your terminal: claude mcp add autologin-mcp -- npx -y autologin-mcp

### What are the best alternatives to autologin-mcp?

The closest alternatives to autologin-mcp are Browser MCP, playwright_mcp, Browser Ref MCP, Agent-first-browse and Playwright MCP.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Browser MCP](https://ai-powered.com/mcp/browser-mcp): Browser MCP is an open-source MCP server for browser automation.
- [playwright_mcp](https://ai-powered.com/mcp/playwright-mcp-3): playwright_mcp is an open-source MCP server for browser automation.
- [Browser Ref MCP](https://ai-powered.com/mcp/browser-ref-mcp): Browser Ref MCP is an open-source MCP server for browser automation.
- [Agent-first-browse](https://ai-powered.com/mcp/agent-first-browse): Agent-first-browse is an open-source MCP server for browser automation.
- [Playwright MCP](https://ai-powered.com/mcp/playwright-mcp): Playwright MCP is an open-source MCP server for browser automation.
- [NextCore Browser](https://ai-powered.com/mcp/nextcore-browser): NextCore Browser is a freemium MCP server for browser automation.
- [Turno Browser](https://ai-powered.com/mcp/turno-browser): Turno Browser is an open-source MCP server for browser automation.
- [kitewright](https://ai-powered.com/mcp/kitewright): kitewright is an open-source MCP server for browser automation.

---
Source: https://ai-powered.com/mcp/autologin-mcp
