gchat-claude-channel
Monitors a Google Chat space for new messages, verifies senders against an allowlist, and posts replies from the Claude Code session back to the space.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gchat-claude-channelrun unit tests and show me the results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gchat-claude-channel
Talk to your running Claude Code session from Google Chat — from your phone, from anywhere.
This is a Claude Code channel: messages you send in a Google Chat space are injected into the interactive Claude Code session you already have open, and the agent's replies come back to the same space. One live conversation, shared between your terminal and your phone.
Unlike bots that spawn a fresh headless claude -p per message, this pushes into your live session — full context, same working directory, same tools. It uses the official Claude Code Channels mechanism (a small MCP server that declares the claude/channel capability), plus Google's official Chat and Drive APIs. No scraping, no reverse engineering.
Status: Claude Code Channels is a research preview. The protocol may change between Claude Code versions. Requires Claude Code v2.1.80+.
⚠️ Security — read this first
By default the example supervisor runs the session with --permission-mode bypassPermissions, which means the agent executes commands coming from Google Chat with no per-action approval. That is powerful and dangerous. Before you deploy it:
The allowlist is the only wall.
GCHAT_ALLOWED_SENDERSgates on the sender's Google user id, never the space. Only listed users' messages are injected; everyone else is silently ignored. Keep it to yourself (and people you fully trust). The server refuses to start with an empty allowlist.Treat message content as untrusted. Anything you forward into the channel — a web page, a file, a screenshot — could contain hidden instructions (prompt injection). The channel labels senders as verified, but content is still data, not commands. Don't paste unknown content into a session that can run arbitrary code.
Prefer a dedicated space with only you and the bot account in it, so there is no way for a third party to post.
Want approvals instead of bypass? Remove
--permission-mode bypassPermissionsfrom the supervisor. The session will then prompt for each risky action — you'll need a channel permission relay to approve remotely, or the session blocks on local input.
This tool ships the bypass example because that is what makes a personal "phone as terminal" flow useful. If that trade-off isn't right for you, don't use bypass mode.
Related MCP server: tsgram-mcp
How it works
Google Chat space ──poll──► gchat MCP server ──inject──► your live Claude Code session
▲ (this repo) │
└────────────── reply tool ◄────────────────────────────── ┘The MCP server polls the space for new messages, verifies the sender against the allowlist, and injects the text (plus any downloaded attachments) as a channel notification. The agent replies with the reply tool, which posts back to the space.
Requirements
Claude Code v2.1.80+
Node.js 18+
A Google Chat space and Google credentials with the Chat + Drive read scopes
Optional:
whisperandffmpegon PATH (for voice-note transcription and image conversion)
Setup
1. Install
git clone https://github.com/<you>/gchat-claude-channel
cd gchat-claude-channel
npm install2. Configure
cp .env.example .env
# edit .env — see the comments in that fileYou need three things in .env:
GCHAT_SPACE— the space to watch (e.g.spaces/AAAAAAAAAAA; it's in the space URL, or list spaces via the Chat API).GCHAT_ALLOWED_SENDERS— your Google user resource name(s), e.g.users/1234567890. You can find yours by reading one of your own messages via the Chat API (messages.list→sender.name).Auth — either
GCHAT_TOKEN_COMMAND(a command that prints an access token, e.g.gcloud auth print-access-token) or an OAuth refresh token trio. The token needs thechat.messagesanddrive.readonlyscopes.
3. Register as an MCP server
claude mcp add --scope user gchat -- node "$(pwd)/server.js"4. Run it
Interactive (loads the channel into your session):
claude --dangerously-load-development-channels server:gchat(The dev flag is required because self-authored channels aren't on the approved allowlist during the research preview. You'll confirm a warning on first launch.)
Now post in your space — the message appears in the session, and the agent replies back to Chat.
Run it 24/7
See supervisor.sh.example and com.example.gchat-terminal.plist.example for a launchd setup (macOS) that keeps a tmux-hosted session alive, auto-answers the startup confirmations, and restarts on failure. Adapt the label/paths for your machine (or port to systemd on Linux).
Attachments
Images, PDFs, audio, and Drive files sent to the space are downloaded to an inbox; images/PDFs are handed to the agent to Read, Google native docs are exported to text, and audio is transcribed locally with whisper. Configure the whisper model/language via env (see .env.example).
Health checking
The server touches a heartbeat file (in GCHAT_STATE_DIR) on every successful poll. If polling stalls — e.g. the token expires — the heartbeat stops updating even while the process is still alive. Point your monitoring at the heartbeat's mtime to catch that "zombie" state, which a plain process check would miss.
Why this exists
At the time of writing, no channel shipped for Google Chat (the official channels cover Telegram, Discord, and iMessage), and multi-platform Claude Code gateways route to their own managed sessions rather than injecting into your live interactive one. This fills that gap for anyone living in Google Workspace.
License
MIT — see LICENSE.
Available Tools
1 toolreplyA
Send a message back to the Google Chat space. Text over 4000 chars is auto-split.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Message text (Google Chat simple formatting: *bold* _italic* `code`) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses auto-split for text over 4000 chars and formatting, but lacks others like rate limits, error handling, or permission requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose and followed by a key behavioral note. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description covers purpose, key behavior (auto-split), and formatting. Could mention return value or acknowledgment, but overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a description for 'text' mentioning formatting. The tool description adds the critical auto-split behavior, providing value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Send a message back to the Google Chat space' with a specific verb and resource. No sibling tools to differentiate, but the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description implies usage context (replying in Google Chat) but provides no explicit guidance on when to use or not use, nor alternatives. Given no siblings, it's adequate but lacks depth.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Only one tool exists, so there is no possibility of confusion between tools. All agent actions will use 'reply'.
With a single tool, there is no inconsistency to evaluate. The name 'reply' is clear and appropriate for its function.
A single tool for a chat channel server feels very limited. While it serves a narrow purpose, typical chat interactions often require reading or listing messages, making this count borderline insufficient.
The server covers only outbound replies. There are no tools for reading messages, listing spaces, or managing threads, which are essential for full chat interaction. This leaves significant gaps.
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 Connectors
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Trade Robinhood through natural language in Claude Code.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables remote control and monitoring of Claude Code sessions from mobile devices through ChatGPT Custom Connectors. Allows creating, managing, and interacting with multiple Claude Code sessions via natural language commands from anywhere.3MIT
- AlicenseNot gradedqualityDmaintenanceConnects Claude Code sessions to Telegram, enabling AI-powered code assistance and file management directly from Telegram chats.89MIT
- AlicenseNot gradedqualityDmaintenanceEnables bidirectional communication with Claude via WhatsApp, allowing commands, file sharing, and persistent context without needing Claude Code open.161MIT
- AlicenseNot gradedqualityDmaintenanceConnects Claude to Google Chat for searching messages, spaces, and DMs, automatically resolving user IDs to real display names.MIT
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/magichao326/gchat-claude-channel'
If you have feedback or need assistance with the MCP directory API, please join our Discord server