Pincer

io.github.VouchlyAI由 GitHub 账号 VouchlyAI 发布v0.1.5更新于 Oct 24, 2026

Secure grip for your agent's secrets - security-hardened MCP gateway with proxy token architecture

概览

AI 生成的概览

本地 MCP 网关,让助手用代理令牌而非真实 API 密钥调用大模型服务,并可签名或解密数据。

可以做什么
Pincer 以本地 stdio MCP 服务器方式运行,代替智能体调用外部服务。工具包括 gemini_generate、openai_chat、openai_list_models、openai_compatible_chat、openai_compatible_list_models、claude_chat、openrouter_chat、openrouter_list_models、openwebui_chat、openwebui_list_models、gpg_sign_data 和 gpg_decrypt。智能体使用代理令牌认证,Pincer 将其解析为存放在操作系统钥匙串中加密保存的真实凭据,在调用时即时注入,并把每次调用写入带哈希链的审计文件。
适用场景
当助手需要访问多个大模型服务商,或需要执行 GPG 签名而不希望自己持有长期 API 密钥和私钥时适用。也适合需要按智能体、按工具授权并保留工具调用审计记录的场景。
运行要求
需要 Node.js 18+ 以及支持原生钥匙串的操作系统(macOS、Windows 或 Linux)。安装 npm 包 pincer-mcp,运行 pincer init 创建保险库,存入服务商密钥,并注册智能体以获取代理令牌。必须向智能体提供 PINCER_PROXY_TOKEN;可选变量为 AUDIT_LOG_PATH、OPENAI_COMPATIBLE_URL 和 OPENWEBUI_URL。调用外部服务商需要网络访问。
安装前请注意
保险库保存真实的服务商 API 密钥和 GPG 私钥,因此本机及操作系统钥匙串账户即为信任边界。PINCER_PROXY_TOKEN 是持有即生效的凭据,任何拿到它的人都能调用该智能体被授权的工具。gpg_sign_data 与 gpg_decrypt 会处理智能体提交的数据,且每次工具调用都会写入 ~/.pincer/audit.jsonl 审计日志。提示词与请求内容会被转发给所选第三方服务商。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Pincer,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Pincer MCP 🦀

[Pincer-MCP]

[License] [TypeScript] [MCP] [NPM Version] [NPM Downloads] [MCP Registry]

Pincer-MCP is a security-hardened Model Context Protocol (MCP) gateway that eliminates the "Lethal Trifecta" vulnerability in agentic AI systems. By acting as a stateless intermediary, Pincer ensures agents never see your real API keys.

🔒 The Problem

Current AI agents store long-lived API keys in plain-text .env files or local databases. If compromised via prompt injection or host intrusion, attackers gain direct access to your:

  • Database passwords
  • Third-party API keys

✨ The Solution: Proxy Token Architecture

Pincer implements a "blindfold" security model:

  1. Agent knows: Only a unique proxy token (pxr_abc123...)
  2. Pincer knows: Mapping of proxy tokens → real API keys (encrypted in OS keychain)
  3. Agent never sees: The actual credentials
mermaid
sequenceDiagram    participant Agent    participant Pincer    participant Vault (OS Keychain)    participant External API
    Agent->>Pincer: tools/call + proxy_token: pxr_abc123    Pincer->>Vault: Decrypt real API key    Vault-->>Pincer: gemini_api_key: AIzaSy...    Pincer->>External API: API call with real key    External API-->>Pincer: Response    Pincer->>Pincer: Scrub key from memory    Pincer-->>Agent: Response (no credentials)

📦 Available Tools

  • gemini_generate: Secure Google Gemini API calls.
  • openai_chat: Chat completions with OpenAI GPT models (gpt-4o, gpt-4-turbo, gpt-3.5-turbo, etc.).
  • openai_list_models: List all available OpenAI models.
  • openai_compatible_chat: Chat completions with any OpenAI-compatible API (Azure OpenAI, Ollama, vLLM, etc.).
  • openai_compatible_list_models: List models from custom OpenAI-compatible endpoints.
  • claude_chat: Chat completions with Anthropic Claude models (Claude 3.5 Sonnet, Opus, Haiku).
  • openrouter_chat: Unified API access to 100+ models from multiple providers (OpenAI, Anthropic, Google, Meta, etc.).
  • openrouter_list_models: List all available models across OpenRouter providers.
  • openwebui_chat: OpenAI-compatible interface for self-hosted LLMs.
  • openwebui_list_models: Discover available models on an OpenWebUI instance.
  • gpg_sign_data: Sign data or files using a GPG/PGP private key stored in Pincer's vault. (Keyless Execution — agent never sees the key)
  • gpg_decrypt: Decrypt PGP-encrypted data using a vault-stored private key.

🔑 GPG Key Management

bash
# Generate a new GPG keypair (private key stored in vault)pincer key generate --name "Release Signing" --email [email protected]
# Import an existing PGP private keypincer key import ./my-key.asc --passphrase "my-passphrase"
# List all stored GPG keyspincer key list
# Export public key (safe to share)pincer key export <key-id>
# Authorize an agent for signingpincer agent authorize mybot gpg_sign_data --key <key-id>

(More callers coming soon!)

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • macOS, Windows, or Linux with native keychain support

Installation

Option 1: Global Installation (Recommended)

bash
npm install -g pincer-mcp# Now 'pincer' command is available system-wide

