krypton-mcp
🛡️ KryptonMCP
AIエージェントのためのゼロトラスト セキュリティ&プライバシー ゲートウェイ
決定的PIIマスキング • プロンプトインジェクションガードレール • JIT一時認証情報 • 署名付きMerkle監査台帳
🤖 AIによるプロジェクト即時統合
既存プロジェクトに統合しますか? ドロップインAIプロンプトを
KRYPTON_INTEGRATION_PROMPT.mdとして提供しています。プロジェクト内のClaude Code、Cursor Composer、Windsurf、またはAntigravityにプロンプト全体をコピー&ペーストするだけで、AIアシスタントがツールを自動監査し、
krypton.yamlを生成し、Ed25519監査キーを作成し、すべてのMCPクライアントを透過的に接続します!
Related MCP server: Node9-Proxy
⚡ なぜKryptonMCPなのか?
AIモデル(Claude、Cursor、Windsurf、LangChain、AutoGenなど)をデータベース、Redisインスタンス、エンタープライズAPIに直接接続すると、壊滅的なセキュリティ上の課題が生じます:
PIIとデータ漏えい: 平文の顧客クレジットカード、メールアドレス、SSN、非公開APIキーが、プロンプトコンテキスト内でクラウドLLMプロバイダーに直接送信されます。
プロンプトインジェクションと乗っ取り: 悪意のあるユーザーや間接的なコンテンツインジェクションが、モデルを欺いて破壊的なツール(
DROP TABLE、rm -rf、外部送信)を実行させます。静的で長期間有効な認証情報: AIエージェントにデータベースパスワードや管理者トークンを付与すると、永続的なバックドアが生まれます。
検証可能なコンプライアンスの欠如: 従来のログは改ざんや消去が可能であり、SOC2、HIPAA、ISO27001の監査基準を満たしません。
KryptonMCPは、スタンドアロンで単一バイナリのゼロトラストゲートウェイであり、HashiCorp Vaultのような外部エージェントを必要とせず、AIクライアントと下流のMCPツールの間に透過的に配置されます。
🌟 中核となる柱
flowchart TD
Client["🤖 AI Client (Claude / Cursor / Windsurf / LangChain)"]
subgraph InboundPipeline["🔒 Inbound Security Pipeline"]
G["1. Prompt-Injection Guardrails & RBAC"]
D["2. Inbound Detokenization Engine"]
B["3. JIT Ephemeral Credential Broker"]
A1["4. Merkle Audit Signer (Ed25519)"]
G --> D --> B --> A1
end
Downstream[("🗄️ Downstream Services (Postgres, Redis, Remote APIs)")]
subgraph OutboundPipeline["🎭 Outbound Privacy Pipeline"]
M["5. In-Flight PII Masker (AES-256-GCM Vault)"]
A2["6. Merkle Leaf Digest & JSONL Sync"]
M --> A2
end
Client -->|"1. JSON-RPC Tool Request (stdio / SSE)"| G
A1 -->|"2. Sanitized Cleartext Request"| Downstream
Downstream -->|"3. Raw Database / API Result"| M
A2 -->|"4. Protected Result with Surrogate Tokens ([EMAIL_REF_...])"| Client1. 🎭 インフライト決定的PIIマスキング
透過的なリダクション: ペイロードがLLMに到達する前に、機密データ(クレジットカード、SSN、メールアドレス、APIキー、JWT、電話番号、IPv4/IPv6)を可逆的なサロゲートトークン(
[EMAIL_REF_a1b2c3d4]、[CREDIT_CARD_REF_8f9e0a1b])に置き換えます。アルゴリズムによる検証: Luhn Mod 10チェックサム、SSAエリアチェックによる高精度スキャンで、標準コードに対する誤検知ゼロを実現します。
可逆的デトークン化: LLMがサロゲートトークンを使って下流ツールを呼び出すと、Kryptonはパラメータをインフライトで平文に戻します。
インメモリ暗号化ボールト: 平文のディスク保存はゼロ。すべてのサロゲートマッピングは、一時的なAES-256-GCMキーでメモリ内で保護されます。
2. 🛡️ プロンプトインジェクション&ツール実行ガードレール
マルチベクター脅威検出: 命令の上書き、DAN/開発者モードの脱獄、デリミタインジェクション(
<|im_start|>、<<SYS>>)、Base64で難読化されたペイロードをブロックします。宣言型ツールRBAC: ワイルドカード許可リスト(
query_*)と拒否リスト(drop_*、execute_shell)。パラメータ制約: フィールドレベルの検証(正規表現パターン、最小/最大長、数値範囲)。
スライディングウィンドウレート制限: 暴走する再帰的実行ループを防ぎます。
3. 🔑 ジャストインタイム(JIT)一時認証情報
動的マイクロ認証情報: オンデマンドで短命なデータベース・キャッシュユーザーを1時間未満のTTLで生成します。
自動失効: 高精度なバックグラウンドタイマーが、リース期限切れ時にバックエンドセッションを自動終了し、一時ロールを削除します。
組み込みドライバ: PostgreSQL(
CREATE ROLE ... VALID UNTIL、pg_terminate_backend、DROP ROLE)およびRedis(ACL SETUSER、CLIENT KILL USER、ACL DELUSER)向けのネイティブドライバ。ネイティブMCPツール:
krypton_request_credential、krypton_revoke_credential、krypton_list_leasesを公開します。
4. 🔏 暗号署名付きMerkle監査台帳
RFC 6962ドメイン分離: すべてのリクエスト、レスポンス、ツール呼び出し、認証情報リースを記録する追記専用のバイナリMerkleツリー。
Ed25519非対称署名: Merkleルートチェックポイントに数学的に署名します。
改ざん検知: 過去のログレコードの改変や削除は、直ちに暗号検証を破綻させます。
CLI検証ツール&証明エクスポーター: コンプライアンス監査人向けの
krypton audit verifyおよびkrypton audit proof。
🚀 クイックスタート(30秒)
インストール
# Option 1: Install with Go (Zero dependencies)
go install github.com/krypton-mcp/krypton/cmd/krypton@v0.1.0-alpha
# Option 2: Pull the production Docker image
docker pull ghcr.io/muhammetemirerkut/krypton-mcp:latest
# Option 3: Build from source
git clone https://github.com/MuhammetEmirErkut/krypton-mcp.git
cd krypton-mcp
go build -o krypton ./cmd/krypton設定と監査キーの初期化
# 1. Generate production configuration template
krypton config init --out krypton.yaml
# 2. Generate Ed25519 cryptographic audit signing keypair
krypton audit keygen --out-dir ./security-keys⚙️ クライアント統合
1. Claude Desktopの設定(Stdioプロキシモード)
Kryptonを透過プロキシとして~/Library/Application Support/Claude/claude_desktop_config.json(macOS)または%APPDATA%\Claude\claude_desktop_config.json(Windows)に追加します:
{
"mcpServers": {
"postgres-secure": {
"command": "/usr/local/bin/krypton",
"args": [
"start",
"--config", "/path/to/krypton.yaml",
"--",
"npx", "-y", "@modelcontextprotocol/server-postgres", "postgresql://admin:password@localhost:5432/mydb"
]
}
}
}2. Cursor IDE / リモートMCP統合(HTTP&SSEモード)
コンテナ化された環境やリモート環境では、Kryptonをセキュアなネットワークゲートウェイとして起動します:
# Launch SSE gateway on port 8080 proxying a remote MCP service
krypton start --transport sse --host 0.0.0.0 --port 8080 --downstream-url http://downstream-service:8001/rpcワークスペースの.cursor/mcp.jsonに追加します:
{
"mcpServers": {
"secure-gateway": {
"command": "krypton",
"args": ["start", "--config", "./krypton.yaml"]
}
}
}📋 設定仕様(krypton.yaml)
version: "v1"
server:
transport: "stdio" # "stdio" or "sse"
host: "127.0.0.1"
port: 8080
log_level: "info"
downstream:
transport: "stdio" # "stdio" or "http"
# url: "http://localhost:8001/rpc"
command: ""
args: []
security:
masking_enabled: true
guardrails_enabled: true
audit_enabled: true
ephemeral_creds_enabled: true
masking:
mode: "tokenize" # "tokenize", "redact", or "hash"
builtin_rules:
- "email"
- "credit_card"
- "ssn"
- "api_key"
- "jwt"
- "phone"
- "ip_address"
guardrails:
block_injection: true
block_exfiltration: true
max_prompt_size_bytes: 1048576 # 1 MB
# Declarative Tool RBAC
allowed_tools:
- "*"
denied_tools:
- "drop_*"
- "delete_database"
- "execute_raw_shell"
audit:
log_path: "./audit.jsonl"
sign_enabled: true
signing_key_path: "./krypton_audit.key"
public_key_path: "./krypton_audit.pub"💻 CLIコマンド一覧
コマンド | 説明 |
| ゲートウェイプロキシまたはスタンドアロンサーバーを起動します |
| 本番用設定テンプレートを生成します |
| 設定の構文とスキーマルールを検証します |
| 暗号監査署名用のEd25519キーペアを生成します |
| Merkle台帳の整合性を暗号学的に検証します |
| リーフの暗号学的包含証明をエクスポートします |
| バイナリのビルドバージョンとコミットメタデータを表示します |
📊 パフォーマンスベンチマーク
Apple M2(arm64、Go 1.26)で測定:
ベンチマーク操作 | スループット | レイテンシ | メモリ割り当て |
インフライトPIIマスキング&トークン化 | ~30,000 ops/sec | 33.4 μs / op | 20 allocs / op |
プロンプトインジェクション&ガードレールスキャン | ~33,000 ops/sec | 30.3 μs / op | 3 allocs / op |
RFC 6962 Merkleツリーリーフ追加 | ~2,000 ops/sec | 489 μs / op | 5,074 allocs / op |
ゲートウェイパイプライン全体(エンドツーエンド) | ~1,800 ops/sec | 550 μs / op | 5,110 allocs / op |
🔒 セキュリティと脆弱性の開示
KryptonMCPはセキュリティ脆弱性を真剣に受け止めています。脆弱性を発見した場合は、GitHub Private Vulnerability Reportingまたはメールsecurity@krypton-mcp.orgで報告してください。ゼロデイ脆弱性については公開issueを開かないでください。
📄 ライセンス
Apache License 2.0。詳細はLICENSEを参照してください。
This server cannot be installed
Maintenance
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA 7-layer security system for AI agents that detects and blocks prompt injection, data exfiltration, and malicious tool calls. It enables real-time scanning of inputs, outputs, and tool definitions to protect agentic workflows from emerging AI-specific threats.1MIT
- AlicenseNot gradedqualityAmaintenanceThe Execution Security Layer for the Agentic Era. Providing deterministic "Sudo" governance and audit logs for autonomous AI agents.2,111209Apache 2.0
- AlicenseAqualityAmaintenanceLocal zero-trust permission gateway for AI agents. Enforces policy-based tool authorization, human approvals, scoped permissions, and cryptographically verifiable audit logs.45Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides a privacy-preserving security framework for AI agents using the Model Context Protocol, enabling transparent anonymization of sensitive data and blockchain-like audit trails for regulated domains.MIT
Related MCP Connectors
Protect AI agents from API-key exposure with secretless credentials and signed execution proofs.
Sovereign Agent OS — Persistent Memory, Governance & Compliance for AI Agents.
Verifiable provenance for AI agents — ZK proofs over confidential documents, no plaintext exposure.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MuhammetEmirErkut/krypton-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server