# Green API WhatsApp

Wires WhatsApp into your AI agent: sending messages, handling groups and contacts, and picking up incoming notifications.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: green-api
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/green-api/green-api-mcp-gateway
- Updated: 2026-07-17
- HTML: https://affpapa.org/en/nevibecode/mcp/green-api-whatsapp

## What it does

Green API WhatsApp is a Go MCP server that exposes WhatsApp to an agent through GREEN-API. The agent can send text, a file by URL, a location, a contact or a poll, plus forward and edit messages. Group work is covered too: create one, pull its data, add or remove participants.

Four transports ship with it: `stdio` for running the binary locally, `sse`, `http` and `hybrid`. Building needs Go 1.25+, and config comes from YAML or environment variables, with the variables winning. HTTP transports require `auth.mode: proxy` — credentials arrive in headers or through the built-in OAuth flow, so `GREEN_API_INSTANCE_ID` and `GREEN_API_TOKEN` get ignored in that setup. Worth knowing before you point it at a public host and assume env vars alone will do.

Incoming notifications arrive either by polling or through an HTTP receiver. One gateway can hold several instances. Prometheus metrics and OpenTelemetry are available, and prompt templates cover common cases like customer support and broadcasts.

## Requirements
- Needs: a prebuilt binary from the repository releases
- Remote server: `https://mcp.green-api.com/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http green-api-whatsapp https://mcp.green-api.com/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add green-api-whatsapp --url https://mcp.green-api.com/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "green-api-whatsapp": {
            "url": "https://mcp.green-api.com/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "green-api-whatsapp": {
            "type": "http",
            "url": "https://mcp.green-api.com/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http green-api-whatsapp https://mcp.green-api.com/mcp
```

## When to use it
- send a WhatsApp message straight from the agent
- create a group and add participants to it
- check whether a phone number has WhatsApp
- collect incoming notifications by polling or an HTTP receiver
- fetch a QR code to authorize an instance

## Example prompts
- Send a WhatsApp message with the report text to the number in `contacts.csv`
- Create a project group and add the participants from the list
- Check whether this number is on WhatsApp and print the status

## Similar
- [whatsapp-cloud-api](https://affpapa.org/en/nevibecode/skills/whatsapp-cloud-api.md) — skill · 657 installs
- [whatsapp-automation](https://affpapa.org/en/nevibecode/skills/whatsapp-automation.md) — skill · 6500 installs
- [mcp-whatsapp-cloud](https://affpapa.org/en/nevibecode/mcp/mcp-whatsapp-cloud.md) — MCP server · ★ 274
- [twilio-whatsapp-send-message](https://affpapa.org/en/nevibecode/skills/twilio-whatsapp-send-message.md) — skill · 2 installs
- [whatsapp-marketing](https://affpapa.org/en/nevibecode/skills/whatsapp-marketing.md) — skill · 1600 installs
- [whatsapp](https://affpapa.org/en/nevibecode/skills/whatsapp.md) — skill · 368 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
