Google Chat MCP Server
導入
このプロジェクトは、FastMCPを使用してPythonで記述されたMCP(Model Control Protocol)サーバー向けのGoogle Chat統合を提供します。これにより、MCPツールを介してGoogle Chatのスペースやメッセージにアクセスし、操作できるようになります。
構造
このプロジェクトは、次の 2 つの主要コンポーネントで構成されています。
Google チャット ツールを備えた MCP サーバー: モデル コントロール プロトコルを通じて Google チャットとやり取りするためのツールを提供します。
FastMCPによる執筆
server.py: Google Chat ツールを使用したメイン MCP サーバーの実装google_chat.py: Google Chat API の統合と認証の処理
認証サーバー: Google アカウント認証用のスタンドアロン コンポーネント
FastAPIによる執筆
GoogleとのOAuth2フローを処理
アクセストークンを保存および管理します
独立して実行することも、MCP サーバーの一部として実行することもできます。
server_auth.py: 認証サーバーの実装
認証フローにより、Google API トークンを取得・更新できます。MCP ツールは、このトークンを使用して Google Chat データにアクセスします。(スペースとメッセージ)
Related MCP server: Google Chat MCP Server
特徴
Google Chat API を使用した OAuth2 認証
利用可能な Google Chat スペースの一覧
日付フィルタリングを使用して特定のスペースからメッセージを取得する
簡単にセットアップできるローカル認証サーバー
要件
Python 3.8以上
Chat API が有効になっている Google Cloud プロジェクト
Google Cloud Console からの OAuth2 認証情報
使い方は?
Google OAuthログインの準備
このプロジェクトを複製する
git clone https://github.com/chy168/google-chat-mcp-server.git cd google-chat-mcp-serverGoogle Cloud プロジェクト (GCP) を準備する
Google Cloud コンソール ( https://console.cloud.google.com/auth/overview?project=\ <YOUR_PROJECT_NAME>)
Google Auth Platform > クライアント > (+) クライアントの作成 > Web アプリケーション参照: https://developers.google.com/identity/protocols/oauth2/?hl=en承認済みの JavaScript オリジンの追加:
http://localhost:8000承認済みのリダイレクト URI:http://localhost:8000/auth/callbackOAuth 2.0クライアント
credentials.json作成したら、クライアントシークレットを.jsonファイルとしてダウンロードします。credentials.jsonとしてプロジェクトの最上位に保存します。
認証サーバーを実行し、Google アクセス トークンを取得します (Google のみにログインし、MCP サーバーにはまだログインしません)
python server.py -local-auth --port 8000ブラウザでhttp://localhost:8000/authを開きます。
ログインしてください!
ログイン後、アクセストークンは
token.jsonとして保存されます。
MCP 構成 (mcp.json)
{
"mcpServers": {
"google_chat": {
"command": "uv",
"args": [
"--directory",
"<YOUR_REPO_PATH>/google-chat-mcp-server",
"run",
"server.py",
"--token-path",
"<YOUR_REPO_PATH>/google-chat-mcp-server/token.json"
]
}
}ツール
MCP サーバーは次のツールを提供します。
Google チャットツール
get_chat_spaces()- ボットがアクセスできるすべての Google Chat スペースを一覧表示しますget_space_messages(space_name: str, start_date: str, end_date: str = None)- 特定の Google Chat スペースからのメッセージを、オプションの時間フィルタリング付きで一覧表示します。
開発とデバッグ
fastmcp dev server.py --with-editable .Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceThis MCP server provides comprehensive Google Workspace integration (Gmail, Drive, etc.) with multi-user OAuth. Unique features include RAG-powered natural language to Chat card rendering, runtime Jinja2 macro creation, and dynamic tool management.725Apache 2.0
- AlicenseAqualityAmaintenanceEnables interaction with Google Chat via MCP using the internal Dynamite API, allowing listing spaces, reading and sending messages, and managing DMs. No Google Cloud Console setup required.13MIT
- AlicenseBqualityDmaintenanceProvides natural language control over Google Workspace services (Calendar, Drive, Gmail, Docs, Sheets, Slides, Forms, Tasks, Chat) via MCP, with OAuth 2.1 multi-user authentication.100MIT
- Alicense-qualityDmaintenanceMCP server for Google Chat that enables managing spaces, messages, members, reactions, attachments, and GIFs through the Model Context Protocol.1321MIT
Related MCP Connectors
Google Docs MCP Pack — read, create, and edit Google Docs via OAuth.
Confluence MCP — wraps the Confluence Cloud REST API v2 (OAuth)
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
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/chy168/google-chat-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server