Skip to main content
Glama
Warden
by Delwalt

The Warden console: four calls held for approval, each showing the agent, the app and the exact arguments

The problem

AI agents are most useful when they can act: read your inbox, file the issue, post the update. To let them, you hand over an API token or sign them in to your account — and from then on they can do anything that account can, with no record of what they did and no way to say "yes to reading, ask me before sending".

Every tool that wants access asks for its own copy of your credentials, so they end up in config files across your machines, each one a full key to the account.

Related MCP server: ScopeGate

How Warden solves it

AI agents send requests to Warden with individual keys. Warden applies your policy to allow, deny, rate-limit, or hold each request for approval. Allowed and approved requests reach connected apps using credentials stored in Warden.

  • Agents never hold your credentials. Each gets its own Warden key. Your real tokens stay encrypted on your machine, and revoking an agent is one click.

  • Every call is checked against rules you write: allow, deny with a reason, limit per day, or ask you first.

  • You approve from your phone. A held call arrives as a notification showing exactly what the agent wants to do. One tap runs it — once — or refuses it.

  • Agents see only what you grant. An app an agent was not given is not just refused; it never appears in its tool list.

  • Everything is recorded in an audit log, with sensitive arguments redacted.

Warden speaks MCP, so anything that supports MCP servers can use it: Claude, ChatGPT, Cursor, VS Code, Codex and your own code.

Built-in apps: Gmail, Google Calendar, Slack, GitHub, Gitea and X. Add your own from the console: paste any MCP server's address and Warden imports its tools, or describe an HTTP API in one JSON file.

Run it on your computer

The quickest way to try Warden, with nothing to host. You need Node.js 22 (or Docker).

git clone https://github.com/Delwalt/warden.git
cd warden
npm run setup        # creates .env: keys and your console password
npm ci
npm run build
npm start

Open http://localhost:3000 and sign in. Then:

  1. Apps → Add app. Connect Gmail, GitHub or another app, or Add a custom app for an MCP server.

  2. Agents → New agent. Copy the key it shows once, choose which apps it may use, and write its rules.

  3. Connect your AI tool to http://localhost:3000/mcp with that key — see Connect your AI tools for Claude Code, Claude Desktop, Cursor and others.

Prefer Docker? After npm run setup, run docker compose up -d instead of the last three commands.

On your own computer, Warden runs only while the computer is on, and phone approvals need HTTPS (below). Everything else works from the console in your browser.

Self-host it

To approve from your phone, reach Warden from other devices, or connect ChatGPT and Claude.ai, run it on an always-on machine — a home server, a NAS or a small VPS — with HTTPS.

git clone https://github.com/Delwalt/warden.git && cd warden
node scripts/setup.mjs      # enter the https:// address you will use
docker compose up -d

For HTTPS, pick one:

  • Your own domain — point DNS at the machine, then docker compose --profile https up -d. The bundled Caddy gets the certificate. Answer yes to the Caddy question in setup.mjs and it fills in WARDEN_DOMAIN and WARDEN_TRUSTED_PROXY for you.

  • Tailscale — tailscale serve --bg 3000 gives Warden an HTTPS address on your tailnet, reachable from your phone and nobody else.

  • Your own reverse proxy — forward to port 3000 and set WARDEN_TRUSTED_PROXY=true only if it overwrites X-Real-IP with the client address.

Then open Warden on your phone, add it to the home screen, and choose Devices → Enable approvals.

Warden holds live credentials. Keep it on a private network (Tailscale is the simplest) unless you need ChatGPT or Claude.ai to reach it; see SECURITY.md.

Back up the .env file and the data volume together. The encryption key in .env is the only way to read the credentials in the database.

Write rules

Each agent has one rule document. Anything no rule allows is denied.

{
  "rules": [
    { "tool": "gmail_search", "decision": "allow" },
    { "tool": "gmail_send", "decision": "require-approval" },
    { "tool": "github_*", "decision": "rate-limit", "limit": 200 },
    {
      "tool": "slack_post_message",
      "decision": "deny",
      "reason": "Ask in chat first."
    }
  ]
}

The Agents page builds these for you: pick an app, then Allow, Ask, Limit or Deny per tool. A rule can name a connection to apply to one account of an app. Tools that publish or delete (posting to X, for example) always ask, whatever the rules say.

Settings

Settings live in .env; npm run setup writes the required ones. Restart Warden after changing them.

Setting

Default

WARDEN_PUBLIC_URL

http://localhost:3000

Where you open Warden. OAuth callbacks are <this>/api/oauth/callback.

WARDEN_APPROVAL_WINDOW_HOURS

24

How long a held call can be approved. Up to 168.

WARDEN_SESSION_HOURS

12

How long a console sign-in lasts. Up to 720.

WARDEN_KEY_IN_URL

off

true allows /mcp/<key>, for ChatGPT. See docs/connect.md.

WARDEN_TRUSTED_PROXY

off

true only behind a proxy that overwrites X-Real-IP with the client address.

DATABASE_URL

./data/warden.db

The SQLite file (setup writes this). /data/warden.db in Docker.

WARDEN_CUSTOM_APPS_DIR

custom-apps beside the database

Where apps added in the console are saved.

WARDEN_ENCRYPTION_KEY

generated

Encrypts stored credentials. Never change it on a running install.

WARDEN_DASHBOARD_PASSWORD_HASH

generated

Console password. Change it with npm run auth:hash.

WARDEN_VAPID_*

generated

Keys for push notifications to your phone.

Updates

Warden uses semantic versioning. Each release is a GitHub release with notes from CHANGELOG.md; choose Watch → Custom → Releases on GitHub to hear about new ones. The console shows the running version at the bottom.

git pull
docker compose up -d --build     # or: npm ci && npm run build && npm start

Database migrations run on start.

Every release is also published as a multi-arch image, ghcr.io/delwalt/warden:<version> (and :latest). To use it instead of building, replace build: . with image: ghcr.io/delwalt/warden:0.1 in docker-compose.yml, then docker compose pull && docker compose up -d.

Contributing

Warden is a Next.js app with a SQLite database. AGENTS.md maps the code and its conventions, for people and for the AI tools you use to change it.

npm ci
npm run setup
npm run db:migrate
npm run dev

npm run check runs what CI runs: lint, format, typecheck, tests and the build. npm run test:e2e runs the browser tests (port 3100; set WARDEN_E2E_PORT to change it).

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      A local-first MCP server that lets AI agents use gated APIs without holding keys, enforcing declarative policies, injecting secrets server-side, and auditing access without content.
      85 npm
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Permission gateway that hands an AI agent a scoped MCP endpoint instead of an OAuth token: connect 27 services (Gmail, Google Calendar/Drive/Ads/Search Console, Slack, Notion, GitHub, Jira, Salesforce, HubSpot, Stripe, LinkedIn, X, Meta Ads and more), grant per-action permissions finer than native OAuth scopes, audit every call and revoke a key in one click. Self-hostable, MIT.
      18
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Self-hosted key gateway for AI agents: the agent requests access over MCP, the owner approves it in Telegram or the web UI, and the agent gets a temporary pass limited by time and number of calls instead of the API key. Read-only mode, per-field data filter and audit log.
      3
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      A self-hosted enterprise MCP gateway that lets AI agents connect through a single /mcp endpoint and reach only the upstream MCP servers and tools they have been granted. Every tool call is authenticated, authorized, rate-limited, held for human approval where required, and recorded in a tamper-evident audit log.
      2
      Apache 2.0