| name | test-account-workflow |
|---|---|
| description | Local and CI workflow for a disposable Proton Pass account used by development and integration testing. |
Use one disposable Proton Pass account for this repository's development and integration testing, while keeping normal day-to-day Proton usage separate.
Related planning documents:
docs/testing/CODEX_MCP_AUTH_SPEC.mddocs/testing/CODEX_MCP_TEST_PLAN.mddocs/testing/THROWAWAY_DATA_PLAN.md
Based on Proton Pass CLI docs:
- Web login:
pass-cli login - Interactive login:
pass-cli login --interactive [USERNAME] - PAT login:
PROTON_PASS_PERSONAL_ACCESS_TOKEN=... pass-cli loginorpass-cli login --personal-access-token ...
Interactive login can be automated with:
PROTON_PASS_PASSWORDorPROTON_PASS_PASSWORD_FILEPROTON_PASS_TOTPorPROTON_PASS_TOTP_FILE(if 2FA is enabled)PROTON_PASS_EXTRA_PASSWORDorPROTON_PASS_EXTRA_PASSWORD_FILE(if Pass extra password is enabled)
SSO and U2F/FIDO hardware-key login are web-login-only.
PAT login requires a token that has already been provisioned. Upstream docs imply that PATs are created/managed from an already-authenticated account session and then reused for later scoped logins.
This MCP server does not implement a separate token-based authentication layer. It invokes pass-cli as a subprocess and inherits the server process environment.
Implications:
- If
pass-clican authenticate in that environment, MCP tools can run. - If
pass-clicannot authenticate, MCP tools return auth errors and require login out-of-band. - PAT-backed login is now a documented
pass-clisession source, but it remains out-of-band from the MCP server. - PAT administration is a separate design question from login itself; see
docs/ADR/ADR-005-pat-auth-boundary-and-tooling.md. - For project development, the canonical CLI entrypoints are
npm run pass -- ...,scripts/pass ..., orscripts/pass-dev.sh ...; barepass-cliis outside the normal repo safety convention.
Use a persistent repo-local session + filesystem key provider:
PROTON_PASS_SESSION_DIR=<repo>/.tmp/proton-pass-dev-sessionPROTON_PASS_KEY_PROVIDER=fs
Login once, then run MCP repeatedly without re-entering credentials until session expiry/logout.
Use ephemeral session + env key provider:
PROTON_PASS_SESSION_DIR=$RUNNER_TEMP/proton-pass-dev-sessionPROTON_PASS_KEY_PROVIDER=envPROTON_PASS_ENCRYPTION_KEY=<ci-secret>
Preferred when available: authenticate with a pre-provisioned PAT:
export PROTON_PASS_PERSONAL_ACCESS_TOKEN=<scoped-pat>
pass-cli loginFallback/bootstrap path: authenticate with pass-cli login --interactive using environment/file inputs for password, TOTP, and extra password as required by the account.
{
"mcpServers": {
"proton-pass-community-mcp": {
"command": "node",
"args": ["/absolute/path/to/proton-pass-community-mcp/dist/index.js"],
"env": {
"PASS_CLI_BIN": "pass-cli",
"PROTON_PASS_SESSION_DIR": "/absolute/path/to/proton-pass-mcp/.tmp/proton-pass-dev-session",
"PROTON_PASS_KEY_PROVIDER": "fs",
"PASS_CLI_ALLOW_VERSION_DRIFT": "true"
}
}
}
}Preferred npm entrypoint:
npm run pass -- <pass-cli-args...>Equivalent shell wrappers:
scripts/pass <pass-cli-args...>
scripts/pass-dev.sh <pass-cli-args...>This wrapper defaults to:
PROTON_PASS_SESSION_DIR=<repo>/.tmp/proton-pass-dev-sessionPROTON_PASS_KEY_PROVIDER=fs(no OS keychain access by default)
The wrapper intentionally avoids the keyring backend in normal project usage.
- Allowed defaults:
fsorenv - Escape hatch:
PASS_DEV_ALLOW_KEYRING=1 PASS_DEV_KEY_PROVIDER=keyring ...
Do not use bare pass-cli for normal project work if you want the repo-local session and key-provider guardrails.
scripts/pass-dev.sh login
# or:
scripts/pass-dev.sh login --interactive throwaway-account-idVerify:
scripts/pass-dev.sh info
scripts/pass-dev.sh user info --output jsonSet your expected throwaway account:
export PASS_DEV_EXPECTED_ACCOUNT=throwaway-account-idThen run:
scripts/pass-dev-preflight.shThis fails fast if the currently authenticated CLI account does not match the expected throwaway account.
That distinction matters: the wrapper isolates project auth from your default desktop/browser session, but the preflight is what actually enforces "secondary account only".
Your Proton Pass desktop app and pass-cli are different clients. This repository workflow is CLI-scoped and uses its own session directory, so it does not require day-to-day account switching in the desktop app.
Additionally, with scripts/pass-dev.sh, the CLI is configured to avoid keychain/keyring by default (PROTON_PASS_KEY_PROVIDER=fs unless explicitly changed). This applies only to CLI sessions launched through the wrapper and does not change desktop-app or browser-extension configuration.
For SSH:
- Keep your existing system SSH agent flow as default.
- If you test
pass-cli ssh-agent start, use a custom socket path and exportSSH_AUTH_SOCKonly in that shell session. - Prefer
pass-cli ssh-agent loadinto your existing agent when you want minimal disruption.
There is no documented static API token login mode in current CLI docs. Use one of these models:
- Shared throwaway account credentials distributed out-of-band (lowest setup overhead, weaker attribution).
- One dedicated test account per contributor (best attribution/isolation, more setup).
For either model:
- Never commit credentials.
- Keep project session dir isolated via
scripts/pass-dev.sh. - Require
scripts/pass-dev-preflight.shin any script that can mutate state.
Recommended CI env:
PROTON_PASS_SESSION_DIR=$RUNNER_TEMP/proton-pass-dev-sessionPROTON_PASS_KEY_PROVIDER=envPROTON_PASS_ENCRYPTION_KEYfrom CI secret store- Login via
pass-cli login --interactive <test-user>with env/file-based password/TOTP/extra-password inputs - Run
scripts/pass-dev-preflight.sh <test-user-account-identifier> - Run tests
- Cleanup with
pass-cli logout(orpass-cli logout --forcefallback)
This repository includes a manual workflow template:
.github/workflows/pass-cli-integration-manual.yml
It is workflow_dispatch only and intended as an opt-in smoke/integration job for the throwaway account.
This repository also includes a manual drift check workflow:
.github/workflows/pass-cli-template-drift-weekly.yml
It is workflow_dispatch only and checks whether item create <type> --get-template output drifts from the committed snapshot artifact.
Automation policy note:
- Upstream version/tag change detection is handled by
.github/workflows/upstream-pass-cli-watch.yml. - Template drift checks are now opt-in/manual to avoid long-lived weekly secrets operations.
Required GitHub Actions secrets:
PROTON_PASS_USERNAMEPROTON_PASS_PASSWORDPROTON_PASS_EXPECTED_ACCOUNTPROTON_PASS_ENCRYPTION_KEY
Optional secrets (only if the account requires them):
PROTON_PASS_TOTPPROTON_PASS_EXTRA_PASSWORD
Template drift check commands:
npm run pass:dev:template:driftnpm run pass:dev:template:snapshot:update(only when intentionally accepting template changes)npm run pass:dev:template:probe(empirical required/optional/nullability probe; no cleanup by default)npm run pass:dev:template:probe:additional-properties(empirical unknown-key acceptance probe; no cleanup by default)
Rate-limit caution for probe runs:
- Proton Pass CLI docs do not currently publish explicit rate-limit guarantees.
- For repeated/large probe runs, add pacing:
node scripts/probe-item-create-template-contract.mjs --run --delay-ms=250 - Enable cleanup only when needed:
node scripts/probe-item-create-template-contract.mjs --run --cleanup
To remove guesswork, run a one-time manual validation across all providers you care about. Record outcomes in your own maintainer notes.
PASS_DEV_KEY_PROVIDER=fs scripts/pass-dev.sh login- Restart terminal and run
scripts/pass-dev.sh info - Confirm MCP tools operate in inspector/client
- Run
scripts/pass-dev.sh logout
Expected: stable, isolated project behavior; no keychain/keyring dependency.
PASS_DEV_ALLOW_KEYRING=1 PASS_DEV_KEY_PROVIDER=keyring scripts/pass-dev.sh login- Restart terminal and run
scripts/pass-dev.sh info - Run a minimal MCP tool call
- Run
scripts/pass-dev.sh logout
Expected: CLI session persists/reloads via OS keychain/keyring and MCP still works.
- Set
PROTON_PASS_KEY_PROVIDER=envandPROTON_PASS_ENCRYPTION_KEY=<test-value> - Authenticate with
scripts/pass-dev.sh login --interactive <user> - Run
scripts/pass-dev.sh infoand one MCP tool call - Clear env and logout
Expected: no filesystem/keychain dependency; behavior suitable for ephemeral runners.
- Environment variables are readable by other processes in the same session; use file-based inputs where possible for automation.
- If you use
logout --force, server-side session invalidation may not happen. - If you keep TOTP enabled on the throwaway account, fully unattended CI requires TOTP automation.