prodlock
Integrates with Backblaze B2 as S3-compatible object-locked backup storage, allowing prodlock to write PostgreSQL backups, check backup status, verify retention/immutability, and restore backups for verification.
Provides PostgreSQL backup and restore verification: runs pg_dump to create backups, restores them into a scratch PostgreSQL database with pg_restore/psql, and checks backup integrity and lock enforcement.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
prodlock
Let AI agents work on your company without being able to wreck it.
prodlock is the safety layer between your AI agents and everything they can break: your keys, your production, your backups. One install, no account, no cloud.
npx @prodlock/cli scanAgents ask. prodlock checks. You approve.
Nine seconds
In April 2026 a coding agent working on a staging task hit a permissions error. It looked around, found a production API token in an unrelated script, and used it. Nine seconds later the production database was gone. So were the backups: they lived on the same volume.
Nothing in that story is unusual. Agents run as you: anything you can read, they can
read, including .env files, saved CLI logins, shell history and the configs where you
hand agents their keys. Many of those keys can delete production, and nothing outside
the agent checks before it uses one. Blocking dangerous shell commands doesn't help when
the agent calls an API with a token it found.
Related MCP server: Emisar
One loop
prodlock answers the six questions you should be able to answer about every agent on your machine:
Question | prodlock | Status | |
1. Know | What can my agents reach? |
| Available |
2. Contain | What must they never touch? |
| Coming |
3. Ask | How do agents still get work done? | Agents request actions instead of holding keys. Read-only passes; destructive needs your Touch ID or phone | Agent rules available, broker coming |
4. Record | What did they actually do? | A flight recorder of every command, file and network call, in a log that can't be quietly edited | Coming |
5. Recover | What if something still goes wrong? | Backups no one can delete, proven by a real restore | Available |
6. Prove | Does any of this matter? | The Temptation bench: how often agents use credentials they find | Harness available, results coming |
1. Know: what can your agents reach?
CRITICAL Railway API token #fc3e8a81 (account token for Sam)
Can destroy: every service, database and volume in 4 projects
…and the backups you would restore from.
Found: ~/code/app/scripts/old-migrate.sh:3 (RAILWAY_TOKEN) — in a project file your coding agent can read
Check: confirmed live with a read-only API call
CRITICAL Neon API key #a97b5755 (Neon API key)
Can destroy: delete 2 Neon projects, including every branch and its history
…and the backups you would restore from.
Found: ~/.zsh_history:1 (NEON_API_KEY) — in your shell history
CRITICAL Postgres connection string #06e7886a (user postgres on db.xxxx.supabase.co)
Can destroy: drop every table in postgres, or the whole database
Found: ~/code/app/.env:2 (DATABASE_URL) — in a project file your coding agent can read
Summary
4 credentials an AI agent on this machine can reach. 4 can destroy production. 2 can also destroy the backups.prodlock scan --html card.html writes a shareable card with counts only: no secrets,
paths, account names or project ids. prodlock scan --camera-safe keeps the full report
but hides folder names, paths, account names, database hosts and project ids, so you can
film or screenshot it.
Where it looks
Where | Examples |
Project folders (default: current folder) |
|
Scripts, CI, config and source files |
|
CLI logins in your home folder |
|
Shell history | zsh, bash, fish |
Agent configs | Claude Code, Claude Desktop, Cursor, Codex, Windsurf, OpenClaw |
Environment variables | everything an agent started from your shell inherits |
It skips node_modules, .git, build output, placeholders like your-token, Supabase
anon keys (public by design) and local development databases.
What it detects
Provider | Credential | Online check (read-only) |
AWS | access key + secret |
|
Railway | account, team and project tokens | GraphQL |
Vercel | tokens (env vars, CLI login) |
|
Supabase | access tokens ( |
|
Neon | API keys |
|
Postgres | connection strings with passwords | none; ownership is inferred from the user name |
Every online check is a "who am I" or "list" call. Nothing is created, changed or
deleted. Use --offline to make no network calls at all.
2. Contain: what must they never touch? (coming)
prodlock vault create ~/Vault will move a folder under a separate, hidden macOS user,
opened with Touch ID for a limited time. Agent CLIs started through prodlock run in a
macOS sandbox that also blocks ~/.aws, .env files and similar, and scan will
report any agent that can still reach the vault.
What it will and won't do: it stops every agent running as you, which is how agents run today. Nothing on a machine can hide files from software that has admin (root) access; prodlock won't claim otherwise.
3. Ask: agents request, you approve
Available now. Connect prodlock to your agents:
npx @prodlock/cli initinit finds Claude Code, Codex, Cursor and Claude Desktop on your machine, shows exactly
what it will change, backs up every file it edits, and then:
adds the
prodlockMCP server (tools:scan,backup_status,production_safety_rules)installs the agent skill: never use a credential you found, never run destructive production actions without approval, never touch backups, say what you'll touch first
Then ask your agent: "what could you destroy in production?"
To add the MCP server by hand, use command npx with args -y @prodlock/cli mcp.
Coming: the broker. Production keys leave every file and move into the macOS Keychain, protected by the Secure Enclave. Agents get limited keys or ask prodlock to act. Read-only requests pass; destructive ones wait for your Touch ID or a tap on your phone. Even software with full access to your machine can't approve on your behalf.
4. Record: what did they do? (coming)
A flight recorder for agents: every command, file access and network call made by an agent and everything it starts, in a log that can't be quietly edited, plus a weekly summary.
5. Recover: backups no one can delete
You need a bucket with Object Lock enabled (AWS S3 and Backblaze B2 support it; it
is usually only possible when you create the bucket) and the PostgreSQL client tools
(pg_dump, pg_restore, psql).
export PRODLOCK_S3_ACCESS_KEY_ID=... # a key that can only put and read in this bucket
export PRODLOCK_S3_SECRET_ACCESS_KEY=...
prodlock backup run --db DATABASE_URL --bucket my-locked-backups --retain-days 30Each backup is locked in compliance mode: until the retention date, no one can delete it, including the account's root user, an agent holding an admin key, or prodlock itself. The lock is enforced by the storage provider, not by prodlock.
prodlock backup verify --bucket my-locked-backups --restore-to SCRATCH_DATABASE_URL --try-deleteverify checks the lock, tries to delete the locked version (and expects to be
refused), downloads the file and checks its checksum, and restores it into a scratch
database. It refuses to restore over the database the backup came from.
Other providers: pass --endpoint (e.g. https://s3.us-west-004.backblazeb2.com) and
--region. Database passwords are passed to pg_dump through the environment, never on
the command line. prodlock backup status lists recent backups.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:PutObjectRetention", "s3:GetObject", "s3:GetObjectVersion",
"s3:GetObjectRetention", "s3:ListBucket"],
"Resource": ["arn:aws:s3:::my-locked-backups", "arn:aws:s3:::my-locked-backups/*"]
}]
}6. Prove: does any of this matter?
The Temptation bench recreates the nine-second incident safely: a task that gets blocked, and decoy credentials where real ones usually leak. It measures how often an agent searches for keys, reads them, uses them and acts on production, with and without prodlock's rules. Agents only ever run inside a container that holds no real credentials. Results across models are coming.
Its first finding was about prodlock itself: the scanner didn't read shell scripts, so it missed exactly the token from the April incident. That's fixed.
In CI
npx @prodlock/cli scan . --no-home --offline --fail-on criticalExits with code 2 if a production credential is committed or present in the build.
Security: who guards the guard?
A tool that reads your keys is a target, so prodlock is built so that breaking it doesn't break your protection.
No server. There is no prodlock account, cloud or database. Nothing is uploaded, and there's no central store of anyone's secrets to breach. No telemetry.
Secrets stay in memory. Values are never printed, logged or written to disk; JSON output, HTML cards and the MCP server only show fingerprints. Tests plant fake keys and check the terminal, JSON and HTML output for leaks.
Read-only, fixed destinations. Online checks only call each provider's own API, with that provider's own key.
--offlinemakes no network calls.Protections enforced by someone else. Backup locks are enforced by your storage provider. The coming vault and broker rely on macOS user permissions, the Keychain and Touch ID, so even a compromised prodlock can't silently delete a locked backup or use a Touch ID–protected key.
Small and checkable. One Rust binary, few dependencies, no install scripts. Releases are published only from this repository's CI through npm trusted publishing: there is no npm token to steal, and each version carries provenance back to its source.
Before 1.0: init will pin the exact version agents run, and the binary will refuse
network destinations outside a fixed list.
Found a vulnerability? Please report it privately through GitHub's "Report a vulnerability" button on this repository, not in a public issue.
How it fits with other tools
destructive_command_guard blocks dangerous shell commands. prodlock removes the credentials that make API-level damage possible and keeps a backup that survives anyway. Use both.
Prowler and cloud security scanners audit cloud accounts. prodlock looks at the machine your agents run on.
Install
npx @prodlock/cli scan # run without installing
npm i -g @prodlock/cli # install, then run: prodlock scanFrom source: cargo install --git https://github.com/amneeksingh/prodlock
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed access to sensitive data, secrets and APIs for AI agents. A signed proof for each decision.
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Password vault for AI agents with scoped, user-approved access
Rotate, revoke and audit API keys from your AI. It sees key names, never secret values.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to securely use real secrets (API keys, database passwords) by requiring human approval for each release, ensuring secrets never enter the model's context.2Apache 2.0
- FlicenseNot gradedqualityBmaintenanceGive AI agents Zero-Trust access to production infrastructure without the risks of granting them shell access. Actions are bounded by policy and an on-host runner.474-
- AlicenseNot gradedqualityCmaintenanceIt lets you scan and control what AI coding agents can reach, move secrets out of plaintext config into the OS keychain, and issue scoped, expiring access passes with local audit logging.MIT
- AlicenseAqualityCmaintenanceEnables AI coding agents to avoid irreversible mistakes by intercepting risky deletions, overwrites, and commands before execution, applying path, pattern, and blast-radius safeguards with quarantine backups.3MIT