Request: support --storage-dir in `obscura mcp` for persistent cookies/session
Feature Description
The obscura mcp subcommand (both stdio and --http transports) does not support --storage-dir, so cookies/localStorage live only in process memory and are lost on restart. Please consider adding --storage-dir support to obscura mcp (or confirm whether it's planned).
Motivation
MCP is the primary way agents (Claude Desktop, Claude Code, Codex, custom agent stacks) drive Obscura, and obscura mcp --http is the documented sidecar deployment pattern. In Docker/container deployments, persistent sessions matter:
docker run+obscura mcp --httpwith a mounted volume — users expect--storage-dirto work like it does forserve/fetchso a login survives container restarts.- The only current workaround is exporting/importing session state through the
browser_storage_state/browser_set_storage_stateMCP tools (agent-side JSON persistence), which works but is manual, fragile for large storage, and not what a volume mount implies. fetch,serve, andscrapeall accept--storage-dir(confirmed incrates/obscura-cli/src/main.rs);obscura_mcp::run()/http::run()simply don't receive the parameter today.
Proposed Solution
Wire --storage-dir into the mcp subcommand and pass it through to the browser/cookie store, with the same semantics as serve: all sessions in the process read/write one directory (cookies.json + localStorage/<origin>.json), written on clean exit and after each navigation.
Alternatives Considered
- Keeping agent-side
browser_storage_stateJSON round-trips (works, but manual and not volume-mount friendly). - An env var (e.g.
OBSCURA_STORAGE_DIR) as an alternative to the flag — either is fine; the flag would match the other subcommands.
Source: h4ckf0r0day/obscura