
sessvault
io.github.bigwalkdoe/sessvault
Encrypted, read-safe browser session access for AI agents via MCP stdio.
Documentation
sessvault
Authenticated, read-safe web session access for AI agents.
Quickstart • MCP Server Setup • CLI • MCP Tools • Security
MCP Registry: mcp-name: io.github.bigwalkdoe/sessvault
sessvault captures browser login sessions (cookies + localStorage) into an encrypted local vault, then exposes domain-locked MCP tools over stdio so AI agents can fetch authenticated pages as clean Markdown without handling raw credentials.
Why sessvault?
Agents often need to read authenticated pages (dashboards, issues, PRs, settings) but shouldn't handle raw cookies or tokens. sessvault keeps the session in an encrypted local vault and hands the agent only cleaned Markdown/links/metadata:
- Encrypted local vault — AES-256-GCM at rest; master key in the OS keyring (or
SESSVAULT_MASTER_KEY_HEXoverride). - Domain-locked fetches — allowlist enforced before navigation, on requests/redirects, subresources, iframes, auth challenges, and the final URL.
- Read-safe by default — MCP returns Markdown/links/metadata, never raw cookies/localStorage.
run_session_stepsis only exposed with--write. - Ephemeral browser contexts — headless fetches use isolated temp user-data dirs and hard timeouts.
- Secret redaction — MCP errors are scrubbed of headers, Bearer tokens, sensitive key/value pairs, and long hex/token strings.
Quickstart
Prerequisites
- Chrome/Chromium on
PATH(or setSESSVAULT_BROWSER_PATH) SESSVAULT_MASTER_KEY_HEX(64 hex chars) if the OS keyring is unavailable
Install
From source:
cargo install --path .
From GitHub releases:
Download the archive for your platform from Releases, extract it, and put sessvault on your PATH.
Build locally:
cargo build --release
cargo test -q
1. Capture a session (opens a visible browser)
sessvault auth github --url https://github.com/login --allow github.com,*.github.com
2. Verify the environment
sessvault doctor
3. List profiles (no secrets)
sessvault list
4. Start the MCP server (read-only by default)
sessvault serve
CLI
sessvault auth <profile> [--url <login-url>] [--allow <domain,...>]
sessvault list
sessvault serve [--read-only] [--write]
sessvault rm <profile>
sessvault doctor
auth— opens a headed browser, waits for login, captures cookies/localStorage on window close or Ctrl+C. For existing profiles,--urland--allowdefault to stored values.list— shows profiles, allowed domains, expiry/status, last used. No secrets.serve— stdio MCP server. Read-only by default; pass--writeto exposerun_session_steps.rm— deletes profile metadata and the encrypted vault file.doctor— checks browser, data dir, keyring/master key, profiles, and CDP headless launch smoke.
MCP Server Setup
sessvault serve speaks stdio JSON-RPC 2.0 with no background daemons and no API keys.
OpenCode (opencode.json)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"sessvault": {
"type": "local",
"command": ["sessvault", "serve"],
"enabled": true
}
}
}
For development from this repo:
{
"mcp": {
"sessvault": {
"type": "local",
"command": ["cargo", "run", "--quiet", "--", "serve"],
"enabled": true
}
}
}
Claude Desktop / generic stdio MCP config
{
"mcpServers": {
"sessvault": {
"command": "sessvault",
"args": ["serve"]
}
}
}
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"sessvault": {
"command": "sessvault",
"args": ["serve"]
}
}
}
This repo also includes an OpenCode command at .opencode/commands/sessvault.md.
MCP Tools
| Tool | Description | Write-gated |
|---|---|---|
list_sessions | List profiles/domains/expiry. No secrets. | No |
fetch_session_page | Fetch an authenticated page as Markdown/links. | No |
run_session_steps | Click/fill/press/wait, then snapshot. | Yes (--write) |
Environment
| Variable | Purpose |
|---|---|
SESSVAULT_BROWSER_PATH | Override the Chrome/Chromium binary |
SESSVAULT_DATA_DIR | Override the vault data directory |
SESSVAULT_MASTER_KEY_HEX | 64 hex chars (32-byte) master key override for CI/testing |
Security notes
- Vault files are encrypted at rest with AES-256-GCM; master key stored in the OS keyring by default and never written to disk.
- Domain allowlist is enforced before navigation and on request/redirect checks.
- MCP tools never return raw cookies/localStorage values; errors are sanitized.
run_session_stepsis disabled unless--writeis passed.- Auth challenges are canceled in read-safe fetch mode.
Troubleshooting
- Keyring unavailable: set
SESSVAULT_MASTER_KEY_HEX(64 hex chars). - No browser found: set
SESSVAULT_BROWSER_PATHor install Chrome/Chromium. - Headed auth on Wayland: ensure
DISPLAY/WAYLAND_DISPLAYis available; close the browser window to save. - Capture hangs: press Ctrl+C in
sessvault auth; capture has snapshot timeouts and failure detection. - Expired profile: re-run
sessvault auth <profile>(uses stored URL/allowlist) or provide--url/--allowexplicitly.
Development
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test -q
# Real Chrome e2e (ignored by default)
cargo test -- --ignored --nocapture
See docs/SMOKE.md for local and manual third-party OpenCode smoke procedures.
License
MIT
sessvaultcargo install sessvaultRelated Servers
io.github.bigwalkdoe/ctxpane
Local-first context daemon for MCP coding agents on Linux, macOS, and Windows.
io.github.bigwalkdoe/logcut
Local-first stacktrace, log, and compiler error slicer for AI agents and terminals.
io.github.bigwalkdoe/mcpspy
Zero-config MCP traffic inspector, latency profiler & token auditor in Rust.