external-ai-ecosystem-gateway
外部AIエコシステムゲートウェイ
MCP互換アシスタントクライアントに権限スコープ付きツールを公開しつつ、Slackなどの外部システムへのアクセスを仲介する、セキュリティ重視のPythonゲートウェイです。テナント分離、委任認可、機密性の高い書き込みに対する人間の確認、冪等実行、署名付きWebhook検証、失効対応の付与ストレージ、ハッシュチェーン監査証跡を実証します。
これはポートフォリオ/参考実装であり、本番用のアイデンティティプロバイダではありません。ヘッダーベースの開発用認証アダプタは、デプロイ前に
docs/security.mdに記載されているOIDC検証ミドルウェアに置き換える必要があります。
アーキテクチャ
Assistant / Slack client
|
v
FastAPI edge + auth adapter
|
v
Policy + tenant boundary ----> confirmation tokens
|
v
Sandboxed tool registry -----> Slack / OpenAI / Claude adapters
|
+--------------------> idempotency store
+--------------------> append-only hash-chained audit logRelated MCP server: MCP Tool Manager
クイックスタート
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
uvicorn ecosystem_gateway.app:app --reloadツール一覧:
curl localhost:8000/mcp/tools \
-H 'X-Subject: user-1' -H 'X-Tenant-Id: tenant-a' -H 'X-Roles: operator'pytestでテストスイートを実行します。Slackトークンが設定されていない場合、コネクタは安全なサンドボックスモードで動作し、発行する予定のリクエストを返します。
セキュリティ特性
すべてのプリンシパルと冪等性キーはテナント名前空間に分離されます。
ツールポリシーは、最小権限ロールと委任スコープを組み合わせます。
権限性の高い書き込みには、サブジェクト、テナント、ツール、引数にバインドされた短命トークンが必要です。
Webhook署名は定数時間比較を使用し、古いリクエストを拒否します。
監査レコードはSHA-256チェーンを形成し、削除や改変を検出可能にします。
OAuth付与は失効をサポートし、ツール結果を通じてリフレッシュトークンを公開することはありません。
本番の堅牢化チェックリストと脅威モデルについては、docs/security.mdを参照してください。
ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover and execute tools via a secure MCP server with JWT authentication, RBAC, rate limiting, and audit logging.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely discover, invoke, and manage tools through a hardened MCP endpoint with protections like injection detection, circuit breakers, retry backoff, response caching, context-window limiting, and state snapshots.9 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to securely call enterprise MCP tools with tenant-scoped RBAC, human approvals, audit logging, and multi-tool workflows across customer, order, document, and ticket data.-
- AlicenseNot gradedqualityAmaintenanceEnables existing apps to expose their users and data to external AI agents via MCP with OAuth 2.1 authentication and scoped tools.27 npmMIT