Skip to main content
Glama
DXMHXR

Google Chat MCP Server

by DXMHXR
README.md
# Google Chat MCP Server

MCP server for Google Chat using the internal Dynamite API — **no Google Cloud Console required**.

> ⚠️ **Disclaimer**: Uses an undocumented internal API reverse-engineered by [EionRobb](https://github.com/EionRobb/purple-googlechat). It may break at any time if Google updates their protocol.

---

## Setup

### 1. Export cookies from your browser

1. Install the **Cookie-Editor** extension ([Chrome](https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) / [Firefox](https://addons.mozilla.org/en-US/firefox/addon/cookie-editor/))
2. Open **chat.google.com** and make sure you're logged in
3. Click the Cookie-Editor icon → **Export → Export as JSON**
4. Save the file (anywhere you like)

> Cookies expire when you log out or after a long period of inactivity. Re-export them if you get a 401 error.

---

## Recommended install (`uvx`, no clone needed)

You don't need to clone the repo or install dependencies manually. [`uv`](https://docs.astral.sh/uv/getting-started/installation/) runs the server straight from GitHub and resolves dependencies automatically.

### Claude Desktop

Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "googlechat": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/RHMDHDYT/googlechat-mcp",
        "googlechat-mcp"
      ],
      "env": {
        "GCHAT_COOKIES": "/absolute/path/to/cookies.json"
      }
    }
  }
}
```

Restart Claude Desktop after editing the config.

### Claude Code

```bash
claude mcp add googlechat \
  --env GCHAT_COOKIES=/absolute/path/to/cookies.json \
  -- uvx --from git+https://github.com/RHMDHDYT/googlechat-mcp googlechat-mcp
```

Verify:
```bash
claude mcp list
claude mcp get googlechat
```

---

## Alternative: install from a local clone

If you'd rather run from source:

```bash
git clone https://github.com/RHMDHDYT/googlechat-mcp
cd googlechat-mcp
pip install mcp protobuf requests
```

Then point the config at `server.py` directly:

```json
{
  "mcpServers": {
    "googlechat": {
      "command": "python",
      "args": ["/absolute/path/to/googlechat-mcp/server.py"],
      "env": {
        "GCHAT_COOKIES": "/absolute/path/to/cookies.json"
      }
    }
  }
}
```

If you drop `cookies.json` directly into the `googlechat-mcp/` folder, the server reads it automatically and you can omit the `GCHAT_COOKIES` env var.

---

## Tools

| Tool | Description |
|------|-------------|
| `list_spaces` | List all DMs and spaces you're a member of |
| `read_messages` | Read messages + attachments/Drive/URLs from a DM or space |
| `send_message` | Send a new message to a DM or space |
| `reply_message` | Reply to an existing thread |
| `list_space_files` | List all files, Drive items, and URLs ever shared |
| `create_dm` | Open a DM with a user by email |

---

## Troubleshooting

| Error | Solution |
|-------|----------|
| `cookies.json not found` | Set the `GCHAT_COOKIES` env var or place `cookies.json` in the server folder |
| `401 Unauthorized` | Cookies expired — re-export them from your browser |
| `Incomplete cookies` | Make sure you export from `chat.google.com`, not another Google domain |
| Proto decode error | Google may have updated the API — check EionRobb's repo for the latest schema |

---

## Credits

Protobuf schema: [EionRobb/purple-googlechat](https://github.com/EionRobb/purple-googlechat)

TDQS

A3.6/5.0

Scored across 13 tools

Disambiguation5/5

Each tool targets a distinct action and resource (e.g., reactions, DM creation, presence, file listing), with no overlapping or confusing purposes.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case, making them predictable and easy to understand.

Tool Count5/5

13 tools is well-scoped for a chat server, covering core messaging, reactions, searches, file handling, and presence without being excessive.

Completeness4/5

Missing edit/delete message and space management features, but the essential chat workflows are fully covered.

Maintenance

ActivityMaintained
ResponsivenessSyncing