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
Credential Proxy Overview
Secrets Management
Environments
env Injection
Workspaces & Teams
Projects
Agent Identity
Audit & Governance
account (init / login / logout)
server (get / set / status / reset)
secrets (set / list / delete / push / pull)
proxy (start / stop / status / logs)
call (inject requests via proxy)
env (execute commands with secrets)
workspace (list / create / switch / roles)
project (list / create / use / update)
environment (list / switch / copy / merge)
agent (register / list / tokens)
agent policy (set / get / delete)
logs (list / watch / export / verify)
mcp (serve / install / config)
status (system & session diagnostics)
Aliases & Shortcuts
docs (interactive terminal viewer)
Shell Autocompletion
keychain-auth (daemon & security)
Ecosystem Overview
Zero-Knowledge MCP Server
Integrations Overview
Claude Desktop
Cursor IDE
OpenClaw
HTTP Proxy (Any Client)
LangChain (Native)
CrewAI (Native)
CI/CD Pipeline
SDK Overview
Python SDK
Python API Reference
Python SDK Manual Testing
JavaScript SDK (Soon)
ZK-MCP Integration Guide
Server Overview
5-Layer Architecture
Self-Hosting Guide
Self-Hosting Operations Manual
Server Data Migration
Authentication & Keys
Workspaces & Teams Backend
Projects & Scope Backend
Environments Backend
Secrets & Sync Protocol
Agent Identity Resolution
Telemetry & Metrics Engine
Audit Log Sync
API Endpoint Reference
Cloud Overview & Architecture
The Dual-Engine Model
Cloud Resolver Data Plane
Workload & Agent Tokens
Egress Allowlists & Audit Streams
Cloud REST API 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.x
v2.1.0
v2.0.0
v1.4.0
v1.3.x
v1.2.0
v1.1.x
v1.0.x
CLI Referencemcp (serve / install / config)

mcp Subsystem

AgentSecrets v3.0.0 ships with a built-in Model Context Protocol (MCP) server. This allows LLMs and AI clients (like Claude Desktop, Cursor, or Windsurf) to securely list credential keys, check status, switch environments, and make authenticated API calls through the proxy firewall.


Commands

agentsecrets mcp install

Automatically detects and configures local AI clients to use the native AgentSecrets MCP server.

agentsecrets mcp install
  • Supported Editors/Clients: Claude Desktop, Cursor, and OpenClaw.
  • Mechanism: Detects configuration directories and writes the stdio server execution configuration.

agentsecrets mcp serve

Starts the stdio-based MCP server.

agentsecrets mcp serve

This command is called automatically by your AI client's MCP manager. You do not need to run this manually.


Exposed MCP Tools

When registered, the MCP server exposes the following tools to the AI assistant:

Credential Operations

api_call

Allows the agent to execute an authenticated request. Plaintext credentials are resolved from the OS Keychain and injected at the transport layer by the local proxy.

  • Arguments:
    • url (required): Target API URL (e.g. https://api.stripe.com/v1/charges).
    • method (optional): GET, POST, PUT, PATCH, DELETE.
    • body (optional): Request payload string.
    • headers (optional): Key-value pairs for extra headers.
    • injections (required): Map of injection locations to secret key names. Supported formats:
      • "bearer": "SECRET_KEY"
      • "basic": "SECRET_KEY"
      • "header:Header-Name": "SECRET_KEY"
      • "query:param_name": "SECRET_KEY"
      • "body:json.path": "SECRET_KEY"
      • "form:field_name": "SECRET_KEY"

list_keys

Lists the names of all secrets available in the active project and environment. This lists key names only, ensuring values are never exposed.

check_key

Checks if a specific secret key name exists in the active environment.

get_coverage

Retrieves a table of secret keys and shows which environments (development, staging, production) they are set in.

rotate_key

IMPORTANT: This permanently deletes a secret key from the current environment (cloud, local .env, and OS keychain). Always confirm with the user in chat before calling this tool.

  • Arguments:
    • key_name (required): The name of the secret key to delete/rotate (e.g. STRIPE_KEY).
    • environment (optional): The environment to rotate the key in. Defaults to the active environment.

Context Management

get_status

Retrieves the active user session email, current project details, and the selected workspace.

get_environment

Gets the name of the active environment (e.g., development).

switch_environment

Switches the active CLI/proxy environment to development, staging, or production.

pull_secrets

Pulls the latest encrypted secrets from the cloud sync service to update the local OS Keychain cache.

diff_secrets

Compares local OS Keychain cached keys with the cloud sync service to detect drifts.

diff_environments

Compares secret keys between two environments (e.g. comparing development vs production).

get_agent_identity

Gets the current agent's identity information including authentication status, keychain-auth configuration, and whether an agent token (AS_AGENT_TOKEN) is set.

list_agent_tokens

Lists all registered agent identities and their tokens for the current workspace. Shows token metadata (label, status, created/expiry dates) but never the token values.


Audit & Allowlist

get_proxy_logs

Returns the recent entries of the local proxy audit log (times, endpoints, key names, and HTTP statuses; values are never logged).

get_blocked_requests

Lists outbound requests blocked by the proxy firewall (due to allowlist violations, capabilities, or constraints).

get_redaction_events

Lists events where the proxy detected reflected credential values in responses and redacted them.

get_audit_summary

Gets an aggregate summary of proxy audit activity: total calls, unique domains, unique credentials used, blocked/redacted counts, and breakdown by environment.

check_domain

Checks if a target domain is authorized in the workspace allowlist.

get_allowlist

Lists the authorized target domains in the workspace allowlist.

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