Option 2: Local Development

bash
git clone https://github.com/VouchlyAI/Pincer-MCP.gitcd Pincer-MCPnpm installnpm run buildnpm link  # Makes 'pincer' command available locally

Setup Vault

bash
# 1. Initialize vault (creates master key in OS keychain)pincer init
# 2. Store your real API keys (encrypted)pincer set gemini_api_key "AIzaSyDpxPq..."pincer set openai_api_key "sk-proj-..."
# 3. Register an agent and generate proxy tokenpincer agent add openclaw# Output: 🎫 Proxy Token: pxr_V1StGXR8_Z5jdHi6B-myT
# 4. Authorize the agent for specific toolspincer agent authorize openclaw gemini_generate

Multi-Key Support

Store multiple keys for the same tool and assign them to different agents:

bash
# Store two different Gemini API keyspincer set gemini_api_key "AIzaSy_KEY_FOR_CLAWDBOT..." --label key1pincer set gemini_api_key "AIzaSy_KEY_FOR_MYBOT..." --label key2
# View all stored keyspincer list
# Assign specific keys to each agentpincer agent add clawdbotpincer agent authorize clawdbot gemini_generate --key key1
pincer agent add mybot  pincer agent authorize mybot gemini_generate --key key2
# View agent permissionspincer agent list

Result: clawdbot uses key1, mybot uses key2 - perfect for rate limiting or cost tracking!

Run the Server

bash
npm run dev

Configure Your Agent

Give your agent the proxy token (not the real API key):

bash
export PINCER_PROXY_TOKEN="pxr_V1StGXR8_Z5jdHi6B-myT"

Tool-to-Secret Name Mappings

When storing secrets, you must use the correct secret name for each tool. See the Tool Mappings Guide for a complete reference.

When you run pincer agent authorize myagent gemini_generate, Pincer will inject the gemini_api_key secret when that tool is called.

Make a Tool Call

Your agent sends requests with the proxy token in the body:

json
{  "jsonrpc": "2.0",  "method": "tools/call",  "params": {    "name": "gemini_generate",    "arguments": {      "prompt": "Hello world",      "model": "gemini-2.0-flash"    },    "_meta": {      "pincer_token": "pxr_V1StGXR8_Z5jdHi6B-myT"    }  }}

Pincer maps the proxy token to the real API key and executes the call securely.

🏗️ Architecture

Two-Tiered Vault System

Tier 1: Master Key (OS Keychain)

  • Stored in macOS Keychain, Windows Credential Manager, or GNOME Keyring
  • Never touches the filesystem
  • Accessed only for encryption/decryption

Tier 2: Encrypted Store (SQLite)

  • Database at ~/.pincer/vault.db
  • Three tables:
    • secrets: Real API keys (AES-256-GCM encrypted)
    • proxy_tokens: Proxy token → Agent ID mappings
    • agent_mappings: Agent ID → Tool authorization

Authentication Flow

Request (_meta.pincer_token: pxr_xxx)  ↓Gatekeeper: Extract proxy token from body  ↓Vault: Resolve pxr_xxx → agent_id → tool_name → real_api_key  ↓Injector: JIT decrypt & inject real key  ↓Caller: Execute external API call  ↓Scrubber: Overwrite key in memory with zeros  ↓Audit: Log to tamper-evident chain

🔐 Security & Compliance

Pincer is built for enterprise-grade security:

  • Hardware-Backed Cryptography: Master encryption keys never leave the OS-native keychain.
  • Proxy Token Isolation: Agents only handle ephemeral pxr_ tokens; they never touch real credentials.
  • JIT Decryption: Secrets are decrypted only for the duration of the API call.
  • Zero-Footprint Memory: Sensitive data is scrubbed (zeroed out) from memory immediately after use.
  • Fine-Grained Authorization: Strict per-agent, per-tool access control policies.
  • Tamper-Evident Audit Log: Append-only tool call history with SHA-256 chain-hashing.
  • Hardened Execution: Schema validation on all inputs and protected environment execution.
  • Stdio Compatible: Fully compatible with the standard Model Context Protocol transport.

🔍 Audit Logs

Every tool call is logged to ~/.pincer/audit.jsonl with both UTC and Local timestamps, plus character counts and estimated token usage:

json
{  "agentId": "openclaw",  "tool": "gemini_generate",  "duration": 234,  "status": "success",  "input_chars": 156,  "output_chars": 423,  "estimated_input_tokens": 39,  "estimated_output_tokens": 106,  "timestamp_utc": "2026-02-05T08:32:00.000Z",  "timestamp_local": "2/5/2026, 2:02:45 PM",  "chainHash": "a1b2c3d4e5f6g7h8",  "prevHash": "0000000000000000"}

Token Estimation: Pincer automatically estimates token usage using a 4:1 character-to-token ratio (~4 characters per token average). This provides consistent cost tracking across all AI providers without relying on provider-specific APIs.


Chain hashes provide tamper detection - any modification breaks the SHA-256 chain.
## 🧪 Development
```bash# Install dependenciesnpm install
# Run testsnpm test
# Run with watch modenpm run dev
# Build for productionnpm run build

📚 Documentation

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

📄 License

BSL 1.1 (Business Source License) — See LICENSE for details. Converts to Apache 2.0 on 2028-04-01.


Built with ❤️ for a more secure AI future.

来源:README.md,提交 5ca44e7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.5最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。