mcp-warden

mcp-warden

mcp-warden•byermoluk

A local-first credential broker that runs as a Model Context Protocol server, injecting stored secrets server-side so an AI agent can act without seeing them.

License: Apache-2.0•Runtime: Awaiting documentation review•Category: auth security

WHAT IT DOES

  • •Exposes a proxy_http tool that validates requests against a preset's allow-list before injecting the credential and executing the call.
  • •Keeps secrets only in the OS keychain, and sensitive presets trigger an approval prompt on the host or over Telegram.

BEST FOR

  • •Coding agents that need to call authenticated APIs such as GitHub with a stored token that never enters the context window.

ABOUT MCP-WARDEN

mcp-warden is cataloged as an MCP server attributed to ermoluk. A local-first credential broker that runs as a Model Context Protocol server, injecting stored secrets server-side so an AI agent can act without seeing them. It is categorized under auth security. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Apache-2.0. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for mcp-warden are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the agent ever see my credentials?

No; the agent's context holds no secrets, credentials are injected server-side, and an upstream-echoed credential is redacted before the agent sees it.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 888baaa62f28 · 采集于 2026-11-13 06:13:24 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

mcp-warden

A local-first credential broker for the Model Context Protocol — lets any AI coding agent (Claude Code, Cursor, Cline, Codex, Continue, Zed) take real actions without ever seeing your secrets.

The agent calls high-level tools (proxy_http); mcp-warden injects the secret server-side, executes the action, and returns only the result. Your context window stays clean. A leaked transcript leaks nothing useful.

ci crates.io License: Apache-2.0

mcp-warden demo: the agent calls the GitHub API through a preset without seeing the token, a prompt-injected DELETE is refused before any request is sent and lands in the audit log as refused, an SSH deploy runs after approval in Telegram, and mcp-warden scan finds a plaintext key in ~/.claude.json that import moves into the keychain

How it works

  1. You store a credential once in the OS keychain via the mcp-warden CLI.
  2. You define presets — named, scoped actions (e.g. github-read, stripe-charges).
  3. The AI agent connects to mcp-warden as an MCP server (stdio).
  4. When the agent wants to act, it calls proxy_http with a preset name and a path/method.
  5. mcp-warden validates the request against the preset's allow-list, injects the credential, executes, and returns only the response.
  6. Sensitive presets trigger an approval prompt: a native dialog on macOS and Windows, a desktop notification with Approve / Deny on Linux, or a Telegram message on any OS — where /lock also works as a kill switch from your phone. Opt in to time-boxed approvals per preset so one OK can cover a short burst of follow-up calls without re-prompt spam.
  7. Every action lands in a local SQLite audit log, hash-chained and anchored in the keychain so an edit shows (mcp-warden audit verify) — including a windowed decision for calls authorised by an active approval window, a refused decision (with the raw requested path or command) for calls the allow-list turned away, and a failed decision when the approval prompt could not be shown.

The agent's context window contains zero secrets.

Install

Every option installs the same single binary — no background service, no auto-updater, no telemetry. To update, run the same tool again.

macOS and Linux — Homebrew

brew install ermoluk/tap/mcp-warden

Windows — Scoop

scoop bucket add ermoluk https://github.com/ermoluk/scoop-bucket
scoop install ermoluk/mcp-warden

A winget package (ermoluk.mcp-warden) and an AUR package (mcp-warden-bin) are coming but not listed yet. Until they are, use Scoop on Windows, and Homebrew or the install script below on Arch Linux; on Linux the script installs the static musl build.

Nix (builds from source)

nix profile install github:ermoluk/mcp-warden

npm — for MCP clients configured with npx. The package is scoped: the unscoped mcp-warden on npm is an unrelated project.

{ "mcpServers": { "mcp-warden": { "command": "npx", "args": ["-y", "@mcp-warden/cli", "mcp"] } } }

The binary for your platform comes from an optional dependency; nothing is downloaded at install or run time. npx @mcp-warden/cli init and the other subcommands work the same way.

Rust — prebuilt with cargo-binstall, or from source (Rust 1.94.1+):

cargo binstall mcp-warden
cargo install --locked mcp-warden

Install script — downloads the release archive for your machine, refuses it unless it matches the release's SHA256SUMS, and puts the binary in ~/.local/bin (Windows: %LOCALAPPDATA%\Programs\mcp-warden\bin). No sudo, and it changes neither your PATH nor your shell profile. Read it first if you like: install.sh, install.ps1.

curl -fsSL https://github.com/ermoluk/mcp-warden/releases/latest/download/install.sh | sh
irm https://github.com/ermoluk/mcp-warden/releases/latest/download/install.ps1 | iex

Claude Desktop — download the .mcpb bundle for your platform from the latest release and open it. The bundle contains only the server; install the CLI with one of the options above to create presets and store secrets.

