Skip to main content
Glama
gchat-mcp
by sldone

gchat-mcp

npm CI License: MIT

An MCP server that lets Claude, Codex and other AI agents read, search and send your Google Chat messages.

It doesn't use the Google Chat API, so it needs no OAuth app and no Google Cloud project. Instead, it drives the Chat web app (chat.google.com) in a Chrome profile that you sign in to once. That means it works even when your Workspace admin blocks third-party OAuth apps. Your agent does the summarizing.

Requirements

  • Node.js 22 or later

  • Google Chrome

Related MCP server: Open ChatGPT

Quick start

Claude Code

claude plugin marketplace add sldone/gchat-mcp
claude plugin install google-chat@gchat-mcp

Codex

codex plugin marketplace add sldone/gchat-mcp
codex plugin install google-chat@gchat-mcp

Other MCP clients

Add a stdio server that runs npx -y gchat-mcp. For example, in Claude Desktop's or Cursor's MCP config:

{
  "mcpServers": {
    "google-chat": { "command": "npx", "args": ["-y", "gchat-mcp"] }
  }
}

See docs/configuration.md for every client, setting and command.

Sign in

The first time your agent uses Google Chat, the server reports that you're not signed in. The agent then calls sign_in, which opens a Chrome window where you sign in to Google as usual, with SSO and 2FA. The window closes by itself once Chat loads. You can also sign in ahead of time:

npx gchat-mcp login

Tools

Tool

What it does

list_spaces

Lists your spaces, group chats and DMs, with the ids the other tools take

read_messages(space, limit = 50)

Reads the latest top-level messages of a conversation, oldest first. Scrolls back through history for larger limits

read_thread(space, thread)

Reads every message in a thread

search(query)

Searches all your conversations like the "Search chat" box and returns the top ~20 matches

send_message(space, text, thread?)

Posts as you, as a new message or as a reply in a thread

sign_in

Opens a Chrome window to sign in and waits up to 5 minutes

sign_out

Deletes the Google session stored on this computer

Messages come back as JSON with space, thread, id, author (You for you), time (local) and text. The server also sends your agent instructions on how the tools fit together, and tells it to confirm with you before sending anything.

Example prompts:

  • "Summarize what happened in the Engineering space today."

  • "Find the merge requests people asked me to review this week."

  • "Reply in that thread that I'll look at it after lunch." The agent shows you the text before sending.

Security and privacy

  • Your session stays on your computer. It's stored only in the Chrome profile at ~/.gchat-mcp/profile, which is readable only by your user. Chrome encrypts the cookies with your OS keychain. The server never reads, copies, logs or sends them anywhere.

  • Message content goes to your AI agent. Whatever the tools read is passed to your MCP client, and from there to its model provider.

  • send_message posts as you. Keep your client's approval prompt on for it.

  • sign_out deletes the local session. Run it, or npx gchat-mcp logout, when you're done.

Details, the threat model, and how to report a vulnerability are in SECURITY.md.

Automating around an admin restriction may conflict with your organization's acceptable-use policy. Check before you rely on this.

Limitations

  • It depends on the Chat web UI. When Google changes the page, reads can come back empty or sending can time out until the selectors in src/server.ts are updated.

  • search returns only the first page of results (about 20).

  • Unread status isn't reported.

  • Very long threads return only the part Chat renders first.

  • Tool calls run one at a time, because they share one browser tab.

Contributing

See CONTRIBUTING.md. Changes are listed in CHANGELOG.md.

License

MIT

Available Tools

7 tools
list_spacesList Google Chat conversationsA
Read-only

List every space, group chat and direct message in the Google Chat sidebar as { id, name }. Ids look like "space/AAAAbCdEfGh" or "dm/aBcDeFgAAAE" and are what the other tools take.

Inputs: no named parameters.

read_messagesRead Google Chat messagesA
Read-only

Read the most recent top-level messages of a space or DM, oldest first. Each message has space, thread and id, author ("You" for the user), time (local, "YYYY-MM-DD HH:MM:SS") and text. Messages that start a thread also have replies (e.g. "3 replies, Last Reply 9:09 AM"); read those with read_thread. Larger limits scroll back through history and take longer.

Inputs: space (required), limit.

read_threadRead a Google Chat threadA
Read-only

Read every message in one thread, starting with the message that opened it. Each message has space, thread and id, author ("You" for the user), time (local, "YYYY-MM-DD HH:MM:SS") and text.

Inputs: space (required), thread (required).

send_messageSend a Google Chat messageA

Send a message as the user, either as a new message in a space or DM or as a reply in a thread. It is posted immediately and other people see it, so confirm the text and conversation with the user first.

Inputs: text (required), space (required), thread.

sign_inSign in to Google ChatA
Idempotent

Open a visible Chrome window where the user signs in to their Google account. Call it when another tool reports that the user is not signed in. Waits up to 5 minutes and returns once Google Chat has loaded.

Inputs: no named parameters.

sign_outSign out of Google ChatA
DestructiveIdempotent

Delete the Google session stored on this computer (the server's Chrome profile). Nothing on this computer can act as the user until sign_in is called again. To also end the session on Google's side, the user can remove it in their Google Account's security settings.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 7 tools

    Disambiguation4/5

    The tools map to clearly different operations: listing spaces, reading recent messages, reading a thread, global search, sending, and auth. The only potential confusion is between read_messages and search, since both return message objects, but the descriptions make the scope difference (one space vs. all spaces, recency vs. keyword) explicit.

    Naming Consistency4/5

    Six of seven tools follow a clean verb_noun snake_case pattern (list_spaces, read_messages, read_thread, send_message, sign_in, sign_out). The lone outlier is the bare verb 'search', which is still unambiguous but breaks the pattern.

    Tool Count5/5

    Seven tools is a tight, well-scoped surface for a chat client: read paths, one write path, and two auth helpers. Every tool earns its place with no filler.

    Completeness4/5

    The core loop (list spaces, read messages/threads, search, send) plus session management is covered, so agents can complete typical tasks. Gaps exist around write lifecycle: no edit or delete message, no reaction support, and no way to create/manage spaces.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables token-efficient browser automation for AI chats like ChatGPT, Gemini, and Claude, allowing reading responses, sending messages, waiting for streaming replies, and bridging conversations between tabs via Chrome DevTools Protocol.
      5
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to drive your own signed-in ChatGPT web account — asking questions, continuing chats, attaching files, toggling thinking or web search, creating images, transcribing recordings of any length, reading replies aloud, and managing conversations, memories and projects. It runs against a local Chrome tab on chatgpt.com and reports live progress and step-named errors back to the client.
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Lets AI agents list, read, wait on, and send Microsoft Teams chats by driving a Chrome tab that already holds your signed-in Teams session, with attachments and per-chat send modes. No Azure app registration, bot account, or admin consent is needed.
      6
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to locally drive the user's own logged-in Chrome browser, including clicking, typing, reading pages, taking screenshots, running JavaScript, recording GIFs, and coordinating parallel agents across Chrome profiles and tab groups.
      21
      MIT