What is AgentSecrets?
The Zero-Knowledge Difference
How AgentSecrets Works
Installation
Quick Start
Migrating from .env Files
Migrating from Vault / AWS
Migrating from dotenv-vault
Production Checklist
Credential Exposure
What Zero-Knowledge Means
The Proxy Model
The Three-Layer Model
Environments
Agent Identity
Storage Modes
The No get() Principle
Secret-Level Policies
Cloud Overview & Architecture
The Dual-Engine Model
Cloud Resolver Data Plane
Workload & Agent Tokens
Egress Allowlists & Audit Streams
Cloud REST API Reference
Account (init / login)
Server & Self-Hosting (server)
Docs
Shell Autocompletion
Keychain Auth
Secrets
Environments
Credential Proxy
env Injection
Workspaces & Teams
Projects
Agent Identity
Audit & Governance
Integrations Overview
Claude Desktop
Cursor
OpenClaw
HTTP Proxy (Any)
LangChain (Soon)
CrewAI (Soon)
CI/CD Pipeline
SDK Overview
Python SDK
Python API Reference
Python SDK Manual Testing
JavaScript SDK (Soon)
Ecosystem Overview
Zero-Knowledge MCP Server
Server Overview
5-Layer Architecture
Self-Hosting Guide
Authentication & Keys
Workspaces & Teams
Projects & Scope
Environments
Secrets & Sync Protocol
Agent Identity Resolution
Telemetry & Metrics Engine
Audit Log Sync
API Endpoint Reference
Security Overview
Anti-Impersonation & Process Verification
Encryption Model
Zero-Knowledge Sync
Proxy Security Layers
Threat Model
OWASP Top 10 Mitigation
Security FAQ
Third-Party Audit
Reporting Vulnerabilities
Guides Overview
Building on the SDK
Stripe Integration
OpenAI Integration
Multi-Agent Setup
Onboarding Team
CI/CD Pipeline
Publishing ZK MCP
Rotating Credentials
Auditing Team Activity
Dev to Production
Kubernetes Deployment
Monorepo Setup
Production Proxy Hardening
vs .env Files
vs HashiCorp Vault
vs AWS Secrets Manager
vs dotenv-vault
vs Infisical
When Not to Use
Proxy Not Starting
Proxy Not Resolving
Domain Blocked
Sync Conflicts
MCP Not Connecting
Session Token Errors
Proxy Session Authorization
Keychain Storage & Backends
SSRF & Destination Rules
Installation Issues
Error Codes Reference
Frequently Asked Questions
v3.1.x
v3.0.0
v2.1.0
v2.0.0
v1.4.0
v1.3.x
v1.2.0
v1.1.x
v1.0.x
EcosystemZero-Knowledge MCP Server

Zero-Knowledge MCP

The Zero-Knowledge MCP (Model Context Protocol) Server allows AI assistants (like Claude Desktop or Cursor) to execute tools that communicate with external APIs without ever exposing the API credentials to the AI agent or its context.

The Problem with Current MCP Servers

Most MCP servers configure their credentials via environment variables within the configuration file itself:

{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_actual_token_here" } } } }

When configured this way, the credential value is present in the configuration file, injected into process memory, and completely accessible to the AI model. A prompt injection attack or a compromised tool dependency could easily exfiltrate this key.

The Zero-Knowledge Approach

By routing requests through the AgentSecrets local proxy, the MCP server itself becomes completely credentialless.

{ "mcpServers": { "zero-knowledge-mcp": { "command": "python", "args": ["/absolute/path/to/zero-knowledge-mcp/server.py"] } } }

Notice the complete absence of an env block. The agent passes only a key name (e.g., GITHUB_TOKEN). The local AgentSecrets proxy resolves the actual value from the OS keychain and injects it at the transport layer before the request reaches GitHub.

Getting Started

  1. Install AgentSecrets and log in:
    agentsecrets init
  2. Clone the ZK MCP repository:
    git clone https://github.com/The-17/zero-knowledge-mcp cd zero-knowledge-mcp make install
  3. Store your credentials:
    agentsecrets secrets set GITHUB_TOKEN=ghp_your_token
  4. Allowlist the target domains:
    agentsecrets workspace allowlist add api.github.com
  5. Start the Proxy:
    agentsecrets proxy start

You can now use Claude or Cursor to securely query GitHub without exposing your token to the LLM.

Building Custom Tools

Creating a zero-knowledge tool is as simple as defining the tool using the AgentSecrets Python SDK:

from agentsecrets import AgentSecrets client = AgentSecrets() async def fetch_github_repos(): # The actual token is injected by the proxy. # Your code only uses the reference key. response = await client.async_call( "https://api.github.com/user/repos", bearer="GITHUB_TOKEN" ) return response.json()

For a full tutorial, check out theZero-Knowledge MCP Repository.

Was this helpful?
Thanks for your feedback!
Your feedback helps us improve the platform.