By hand — every GitHub release has archives for macOS (arm64, x86_64), Linux (x86_64, aarch64; static musl builds, plus an x86_64 glibc build) and Windows (x86_64), a combined SHA256SUMS, and a build-provenance attestation for each archive:

gh attestation verify mcp-warden-aarch64-apple-darwin.tar.gz --repo ermoluk/mcp-warden

The macOS binaries are not notarized. Homebrew, npm, cargo and the install script don't mark them as downloaded, but an archive or bundle saved from a browser may be blocked by Gatekeeper until you run xattr -d com.apple.quarantine on it.

There is no Docker image, on purpose: the OS keychain — macOS Keychain, Windows Credential Manager, the Linux kernel keyring — isn't reachable from inside a container, and mcp-warden never falls back to keeping secrets in a file.

90-second quickstart

mcp-warden init
mcp-warden secret add gh_pat                  # paste your GitHub PAT when prompted
mcp-warden preset add github-read \
  --type http \
  --base-url https://api.github.com \
  --auth-bearer gh_pat \
  --allowed-methods GET \
  --allowed-paths /user/repos \
  --approval auto --confirm-auto

The preset auto-approves only GET /user/repos; any other path is refused before the token is touched. To let the agent read more, widen the allow-list (e.g. --allowed-paths '/user/repos,/repos/OWNER/[^/]+') and prefer a fine-grained PAT limited to specific repos. Patterns match the whole path, as exact strings or regexes anchored as ^(?:…)$, never as prefixes; [^/]+ is safer than .* for one segment. They see the percent-decoded path, so %2F is a separator: a GitLab-style id like /projects/group%2Fproject needs /projects/[^/]+/[^/]+. An HTTP preset with no allowed_paths allows every path under base_url — preset add and doctor warn about it, and the built-in github-read / gitea-read / stripe-read templates ship with approval = "prompt" for that reason.

Wire mcp-warden into your agent — see docs/claude-code-setup.md or docs/cursor-setup.md.

In your agent: ask "list my GitHub repos via mcp-warden". Watch the agent call list_presets, then proxy_http — and watch your PAT stay out of the prompt.

mcp-warden audit --last 5                     # see what the agent did

Find and fix plaintext keys

Keys pasted into MCP client configs sit on disk in plaintext, where the agent, a synced dotfile or a screenshot can pick them up. Three commands fix that:

mcp-warden scan                     # where are plaintext keys? (shows type + length, never values)
mcp-warden import                   # move them into the keychain and rewire the client entries
mcp-warden run github               # what the rewired entry runs: the server, with its key injected

scan reads Claude Code, Claude Desktop, Cursor, Windsurf, VS Code and Codex configs plus .mcp.json / .env files in the current directory (--path DIR for more). import handles keys in a stdio server's env; for keys in arguments, headers, URLs or .env files, scan says what to do instead. To wrap a server by hand: mcp-warden server add github --env GITHUB_PERSONAL_ACCESS_TOKEN -- npx -y @modelcontextprotocol/server-github (the value is read from stdin). Details: docs/scan-and-import.md.

CLI reference

