通过MCP为AI代理管理秘密 • @janeesecure
概览
你的AI代理需要API访问权限才能发挥作用。但他们不应该拥有你的原始API密钥。Janee坐在代理和API之间——注入凭证、执行策略并记录一切。 AI 代理需要 API 访问权限才能发挥作用。目前的做法是把密钥交给他们,希望他们能正常工作。 - 🔓 客服可以完全访问Stripe、Gmail、数据库——📊没有访问内容或原因的审计记录——🚫出错💉时不会被切断——只需一次提示注入,灾难就会发生 Janee 是一个管理 AI 代理 API 秘密的 MCP 服务器: 1. — 在 ~/.janee/ 中本地加密 2.— 启动 MCP 服务器 3。— 通过执行 MCP 工具 4。— 代理从未看到 5.— 完整审计轨迹 现在这与Janee可以使用它们相连: - ——访问您的API - ——访问您的API——访问您的API——访问您的API 不再在工具间复制密钥。不再有“哪个代理配置了哪个 API?”的问题。添加一个新的代理?它已经拥有所有访问权限。撤销密钥?
概述(AI 翻译)
通过MCP管理AI代理的秘密
你的AI代理需要API访问才能发挥作用。但他们不应该拥有你的原始API密钥。 Janee 位于您的代理和 API 之间——注入凭证、执行策略并记录所有内容。
✨ 特色
| 🔒 零知识代理 | 代理调用API,却从未看到密钥 |
| 📋 完整的审计跟踪 | 每个请求都记录了时间戳、方法、路径、状态 |
| 🛡️ 请求策略 | 按能力允许/拒绝规则(例如,只读Stripe) |
| ⏱️ 会话TTLs时间限制访问,即时撤销 | |
| 🔌 支持任何MCP客户端 | Claude桌面版、光标、OpenClaw等 |
| 🏠 本地优先 | 密钥加密在你的机器上,绝不会发送到云端 |
| 🖥️ 执行模式 | 运行带有注入凭证的CLI工具——代理永远看不到密钥 |
| 🤖 GitHub 应用认证 | 短寿命的自治代理令牌 — 无静态 PAT |
| 🐦 Twitter/X OAuth 1.0a | 按请求OAuth签名 — 4个秘密保持加密 |
| ☁️ AWS SigV4 | 签署AWS API请求服务器端——SES、S3等 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Janee 🔐
Secrets management for AI agents via MCP
Your AI agents need API access to be useful. But they shouldn’t have your raw API keys. Janee sits between your agents and your APIs — injecting credentials, enforcing policies, and logging everything.
✨ Features
| 🔒 Zero-knowledge agents | Agents call APIs without ever seeing keys |
| 📋 Full audit trail | Every request logged with timestamp, method, path, status |
| 🛡️ Request policies | Allow/deny rules per capability (e.g., read-only Stripe) |
| ⏱️ Session TTLs | Time-limited access with instant revocation |
| 🔌 Works with any MCP client | Claude Desktop, Cursor, OpenClaw, and more |
| 🏠 Local-first | Keys encrypted on your machine, never sent to a cloud |
| 🖥️ Exec mode | Run CLI tools with injected credentials — agents never see the keys |
| 🤖 GitHub App auth | Short-lived tokens for autonomous agents — no static PATs |
| 🐦 Twitter/X OAuth 1.0a | Per-request OAuth signing — 4 secrets stay encrypted |
| ☁️ AWS SigV4 | Sign AWS API requests server-side — SES, S3, and more |
| 🔧 Automatic git auth | git push/pull just works when credentials include GitHub tokens |
The Problem
AI agents need API access to be useful. The current approach is to give them your keys and hope they behave.
- 🔓 Agents have full access to Stripe, Gmail, databases
- 📊 No audit trail of what was accessed or why
- 🚫 No kill switch when things go wrong
- 💉 One prompt injection away from disaster
The Solution
Janee is an MCP server that manages API secrets for AI agents:
- Store your API keys — encrypted locally in
~/.janee/ - Run
janee serve— starts MCP server - Agent requests access — via
executeMCP tool - Janee injects the real key — agent never sees it
- Everything is logged — full audit trail
Your keys stay on your machine. Agents never see them. You stay in control.
Configure Once, Use Everywhere
Set up your APIs in Janee once:
services:
stripe:
baseUrl: https://api.stripe.com
auth: { type: bearer, key: sk_live_xxx }
github:
baseUrl: https://api.github.com
auth: { type: bearer, key: ghp_xxx }
openai:
baseUrl: https://api.openai.com
auth: { type: bearer, key: sk-xxx }
Now every agent that connects to Janee can use them:
- Claude Desktop — access your APIs
- Cursor — access your APIs
安装
npx @true-and-useful/create-gh-app create my-agent --owner @me