Skip to main content
Glama
agent-login

agent-login

by omdivyatej

agent-login

MCP tools so an agent can sign into a website without seeing your password.

You stay in the browser you already use. We open that app with your existing profile (cookies and all) so a fresh Chromium does not force a new login. Tools: sign_in, complete_sign_in, browse, list_sessions, revoke.

Local only. Not a cloud vault.

Why this is different: it reuses the browser you're already logged into

Most agent browser tools spin up a blank Playwright profile. Blank means no cookies, so every run dumps you back on a login screen — you re-authenticate, re-do 2FA, re-solve the bot check, every single time. The session dies with the process.

agent-login does the opposite. It finds the Chromium-based browsers you actually have (Chrome, Brave, Arc, Edge, Vivaldi, Opera, …), picks the one with the freshest cookies — i.e. the browser you were just using — and opens that real profile. So:

  • You're usually already logged in. The sites you have open in your normal browser are open for the agent too. No fresh sign-in.

  • No credentials anywhere near the model. The password lives in your browser's keychain, not in the chat or the logs.

  • Sessions persist. Close the chat, come back tomorrow — the profile (and its logins) are still there.

"Freshest cookies" is the whole trick: instead of guessing which browser or making you configure a profile path, it reads the last-modified time on each browser's cookie store and uses the one you're living in. Override any time with AGENT_LOGIN_BROWSER=chrome|brave|arc|msedge.

Related MCP server: OpenBrowser

Install

Needs Node (for npx). Nothing else — the first run installs its Python runtime by itself.

Cursor

Add to ~/.cursor/mcp.json (merge with your existing servers):

{
  "mcpServers": {
    "agent-login": {
      "command": "npx",
      "args": ["-y", "github:omdivyatej/agent-login"]
    }
  }
}

Reload MCP / restart Cursor. You should see sign_in, complete_sign_in, browse.

Claude Code

claude mcp add agent-login -- npx -y github:omdivyatej/agent-login

First launch takes a minute: it installs uv (a Python runner) if you don't have it, then fetches the server. After that it's instant.

Try it

Ask the agent:

Use agent-login. Sign into https://example.com/login as session demo, then tell me what you see.

  1. Quit the browser if it is already running (one process per profile).

  2. We pick the Chromium-based browser you actually use (freshest cookies: Chrome, Brave, Arc, Edge, Vivaldi, Opera, …) and open that profile — you should already be logged in.

  3. Only sign in if that site still asks. Do not paste the password in chat.

  4. Tell the agent you are signed in.

  5. It calls complete_sign_in, then browse. Leave that window alone while the agent works.

Safari (and Firefox) are not in this path — Playwright cannot reuse Safari's profile. If Safari is your only browser, install Chrome/Brave/Edge or set AGENT_LOGIN_ISOLATED=1 (empty profile, you log in once).

Force a browser with AGENT_LOGIN_BROWSER=chrome|brave|arc|msedge|…. Isolated empty profiles: AGENT_LOGIN_ISOLATED=1. Attach to a browser started with remote debugging: AGENT_LOGIN_CDP=http://127.0.0.1:9222.

How it is shaped

  • Daemon on 127.0.0.1:19876 owns Playwright and named profiles.

  • MCP stdio is a thin client. If the daemon is down, it starts one.

mcp is the default command. We open whatever Chromium browser you already live in; we only download Playwright Chromium if none is installed. Sessions live in ~/.agent-login/. Delete a site with revoke, or rm that folder.

Already have uv?

Skip Node and run the Python entry point directly:

{
  "mcpServers": {
    "agent-login": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/omdivyatej/agent-login", "agent-login"]
    }
  }
}

CLI checks:

npx -y github:omdivyatej/agent-login status
npx -y github:omdivyatej/agent-login serve

Limits

This is session-sharing with your consent. Sites that bind logins to device/IP (Google, banks, some shops) may reject the headless replay. Device-bound cookies cannot be copied off the machine by design.

Available Tools

5 tools
browseA

Read a page using a named session. Omit url to reuse the sign_in url.

If the result is LOGIN_REQUIRED, call sign_in, wait, complete_sign_in, retry.

Inputs: name (required), url. Returns: result

complete_sign_inA

Call after the user says they finished logging in. Saves the session (cookies stay in a local browser profile) and closes the login window.

Inputs: name (required). Returns: result

list_sessionsA

List saved website sessions and whether a login window is open.

Inputs: no named parameters. Returns: result

revokeA

Delete a named session and its local browser profile.

Inputs: name (required). Returns: result

sign_inA

Open the user's real installed browser (Chrome, Brave, Arc, Edge, …) with their existing profile so they are already logged in. name is just a label. Chromium locks the profile: if that browser is already running, ask them to quit it, then retry. After the signed-in page is visible, call complete_sign_in. Never ask for a password. Safari cannot be driven this way.

Inputs: url (required), name (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: starting a login flow, completing it, browsing with a session, listing sessions, and revoking them. The sign_in/complete_sign_in pair is sequential rather than overlapping, and their descriptions make the boundary explicit.

    Naming Consistency5/5

    All tool names use lowercase snake_case imperative verbs, and the naming pattern is consistent: sign_in, complete_sign_in, browse, list_sessions, revoke. The verb-first style is uniform and predictable.

    Tool Count5/5

    Five tools is an appropriate size for a login/session management server. Each tool covers a necessary part of the workflow without redundancy or bloat.

    Completeness5/5

    The toolset covers the full session lifecycle: create a session, complete login, use the session, list sessions, and revoke sessions. It also handles the LOGIN_REQUIRED retry flow, so there are no obvious dead ends.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to access content from authenticated web pages by opening a real browser for manual login and session capture. It saves browser profiles locally so users only need to log in once per service for future automated access.
      4
      154 npm
      36
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI tools to browse the web as the user by providing access to a persistent browser session with logged-in accounts, supporting recipes for email, PRs, calendar, and more.
      5
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with a user's real Chrome browser tabs, executing JavaScript, reading cookies, and making fetch requests within authenticated sessions.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a persistent browser profile for AI agents, enabling them to log in once and maintain sessions across restarts. Supports 20 tools for browsing, navigation, text extraction, and screenshot.
      1
      MIT