be2-mcp
Officialbe2 MCP (Model Context Protocol)
be2 MCP は、Claude agent と be2 商品バックエンドの間に位置する「ガバナンス層」サーバーであり、従業員が自然言語を通じてバッチタスクを安全に完了できるようにします。 これは単なる API プロキシではなく、完全な権限制御、変更ステートマシン、監査メカニズムを備えたセキュリティゲートウェイです。本番環境へのすべての書き込みが企業標準に準拠していることを保証します:盲目的な書き込みをしない、自己承認をしない、そして全経路で監査記録を保持します。
🟢 現状:Phase 1a–5 完了 | 473 tests passed / 0 skipped | SIT be2-220 Live 全経路検収合格
コア機能
draft-only 手動承認:agent は change-set のドラフトのみ作成でき、書き込みは常に独立したチャネル(パネルまたは確認ページ)を通じて手動承認が必要です。
Identity Pass-through(アイデンティティ透過):auth-service のログインで発行される be2 token を使用し、独自の RBAC は構築せず、認可判断はバックエンドの gateway に委任します。
モジュール化された domain:各業務領域(例:出品・非出品、在庫)は独立した module としてカプセル化され、新しい action type を追加しても core には触れません。
バッチウィザードパネル (Batch Wizard):Claude Desktop MCP Apps によるインタラクティブな承認パネルと操作ウィザードのレンダリングをサポートします。
全経路監査 (Append-only Audit):tool call から実行までの各ステップの trace を記録し、平文の token は決して保存しません。
Related MCP server: @vaibot/mcp-server
システムアーキテクチャ
Claude Client (Code/Desktop)
│
│ (MCP over Streamable HTTP + OAuth 2.1 不透明參考 token)
▼
┌─────────────────────────── be2-mcp server (治理層) ───────────────────────────┐
│ │
│ [OAuth 2.1 外殼] 負責 Discovery / DCR / PKCE │
│ │ │
│ [Core 治理層] change-set 狀態機、CAS 防重複、scope-binding、稽核留存 │
│ │ │
│ [Domain Modules] (src/modules/product/*) │
│ ├─ shelfToggle (上下架) │
│ ├─ inventorySetting (數量) │
│ ├─ inventoryPlatform (平台切換) │
│ └─ shelfSchedule (排程) │
│ │
└─┬───────────────────────────────┬─────────────────────────────────────────┬─┘
│ (帶 be2 JWT 查改) │ (帶 service key 換碼/refresh) │ (互動批准)
▼ ▼ ▼
be2 gateway /product/api/v1 auth-service /api/v1/ UI 面板 (mcp-ui) / 確認頁 SSOセキュリティモデル概要
セキュリティメカニズム | 防御対象と効果 |
OAuth 2.1 シェル | agent によるアカウント・パスワードの窃取を防ぎます。認証情報は POPUP でのみ be2-auth に送信され、agent は短時間有効な code を取得して token と交換するだけです。 |
Token の外部持ち出し防止 | 認証情報の漏洩を防ぎます。実際の token は server 側に保存され、agent に渡されるのは認可効力のない不透明なランダム文字列です。 |
draft-only + SSO/Nonce 承認 | agent の幻覚・悪意のある書き込みを防ぎます。agent は |
scope-binding | プロンプトインジェクションを防ぎます。change-set は同じ会話 session 内で |
businessList fail-fast | 権限外の試行を防ぎます。auth-service が発行する |
クイックスタート
依存関係のインストール
npm install環境変数の準備
.env.exampleをコピーして.envを作成してください。実際の本番環境の token やパスワードを記入・commit することは絶対に禁止です。SIT 用のSIT_AUTHSVC_SERVICE_KEYが 1 組必要です。Server の起動 & UI のビルド
npm run build:ui npm run devClaude の接続 (Claude Code を例に)
claude mcp add be2-mcp --transport http http://127.0.0.1:8787/mcp実行後、ブラウザに be2-auth SSO ログインページがポップアップ表示されます。
テスト
npm run ci
プロジェクト構造ツリー
src/
├─ core/ # 治理層基礎設施 (change-set、CAS、audit、store)
├─ oauth/ # OAuth 2.1 外殼 (Discovery, DCR, authorize, token routes)
├─ auth/ # 認證內核 (TokenManager、auth-service 介接)
├─ server/ # Streamable HTTP server, confirm routes, 路由組裝
├─ tools/ # MCP tools 註冊與介面
├─ ui/ # 面板與精靈的 isomorphic 前端 (esbuild 打包入口)
└─ modules/ # Domain modules 實作 (純業務邏輯)
└─ product/
├─ shelfToggle/ # 商品/方案上下架模組
├─ inventorySetting/ # 庫存數量修改模組
├─ inventoryPlatform/ # 庫存平台切換模組
└─ shelfSchedule/ # 上下架排程模組ドキュメントマップ
CLAUDE.md— 開発の鉄則とコマンド大全。docs/be2-mcp/design-overview.md— MCP アーキテクチャと主要な意思決定を一読で理解できる (Demo / アーキテクチャツアー必読)。docs/be2-mcp/demo-guide.md— デモと機能 Demo の標準スクリプト。docs/be2-mcp/security-model-explainer.md— 平易な言葉で解説したセキュリティモデルの説明。docs/be2-mcp/oauth-runbook.md— OAuth 接続、refresh メカニズム、SSO の説明。docs/be2-mcp/mcp-apps-runbook.md— Claude Desktop パネル承認メカニズムの使用ガイド。docs/be2-mcp/phase4a-runbook.md— バッチウィザード (在庫プラットフォーム/スケジュール) 操作ガイド。docs/be2-mcp/module-catalog.md— 実装済みモジュール一覧。docs/be2-mcp/module-onboarding.md— 新規 domain / action type 接続チェックリスト。
This server cannot be deployed
Maintenance
Related MCP Connectors
Human-in-the-loop review and approval for AI agents. Audit trail, approval policies, native MCP.
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
AI governance MCP server for EU AI Act compliance and jurisdiction verification
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA governed MCP server for integrating AI agents with customer data, featuring role-based access control, field redaction, and human-in-the-loop approval for secure support operations.1-

@vaibot/mcp-serverofficial
FlicenseAqualityDmaintenanceGovernance circuit-breaker MCP server that enables AI agents to request risk-based decisions, approve or deny actions, and finalize outcomes with full audit receipts.4-- AlicenseNot gradedqualityCmaintenanceGoverned MCP server for bank-grade agent tool access with RBAC, PII redaction, rate limiting, and audit logging.MIT
- FlicenseNot gradedqualityBmaintenanceAn MCP server that enables non-technical operations users to resolve common commerce-ops tickets, such as orders charged but failed, through an investigate, recommend, approve, and execute workflow with read-only and write tools.-