SecretVault MCP
Bounded egress gateway & secret proxy for AI agents and applications, enabling safe credential injection into upstream requests while keeping raw secrets out of LLM prompt contexts.
README
SecretVault
Bounded Egress Gateway & Secret Proxy for AI Agents and Applications. Safely inject credentials into approved upstream requests while keeping raw credentials out of LLM agent prompt contexts.
Why SecretVault?
Traditional secret managers return raw plaintext API keys and database passwords to applications. When AI agents (such as Claude Code or custom LLM tools) handle raw secret values, those secrets inevitably leak into LLM context streams, prompt logs, and telemetry data.
SecretVault enforces a Bounded Egress Gateway Model:
- š”ļø Bounded Egress Gateway Claim: MCP tools, agent SDKs, and REST API calls cannot retrieve raw secret plaintexts. AI agents receive masked previews (
sk-live-***1234) or proxy reference tokens (sv://...). - š Server-Side Credential Proxy: Agents route requests through SecretVault's reverse proxy (
/proxy/:service/*), which decrypts and injects real credentials server-side directly into outbound HTTP headers. - š Upstream Response Trust Boundary: SecretVault injects credentials into outbound requests, but response bodies returned by third-party services reside within the upstream service's trust boundary. Current mitigations include HTTPS-by-default destinations, private-network rejection, and canonical origin validation; transparent response-body sanitization and universal path/method policy are not claimed.
- š AES-256-GCM Encryption: All secrets are encrypted locally using AES-256-GCM before being saved to Supabase/PostgreSQL.
- š Human-Only Step-Up Auth: High-risk Web UI operations (such as revealing raw secrets to human operators) require hardware WebAuthn Passkeys or TOTP 2FA assertion.
Architecture Diagram
graph TD
User["š¤ Human Operator (Browser Web UI)"] -->|"Step-Up Auth (Passkey/TOTP)"| WebUI["š SecretVault Web UI (/ui)"]
Claude["š¤ Claude Code / AI Agent"] -->|"Streamable HTTP / SSE"| MCP["ā” SecretVault MCP Server (:3004)"]
App["š» Application / Agent Code"] -->|"proxy() with sv_... key"| Proxy["š Credential Proxy (/proxy/*)"]
MCP -->|"Masked Previews / References"| Claude
Proxy -->|"Inject Decrypted Credential"| Upstream["āļø Upstream Service (GitHub, OpenAI, etc.)"]
WebUI -->|"Encrypted Blobs"| DB[("šļø Supabase PostgreSQL")]
MCP -->|"Encrypted Blobs"| DB
Proxy -->|"Read Encrypted Secret"| DB
Quickstart & Setup
Connecting to SecretVault requires two sequential steps: Deploying the SecretVault Server (core infrastructure), followed by Configuring Developer AI Tools (connecting Antigravity IDE, Claude Code, etc.).
Step 1: Deploy SecretVault Server (Required First)
Deploy the core SecretVault server (AES-256-GCM proxy + Web UI + MCP engine).
Option 1A: 1-Line Server Installer (Recommended)
Interactive installer that configures database connections, generates encryption keys, and provisions Docker Compose:
curl -fsSL https://raw.githubusercontent.com/itsaygea/secretvault/main/install-server.sh | bash
Option 1B: Manual Docker Compose Deployment
# 1. Clone repository & enter directory
git clone https://github.com/itsaygea/secretvault.git
cd secretvault
# 2. Prepare environment configuration
cp .env.example .env
# 3. Generate 32-byte master key & edit .env
openssl rand -hex 32
nano .env # Paste master key and database connection parameters
# 4. Restrict file permissions & launch stack
chmod 600 .env
docker compose up -d
# 5. Verify health check & access Web UI
curl http://localhost:3004/health/ready
# Open http://localhost:3004/ui in browser
Step 2: Connect Developer AI Tools & Clients
Once your SecretVault server is running, connect your AI developer tools (Antigravity IDE, Claude Code, Claude Desktop, OpenCode, Codex):
Option 2A: Interactive Developer Client Setup Wizard
Automatically provisions linking keys and configures MCP settings across all detected developer tools:
curl -fsSL https://raw.githubusercontent.com/itsaygea/secretvault/main/install-client.sh | bash
(Or launch directly via npx: npx --package=git+https://github.com/itsaygea/secretvault.git secretvault-mcp setup).
Option 2B: Terminal Secret Manager CLI
Manage secrets directly from your terminal or SSH shell:
# Setup developer tool integrations
npx --package=git+https://github.com/itsaygea/secretvault.git secretvault-mcp setup
# Manage secrets via CLI
npx --package=git+https://github.com/itsaygea/secretvault.git secretvault-mcp secret list
npx --package=git+https://github.com/itsaygea/secretvault.git secretvault-mcp secret create
npx --package=git+https://github.com/itsaygea/secretvault.git secretvault-mcp secret rotate
npx --package=git+https://github.com/itsaygea/secretvault.git secretvault-mcp secret delete
š Full Installation Guide: See docs/install.md for detailed server options, PostgreSQL migrations, and Caddy HTTPS setup.
Documentation Index
- š Self-Host & Installation Guide ā Step-by-step AFFiNE-style Docker Compose deployment guide.
- š» Usage & Developer Integration Guide ā Connecting Claude Code / Desktop MCP, using
@secretvault/clientand@secretvault/admin, and setting up Service Profiles. - š Versioned HTTP Contract ā OpenAPI 3.1 management/metadata schema and proxy contract surface.
- š”ļø Security Architecture & Threat Model ā AES-256-GCM cipher details, Docker Secrets RAM-mount, and Passkey/TOTP step-up auth.
- š§ Operations & Troubleshooting ā Database backups (
pg_dump), disaster recovery, container upgrades, and break-glass CLI tools.
Monorepo Layout
secretvault/
āāā packages/
ā āāā shared/ # Crypto (AES-256-GCM), masking, types, naming helpers
ā āāā mcp-server/ # MCP server + REST API + Web UI + Proxy
ā āāā client/ # Proxy-only application client (@secretvault/client)
ā āāā admin/ # Management client (@secretvault/admin)
ā āāā bridge/ # Deprecated proxy compatibility adapter
ā āāā sdk/ # Deprecated migration alias
āāā supabase/migrations/ # PostgreSQL schema migrations (001 - 011)
āāā docs/ # Public user guides (install, usage, security, ops)
āāā Dockerfile # Multi-stage production container build
āāā docker-compose.yml # Production Docker Compose distribution
License
SecretVault is open-source software licensed under the MIT License.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.