CommandDescription
mcp-warden initCreate the config directory and a template config
mcp-warden secret add <name>Store a secret (value read from stdin, never argv)
mcp-warden secret listList secret names (never values)
mcp-warden secret remove <name>Delete a secret from the keychain
mcp-warden preset add <name> ...Define a preset (--confirm-auto required for auto, then an approval prompt confirms it)
mcp-warden preset confirm [name]...Confirm auto presets through the approval prompt; an edited auto preset asks until confirmed again
mcp-warden preset listShow all presets
mcp-warden preset test <name>Validate a preset against the current keychain
mcp-warden preset test <name> GET /pathPolicy simulator: would this call be allowed, and why? Sends nothing (--command, --get/--put, --query for other tools)
mcp-warden preset grant <name> --for 1hTime-limited access: calls are refused after the window (--permanent clears it)
mcp-warden preset revoke <name>End access to a preset now (next server start; lock for immediately)
mcp-warden lock [--reason …]Kill switch: every MCP server refuses every call from its next one on (or send /lock to the Telegram bot)
mcp-warden approval telegram-testCheck the Telegram setup: token, chat, a test prompt you answer
mcp-warden unlockRemove the lock after a human approves it in the dialog / Telegram
mcp-warden scanFind plaintext keys in MCP client configs and .env files (never prints values)
mcp-warden importMove the keys scan found into the keychain and point the client at mcp-warden run
mcp-warden server add <name> --env VAR [--path DIRS] -- <cmd…>Wrap another MCP server; its key is read from stdin into the keychain
mcp-warden run <name>Launch a wrapped MCP server with its keys injected (use as the client's command)
mcp-warden preset scaffold <template> (v0.3.0)Generate a preset from a built-in template (--list to discover)
mcp-warden preset from-openapi <src> (v0.3.0)Bootstrap a preset from an OpenAPI 3.x spec (URL or file)
mcp-warden approval <preset> <policy> [--window N]Set approval policy; --window N (sec) enables time-boxed approvals for prompt
mcp-warden audit [--last N | --since T] [--decision D]…Read-only view of the audit log (append-only by design), with what the agent asked for — including refused calls — and which MCP client and session made each call. --decision refused --decision failed shows only those decisions; --window N shows approval #N and every call that ran inside the window it opened
mcp-warden audit verify [--format json]Check the audit log's hash chain and every event against it, and the log against its anchor in the keychain; names what was changed, deleted, cut short or rewritten. Exit code 1 if anything does not hold
mcp-warden doctor [--deep] (v0.3.0 for --deep)Diagnostic summary; --deep runs safe read-only HTTP probes per preset
mcp-warden web [--port N] (v0.3.0)Local read-only web UI (binds 127.0.0.1 only)
mcp-warden mcpRun the MCP server over stdio (consumed by the AI agent)

MCP tools exposed

  • list_presets — read-only catalogue of available actions.
  • proxy_http — execute an HTTP request through a preset; allow-list validation runs before credential injection.
  • ssh_exec (v0.2.0) — run a shell command on an SSH host; command must match preset's anchored regex allow-list; key-based auth + host-key verification.
  • ssh_run (v0.6.0) — run one of an SSH preset's named commands: the command line is fixed in the preset, the agent supplies typed values (int, enum, string or path), checked before any credential is read. Optionally each command is also its own tool (expose_as_tools).
  • sftp_transfer (v0.2.0) — get/put a file over SFTP; remote path matches preset's sftp_allowed_paths, local path under $HOME or /tmp.
  • db_query (v0.2.0) — run a NAMED QUERY against PostgreSQL / MySQL / Redis. SQL/command is fixed at preset definition; agent supplies only query_name + positional params.
  • get_secret_for_env — last-resort tool when a child process must read a secret from env. Always prompts for approval, regardless of preset policy.

Claude Code plugin

For Claude Code there is a plugin that bundles the MCP server config, a skill that teaches Claude to use mcp-warden correctly (discover presets first, never ask for tokens, respect approvals, treat get_secret_for_env as a last resort) and a guided /mcp-warden:setup command. Install the binary first, then in Claude Code:

/plugin marketplace add ermoluk/mcp-warden
/plugin install mcp-warden@mcp-warden

Restart Claude Code and run /mcp-warden:setup. If you previously added the server with claude mcp add, remove that entry so it isn't registered twice. Details: plugins/mcp-warden/.

Other MCP clients: see docs/claude-code-setup.md and docs/cursor-setup.md for manual setup.

What's new in v0.6.1

A security release from an audit of 0.6.0. Its theme was the environment an mcp-warden process starts in: it belongs to whoever starts the process, an agent included, and several security checks read it. Upgrade.

  • mcp-warden run ignores the caller's PATH, environment and working directory. A wrapped server's command is found in its entry's own path (or a fixed default), the server starts with a cleared environment in your home directory, and the program the command resolves to is part of what you confirm. PATH=./bin:$PATH mcp-warden run github or NODE_OPTIONS=… can no longer hand the server's key to other code.
  • Windows: the approval dialog is the system's own PowerShell, found through the OS rather than SystemRoot, so no other program can answer your prompts.
  • SFTP's protected locations (~/.ssh, shell startup files, agent configs) follow your real home directory, not $HOME.
  • Plain-http credentials never go through a proxy (loopback http:// presets, OAuth2 token endpoints, doctor --deep).
  • preset from-openapi handles templated paths (/pets/{id} becomes /pets/[^/]+), escapes everything else, and prints the allow-list it generated.
  • Plus: SQLite 3.54 (RUSTSEC-2026-0459) and readable mcp-warden audit output.

After upgrading:

  1. Each wrapped server asks for confirmation once more on its next launch, naming the program by its full path.
  2. If a wrapped server's command lives outside the default path (nvm, asdf, volta), add it again with mcp-warden server add NAME --force --path "$PATH" --env VAR -- …, or give the command as an absolute path. mcp-warden doctor names any server whose command it cannot find.
  3. preset from-openapi --approval auto now needs --confirm-auto.

Every change, with the behaviour changes marked: CHANGELOG.md. The audit: docs/security/security-audit-2026-11-09.md.

How it compares

Other MCP credential brokers make different trade-offs:

mcp-wardenKeywardWundervaultJanee
Secret stays out of the agent's contextYes, except get_secret_for_env, which always asks firstNot returned to the agent; written into a project file such as .envYes, no tool returns a valueYes
What the agent can doHTTP (bearer, header, basic, query key, OAuth2, AWS SigV4), named SSH commands with typed parameters, SSH commands, SFTP, named SQL / Redis queriesHave a key written into a project fileHTTP (incl. OAuth 1.0a signing), SSH commands / rsync, x402 payments, signingHTTP (incl. AWS SigV4 / OAuth 1.0a signing), CLI tools with injected env vars
Per-call allow-listsHTTP method + path, SSH named commands (typed values) or command regex, SFTP paths, named DB queriesNot yet (per-key policy is on its roadmap)Allowed SSH hosts per key (any command on them); an approval is bound to the HTTP destination, method and pathHTTP method + path rules, allowed executables
Human approvalNative dialog (macOS, Windows), notification (Linux) or Telegram; on by defaultNative OS dialog per request, once or for the sessionPasskey, for secrets marked "ask me first"?
Where secrets liveOS keychainage-encrypted file, master key in the OS keystoreEnd-to-end encrypted hosted vault, used by a local brokerEncrypted file in ~/.janee/, master key in the OS keychain or a file
No cloud account or background serviceYesYesNo: needs a wundervault.com vault and a broker installed with admin rightsYes (stdio; HTTP mode for containers)
Audit logLocal SQLite, append-only, includes refused calls; hash-chained with a keychain anchor (audit verify)Local JSONL of decisionsOn your computer, signed, checked against a copy of the chain on their serverLocal JSONL of requests
Kill switchmcp-warden lock, or /lock in Telegram?Revoke an agent in the vaultRevoke a session (janee revoke)
Works with any MCP clientYesYesYesYes
LicenseApache-2.0MITAGPL-3.0 (the hosted vault is not open source)MIT
InstallHomebrew, Scoop, Nix, npm, cargo install / binstall, binaries for macOS / Linux / WindowsHomebrew, Scoop, go install, binariesnpm plus a broker installer, free accountnpm or Docker

Compared with Keyward 0.1.1, Wundervault MCP server 2.1.0 and Janee 0.16.0, from each project's README and docs as of November 2026. ? means not documented there. If something here is wrong or out of date, please open an issue.

Security model

mcp-warden's threat model and security invariants live in docs/threat-model.md. At a glance:

  • Secrets in the OS keychain only — never on disk in plaintext, never in logs.
  • A credential the upstream echoes back in a proxy_http response (an echo endpoint, an error that quotes the token) is replaced with [redacted by mcp-warden] before the agent sees it. The rest of the response is untrusted upstream data and is passed through as is.
  • Allow-list validation runs before credential injection.
  • Default approval policy is prompt; auto requires --confirm-auto at preset creation and a human confirmation in the approval prompt, bound to the preset's exact form — an edited auto preset asks again until mcp-warden preset confirm.
  • The MCP server loads and validates config.toml once at startup and never re-reads it: restart the server after editing presets.
  • Audit log is append-only — the trait surface itself contains no delete / clear method.
  • mcp-warden lock stops every running server at its next call; a server that has seen the lock stays locked until it restarts, and unlock needs a human to approve it.
  • Presets can cap and trim what proxy_http hands the agent (max_response_bytes, response_fields); a credential the upstream echoes back is always scrubbed.
  • ssh_exec refuses shell syntax whatever the preset's patterns allow, because sshd runs every command through the remote login shell. For a second allow-list on the server — a dedicated account, command= / ForceCommand and a gate script — see docs/ssh-hardening.md.
  • Wrapped servers (mcp-warden run) only get keys stored for them (server/<name>/<VAR>), never a preset's secret. Their command is fixed in the config and found in the entry's own path, not the caller's PATH; they start with a cleared environment, and the program is part of what you confirm. The key is still visible to the process it is handed to.
  • Stdout is the MCP protocol channel; all logs go to stderr.

License

Apache-2.0 — permanent commitment for the OSS core. See LICENSE.

mcp-warden stays fully functional for free, forever — see our open-core commitment.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for mcp-warden from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-warden)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related auth security MCP Servers

Alternative and complementary servers in the same category

View all in auth security →

A modular FastMCP server for interacting with Microsoft Graph API, supporting advanced queries for users, sign-in logs, MFA status, and privileged users.

Repository stats unavailable
Security & Secrets
Keycloak MCP Server
keycloak-mcp-server•sshaaf

A Model Context Protocol (MCP) server that provides programmatic access to Keycloak administration functionality.

Repository stats unavailable
Security & Secrets

An MCP server for LLM-driven penetration testing that wraps Kali tools and adds scope enforcement, engagement tracking, and structured output.

Repository stats unavailable
Security & Secrets