mcp-keyward
🔐 mcp-keyguard
AIエージェントにAPIキーを見せてはいけません。もうその心配は不要です。
mcp-keyguardは、AIエージェント(Claude、Cursor、Windsurfなど)と外部APIの間の安全なプロキシとして機能するローカルMCPサーバーです。
OpenAI、Stripe、GitHubのキーをチャットコンテキストに貼り付ける代わりに、マシン上に暗号化して保存します。エージェントがmcp-keyguardを呼び出すと、サーバー側で実際のキーが挿入され、結果が返されます。
キーがマシンから外部へ出ることはありません。エージェントがキーを見ることもありません。
なぜこれが重要なのか
2025年、人気のあるMCPホスティングプラットフォームの脆弱性により、3,000以上のサーバーから数千ものAPIキーが流出しました。根本的な原因は、ユーザーが制御できないインフラストラクチャをキーが通過したことでした。
mcp-keyguardはその逆を行きます。完全にローカルで、外部依存関係はゼロ、キーはAES-128で保存時に暗号化されます。
Related MCP server: aarifmms/keyblind
仕組み
Your prompt → Claude → mcp-keyguard → [injects real key] → External API
↑
Key never leaves hereインストール
要件: Python 3.10以上
pip install mcp httpx cryptography
git clone https://github.com/ggc180820/mcp-keyguard.git
cd mcp-keyguardclaude_desktop_config.json に以下を追加します:
{
"mcpServers": {
"mcp-keyguard": {
"command": "python",
"args": ["/path/to/mcp-keyguard/main.py"]
}
}
}Claude Desktopを再起動してください。これで完了です。
使用方法
1. キーを保存する(キーごとに1回だけ行います)
"add_keyを使用して、OpenAIキーをエイリアス 'openai'、 ヘッダー名 'Authorization'、ヘッダープレフィックス 'Bearer ' で保存して"
2. 認証済みリクエストを行う(Claudeが自動的に行います)
"make_requestとエイリアス 'openai' を使用して https://api.openai.com/v1/models を呼び出して"
3. 保存内容を確認する
"list_keysを使用" → エイリアスとヘッダーが表示されます。実際の値は決して表示されません。
ツール
ツール | 機能 |
| APIキーをボルトに暗号化して保存する |
| 保存されたエイリアスを一覧表示する(値は表示されません) |
| 認証済みHTTPリクエストを行う(サーバー側でキーが挿入されます) |
| ボルトからキーを削除する |
セキュリティモデル
キーは Fernet (AES-128-CBC + HMAC-SHA256) で暗号化されます
暗号化キーはマシン上の
vault.keyにのみ存在しますすべてのHTTPリクエストは30秒のタイムアウト付きでローカルで行われます
vault.keyやvault.jsonをgitにコミットしないでください(.gitignoreに追加済みです)
mcp-keyguard Pro
より詳細な制御が必要ですか?Pro版では以下が追加されます:
機能 | 無料 | Pro |
暗号化されたローカルボルト | ✅ | ✅ |
無制限のキー | ✅ | ✅ |
複数のボルト(プロジェクト/クライアントごと) | ❌ | ✅ |
監査ログ(誰が、いつ、どこでどのキーを使用したか) | ❌ | ✅ |
キーローテーションのアラート | ❌ | ✅ |
ライセンス
MIT — 個人利用は永久に無料です。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
A secret store for AI agents: the agent never sees the plaintext.
Password vault for AI agents with scoped, user-approved access
Secrets for developers and agents—secure context and workflows without exposing secret values.
Encrypted store for API keys and database URLs your code needs. Use them without reading them.
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal AES-256-GCM encrypted vault for AI agents. Resolve {{PLACEHOLDER}} secrets in prompts at runtime — LLMs never see real API keys. Argon2id key derivation, zero cloud.270 npm7MIT
- AlicenseBqualityBmaintenanceEncrypted secrets vault that blinds AI agents to API keys. Stores secrets in AES-256-GCM encrypted SQLite vault, resolves them at runtime via MCP values never appear in LLM conversation transcripts. Sandbox .env files with deterministic fakes.27252 npm3MIT
- AlicenseAqualityBmaintenanceEnables LLM agents to securely use credentials like passwords and API keys without exposing them in the context window, through encrypted storage and proxy-based injection.33MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely use API keys by storing them in an encrypted vault and injecting them on demand with user approval, without exposing the key values to the model.3MIT