Skip to main content
Glama
Derivedbetter

open-brain-web-gateway

Open Brain Web ゲートウェイ

Tony の Gemini Spark および Perplexity Web クライアント向けの、OAuth で保護されたリモート MCP ゲートウェイです。承認された呼び出しを既存の素の Open Brain に転送し、別のブレインを作成することはありません。

境界

  • Open Brain は運用メモリであり、Continuity、COTA、Current-State Tracker、またはオーナー承認権限ではありません。

  • チャットの自動キャプチャは行いません。キャプチャツールは明示的なリクエスト専用です。

  • 素の Open Brain リポジトリと Edge Function は変更されません。

  • ブラウザクライアントは短期間有効な OAuth トークンを受け取り、長期間有効な Open Brain アクセスキーを受け取ることはありません。

  • OAuth トークンはこのゲートウェイで検証された後、終端されます。アップストリームの Open Brain には渡されません。

Related MCP server: Gulpy

コンポーネント

  • open-brain-web-gateway: クライアント/ユーザー許可リスト、完全一致エイリアスと要約エイリアス、正規の書き込み後レシートを備えた、OAuth で保護された Streamable HTTP MCP リレー。

  • docs/: GitHub Pages のメールリンクサインインと OAuth 同意 UI、およびプライバシーページと利用規約ページ。

  • open-brain-oauth-ui: 将来のカスタム Supabase ドメイン用のフォールバックとして保持されるデプロイ可能なソース。デフォルトの Supabase Functions ドメインは意図的に HTML をプレーンテキストに書き換えます。

ライブ環境で必要な設定

  1. Supabase OAuth 2.1 Server が有効で、認可パスが /oauth/consent であること。

  2. Auth Site URL: https://derivedbetter.github.io/open-brain-oauth-ui。

  3. Authorization path: /oauth/consent/ とし、リダイレクト許可リストに https://derivedbetter.github.io/open-brain-oauth-ui/** が含まれていること。

  4. 事前登録済みの機密クライアントが 2 つ: Gemini Spark と Perplexity。

  5. Edge シークレット:

    • OPEN_BRAIN_ALLOWED_EMAILS=<approved-email>

    • OPEN_BRAIN_OAUTH_CLIENT_IDS=<gemini-client-id>,<perplexity-client-id>

    • オプション: OPEN_BRAIN_OAUTH_AUDIENCES=authenticated,<gateway-url>

    • 既存の MCP_ACCESS_KEY はサーバー側に残ります。

パイロット期間中は、動的クライアント登録は無効のままです。

検証

npm test
npx -y supabase@latest functions deploy open-brain-oauth-ui --project-ref zoptbgumxukgpkgbtnpz --no-verify-jwt
npx -y supabase@latest functions deploy open-brain-web-gateway --project-ref zoptbgumxukgpkgbtnpz --no-verify-jwt

クライアントを接続する前に、ディスカバリと未認証時の失敗をテストします:

  • GET /functions/v1/open-brain-web-gateway/.well-known/oauth-protected-resource が protected-resource メタデータを返すこと。

  • 未認証の POST /functions/v1/open-brain-web-gateway が 401 と OAuth の WWW-Authenticate チャレンジを返すこと。

  • 無効なユーザー、クライアント、発行者、オーディエンス、および期限切れトークンは、アップストリーム呼び出しなしでフェイルクローズすること。

ロールバック

影響を受けた OAuth クライアントを失効させ、Gemini または Perplexity のコネクタを無効にし、クライアントが残っていない場合は Supabase OAuth Server を無効にし、2 つのゲートウェイ Edge Functions のみを削除します。既存の Open Brain データと ChatGPT、Codex、agy の統合は変更されません。

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables remote MCP clients to securely access AgentMemory tools like memory_recall, memory_smart_search, and memory_save through OAuth 2.1 and Streamable HTTP, while keeping the AgentMemory backend secret private.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides a single MCP server endpoint that lets AI agents connect to many real third-party services through OAuth, with user approvals, activity logs, scoped read/write grants, and one-tap access removal.
    17 npm
    AGPL 3.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Gives MCP clients a small remote Streamable HTTP tool surface for a Brain memory database, letting agents store facts, retrieve current-truth answers with evidence, delete memories, and check their effective identity. Each call is scoped by a customer identifier for per-customer isolation, and the endpoint can optionally be secured as an OAuth 2.1 resource server.
    138 npm
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables web-based AI clients like Claude, ChatGPT, and Grok to securely operate a local machine through OAuth-gated MCP tools covering files, shell, Git, databases, browser automation, and background tasks.
    MIT