Two-Key
Authorization proxy that needs a rule check and AI judges to approve each tool call
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.8.0
- Listing updated
- 2 days ago
About Two-Key
Two-Key is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.
The agent never holds the keys. It proposes an action, and two independent checks must both say yes before a single-use token lets the call run. The policy key compiles signed rules to bytecode and checks real arguments such as tool, amount and counterparty, ignoring anything the agent claims about them. The judgment key uses one or more LLM judges under a written constitution, and startup refuses a judge that shares the agent's credential.
Defaults lean to denial: a missing, slow or confused judge counts as no, and a fault in the rules check is a deny. Placed in front of another MCP server with two-key mcp-proxy, it shows the agent only the tools you signed. Every decision goes to an encrypted, hash-chained ledger and can be copied to syslog or an HTTPS webhook without argument values.
It is an Apache-2.0 beta written in Python with one required dependency, and the author says it complements rather than replaces content filters, DLP or user login. Version 0.8.0 added two optional desktop windows, a ledger viewer and a constitution editor.
Install
Run in a terminal
claude mcp add two-key -- uvx two-keyAdd to claude_desktop_config.json
{
"mcpServers": {
"two-key": {
"command": "uvx",
"args": [
"two-key"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"two-key": {
"command": "uvx",
"args": [
"two-key"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"two-key": {
"type": "stdio",
"command": "uvx",
"args": [
"two-key"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"two-key": {
"command": "uvx",
"args": [
"two-key"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"two-key": {
"command": "uvx",
"args": [
"two-key"
]
}
}
}What it does
- Dual-key approval
- Deterministic policy plus LLM judges must both agree.
- Single-use tokens
- Tokens are bound to the exact approved arguments and expire fast.
- MCP proxy mode
- Exposes only signed tools of the server it fronts.
- Encrypted ledger
- Hash-chained audit log with signed heads.
- SIEM forwarding
- Sends decisions to syslog or HTTPS in several schemas.
- Choice of judges
- Judges from xAI, OpenAI, Anthropic, Gemini or a local model.
Good for
- Guard an agent that can send payments or emails
- Put approval rules in front of a third-party MCP server
- Keep a verifiable audit trail of agent actions
- Run judges from two vendors for high-assurance setups
Pricing
Open source
Apache-2.0
Prices change. Check insomniac-vibelabs.github.io before you buy.
Two-Key FAQ
What licence is it?
Apache-2.0.
Which judge models work?
xAI, OpenAI, Anthropic, Gemini or a local model such as Ollama.
What if a judge fails?
Silence counts as no, so the call is denied.
Is it production ready?
The project calls itself a beta heading toward 1.0.
Is Two-Key free?
Yes. Two-Key is open source, so you can use and self-host it for free.
How do I add Two-Key to Claude Code?
Run this command in your terminal: claude mcp add two-key -- uvx two-key
What are the best alternatives to Two-Key?
The closest alternatives to Two-Key are REA, Claude Code Ultimate Guide, Agent Roast, Midplane and Leash.
Alternatives to Two-Key

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Claude Code Ultimate Guide
MCP serverMCP server for searching the Claude Code Ultimate Guide from any MCP client
Runs locally- Open source
- 6.5K GitHub stars
- AI models and LLM tooling
Agent Roast
MCP serverOffline review that flags agent changes which weaken tests, assertions or CI
Runs locally- Open source
- 4 Hacker News points
- Developer tools

Midplane
MCP serverPostgres gateway for AI agents with table grants, column masking and approval for writes
Runs locally- Open source
- 5 GitHub stars
- Databases

Leash
MCP serverReview what your AI touched, approve risky actions and undo supported changes
- 1 tool
- Remote
- Free
- 1 GitHub star
- Security
Zero-log MCP server with 49 tools for AI guardrails, secret scanning and EU compliance
- 49 tools
- Remote
- Freemium
- Security