M-Baton MCP Relay Server
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
M-Baton MCP Relay Server
Web上のAI(ChatGPT・Claude・Gemini等)から、あなたのPCで常駐しているM-BatonへMCPリクエストを中継する軽量サーバーです。
仕組み
[Web版AI] → [この中継サーバー] → [あなたのPCのM-Baton]
↑ 外向きポーリング接続(PC側から)PC側は外向きHTTPSのみ(ファイアウォール設定変更不要)
マニュアル本文・画像は中継サーバーに保存されません(メモリ上を通過するだけ)
256bit暗号トークン(channel_token)でユーザーごとに分離
Related MCP server: agent-relay
特徴
データ非保持:マニュアル本文・画像はディスク・DBに一切保存せず、応答後にメモリから消去
ユーザー分離:SHA-256ハッシュ化されたトークンで厳密に分離
サーバー合言葉:
RELAY_SHARED_SECRETで不正登録を防止レート制限:IP単位のブルートフォース防御
軽量:Flask + gunicorn・メモリ上のキューのみ(外部DB不要)
デプロイ方法
Google Cloud Run(推奨)
gcloud run deploy mbaton-relay \
--source . \
--region asia-northeast1 \
--allow-unauthenticated \
--set-env-vars "RELAY_SHARED_SECRET=あなたの合言葉" \
--max-instances=1 \
--concurrency=80重要:
--max-instances=1は必須です。中継はメモリ上のキューで動くため、複数インスタンスにするとキューが分散して動かなくなります。
Docker(任意のサーバー)
docker build -t mbaton-relay .
docker run -d --name mbaton-relay \
-p 8080:8080 \
-e RELAY_SHARED_SECRET="あなたの合言葉" \
--restart unless-stopped \
mbaton-relayHTTPSリバースプロキシ(Caddy・nginx・Cloudflare Tunnel等)を前に置いてください。HTTPのまま公開しないでください。
環境変数
環境変数 | 既定値 | 役割 |
| (空=チェックしない) | 中継サーバーへの登録を許可するM-Batonを制限する合言葉 |
| 120 | IP単位のレート制限(ブルートフォース対策) |
| 45.0 | ロングポーリングの待機秒数 |
| 35.0 | PCからの応答を待つ最大秒数 |
| 8080 | リッスンするポート(Cloud Runが自動設定) |
M-Baton側の設定
中継サーバーをデプロイした後、M-Batonアプリの「設定 > AI・MCP連携」で以下を設定します:
項目 | 設定値 |
AI・MCP連携 | ON |
中継サーバーURL |
|
中継サーバー合言葉 | デプロイ時に設定した |
設定後、M-Batonが発行するリモートMCP URL(https://あなたの中継サーバーURL/mcp/mb_xxxxxxxx)を、AI側のカスタムMCPサーバーとして登録します。
セキュリティ
RELAY_SHARED_SECRETを必ず設定してください(未設定だと第三者がリクエストを送れます)HTTPS必須(HTTPのまま公開するとトークンが平文で流れます)
channel_tokenはあなたのマニュアルにアクセスする鍵です。他人に教えないでください
トークンが漏れた場合はM-Batonの設定画面で「channel_token再発行」を押せば古いトークンは無効になります
ライセンス
MIT License - 詳細は LICENSE を参照
関連リンク
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Connect AI clients to your Dactic work context through a hosted MCP service.
Related MCP Servers
- AlicenseCqualityBmaintenanceMCP server for AI agents to send notifications, copy to clipboard, request confirmations, and collect text input from users across their devices.1035 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents on different machines to communicate and collaborate directly through relay channels, supporting structured agent contracts, real-time messaging, and human-in-the-loop approval workflows.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables external AI applications to access MCP tools by providing a user-hosted HTTPS endpoint that forwards requests to a paired desktop client.MIT
- FlicenseNot gradedqualityCmaintenanceEnables local programs to push text and images to AI assistants via HTTP and retrieve AI-generated responses, acting as a local data bridge between your code and MCP-capable AI tools.-