ELSM

Connect Your Agent

ELSM ships a local MCP server, elsm-mcp, that hands your AI agent the keys to the real browser: read and edit LocalStorage and SessionStorage — and read Cookies and IndexedDB — through the ELSM extension, on the exact tab you are looking at.

MCP (stdio)ws://127.0.0.1:39231Chrome & FirefoxNode ≥ 20

How It Works

The bridge only talks to loopback: storage data flows between the extension and your agent on your machine. Your agent itself may send retrieved data to its LLM provider — that's between you and your agent.

Your AI agent (Claude, Codex, Cursor, ...)
        │ stdio (MCP protocol)
        ▼
  elsm-mcp  ← port 39231, pairing token in ~/.elsm-bridge/token
        │ ws://127.0.0.1:39231 (token + protocol version handshake)
        ▼
  ELSM extension (offscreen document / background)
        │ privileged APIs (chrome.cookies, tabs, page access)
        ▼
  The active tab you are working on — its real storage

Safety model

  • Loopback only — the WS server binds to 127.0.0.1.
  • Every connection is authenticated with a pairing token you confirm once per browser.
  • Every agent write lands in the sidebar changelog — you see exactly what changed.

Consent rules

  • Cookie values come back redacted (<redacted>) unless you grant raw-value consent in the UI — HttpOnly included.
  • Wiping an entire area requires you to arm Clear-all in the sidebar first (60-second window).
  • Free plans get read-only access; editing storage is a Pro ability.

Setup In Three Steps

01 Start the bridge to get your pairing token

02 Pair the extension

Open the ELSM sidebar → Agent Access page, paste the token, confirm the port (default 39231) and hit Connect. The status dot turns green — Paired. Grant raw cookie values there too if you want agents to read real cookie values.

03 Add the MCP server to your agent — pick it below

Open your agent, focus the tab you care about and try: "show me the localStorage keys on this page".

Connect Your Agent

One package, one port, every client. If your client is not listed, anything that speaks stdio MCP with a command + args entry works — point it at npx -y @elsm/mcp --port 39231.

Tool Reference

9 tools, scoped to the currently active tab's origin. Every tool needs an ELSM account: a Free account can start a one-time 7-day agents trial from the sidebar (capped at 50 calls per day), then they unlock permanently with Pro. The trial is never started for you — press Start 7-day free trial when you want the clock to begin. Long-standing Free plan snapshots keep a legacy read-only 50 calls/day allowance.

ToolPlanWhat it does
list_storage_areasProWhat the bridge can operate on right now: origin, which storage areas exist, IndexedDB database names.
get_targetProDescribe the active target: tab id, URL, origin, page title. No secrets.
read_storageProRead keys from LocalStorage or SessionStorage of the active tab's origin — one key, a prefix, or everything.
read_cookiesProEvery cookie visible to the active tab: name, domain, path, secure, httpOnly, sameSite. Values redacted unless raw-value consent was granted in the UI.
write_storageProSet entries ({key, value}) in LocalStorage or SessionStorage. Each write is logged to the sidebar changelog. Keys locked in the ELSM sidebar are skipped and returned in blockedKeys — they are never written.
delete_keysProDelete specific keys from LocalStorage or SessionStorage on the active tab's origin. Locked keys are skipped and returned in blockedKeys.
clear_areaProWipe an entire storage area. Two-step: it returns needs-confirmation first — arm Clear-all in the sidebar, then re-run with confirm: true within 60 seconds. Locked keys survive the clear and come back in blockedKeys.
read_indexeddbProCursor-paged, JSON-safe read of an IndexedDB object store: db, store, cursor (offset from the previous call's nextCursor), limit (default 200, max 1000).
export_stateProSnapshot the tab: origin, localStorage, sessionStorage and cookie metadata (values always redacted).

Manage Connected Agents

Every agent that has ever called in shows up in the sidebar — Agent access → Manage connected agents — with its name and version (taken from the MCP handshake), last-used time, total calls, and the last action it ran.

Block

Instantly refuses an agent's tool calls at the gate — the agent gets a "blocked by user" error. Unblock any time.

Revoke

Blocks the agent permanently and erases its usage history. For a full cut-off, use Disconnect — or delete ~/.elsm-bridge/token and re-pair to rotate the credential itself.

Audit

Blocked and refused attempts are recorded too. The pairing token remains the real trust boundary — per-agent blocking is enforced at the extension's gate.

What Your Agent Can't Do

No silent cookie values

Values come back <redacted> until you flip raw-value consent in the Agent Access page — the call still succeeds, but real values stay hidden until then. HttpOnly cookies are behind the same fence.

No bulk clear without you

clear_area returns a needs-confirmation result unless you armed Clear-all in the sidebar during the last 60 seconds — and the agent must retry with confirm: true. Arming expires automatically and is consumed by one clear.

No changes without a trace

Every write, delete and clear is appended to the sidebar changelog next to your own edits — with the key, the value and when it happened.

Troubleshooting

Pairing failed — check the token and port

The token in the Agent Access page must match ~/.elsm-bridge/token (or your --token-file). If you renamed the token file, set ELSM_TOKEN_FILE or pass --token-file in your client config. Confirm the agent's config and the extension field use the same port.

The status pill says “Waiting for bridge”

That is the idle state: the extension is listening for the bridge and nothing is running yet. Your MCP client launches elsm-mcp on demand, so open the agent once, or run npx -y @elsm/mcp --port 39231 in a terminal to keep it alive while you test. “Connecting…” only appears while an attempt is actually in flight.

Refused: bad-token / unsupported-version

The extension found the bridge but the handshake failed — re-paste the token, update the extension and elsm-mcp to matching versions, then hit Connect in the Agent Access page.

The agent sees <redacted> cookie values

That's the default — calls succeed but values stay redacted. Enable “Let agents read raw cookie values” under Agent Access to hand real values over. It only affects cookie values — web-storage values are always returned in full.

clear_area says Clear-all is not armed

Open the Agent Access page and press Arm, then re-run the tool with confirm: true within 60 seconds. The arming is consumed by one clear. This deliberately gates bulk deletion behind a human.

The agent gets trial-not-started or trial-expired

Agent tools need either a running agents trial or Pro. The trial is per feature and only begins when you press “Start 7-day free trial” on the Agent Access page of the sidebar — signing up alone does not start it. Once it ends, Pro unlocks the tools permanently.

The agent gets quota-exceeded

During the agents trial, the Free plan allows 50 agent calls per day (successful reads included). The counter resets each local day — or upgrade to Pro for unlimited agent access.

How do I see (or cut off) which agents have called in?

Open Agent access → Manage connected agents. Every agent that made a call is listed with its name, version, last-used time and total calls — block or revoke any of them there. Disconnect on the Agent access page stops the bridge for all agents at once.

Don't have the extension yet? Install ELSM, then let your agent do the boring storage work.