Skip to main content
Glama

whatsmcp

A stateless MCP server on Cloudflare Workers that exposes the Z-API WhatsApp REST API as tools, served over Streamable HTTP at https://whatsmcp.unfld.dev/mcp.

Tools are generated at build time from postman.json, so the tool surface tracks the collection rather than being hand-maintained. Three meta-tools (zapi_list_endpoints, zapi_describe_endpoint, zapi_request) are always registered, so no endpoint is ever unreachable even when the toolset filter narrows what gets exposed.

Setup

bun install

Create .dev.vars in the repo root (gitignored) with your Z-API credentials:

MCP_AUTH_TOKEN=...
ZAPI_INSTANCE_ID=...
ZAPI_INSTANCE_TOKEN=...
ZAPI_CLIENT_TOKEN=...

ZAPI_INSTANCE_ID and ZAPI_INSTANCE_TOKEN build the instance base URL; ZAPI_CLIENT_TOKEN is sent as the Client-Token header. MCP_AUTH_TOKEN is the static bearer token clients must present.

Related MCP server: WA MCP

Local run

bun run dev

Wrangler serves the Worker at http://localhost:8787. The MCP endpoint is http://127.0.0.1:8787/mcp. Clients must send one of:

Authorization: Bearer <MCP_AUTH_TOKEN>
Authorization: <MCP_AUTH_TOKEN>

GET /health is public and returns { "ok": true, "name": "whatsmcp" }.

Scripts

Script

What it does

bun run generate

Regenerate src/generated/endpoints.ts from the Postman collection

bun run dev

Run the Worker locally with wrangler dev

bun run deploy

Deploy to Cloudflare

bun run typecheck

tsc --noEmit

bun test

Run the test suite

bun run cf-typegen

Regenerate worker-configuration.d.ts from wrangler.jsonc + .dev.vars

Rerun bun run cf-typegen after changing bindings or vars in wrangler.jsonc.

Configuration

ZAPI_TOOLSETS (a plain var in wrangler.jsonc, default *) selects which Z-API categories register as tools — for example instance,messages,groups. The meta-tools ignore this filter.

Deploying

Secrets are not stored in wrangler.jsonc. Set them once per environment:

wrangler secret put MCP_AUTH_TOKEN
wrangler secret put ZAPI_INSTANCE_ID
wrangler secret put ZAPI_INSTANCE_TOKEN
wrangler secret put ZAPI_CLIENT_TOKEN
wrangler deploy

The whatsmcp.unfld.dev custom domain is declared in wrangler.jsonc and is provisioned by Cloudflare on first deploy.

Connecting a client

{
  "mcpServers": {
    "whatsmcp": {
      "url": "https://whatsmcp.unfld.dev/mcp",
      "headers": { "Authorization": "Bearer <MCP_AUTH_TOKEN>" }
    }
  }
}

Both Authorization: Bearer <MCP_AUTH_TOKEN> and the bare Authorization: <MCP_AUTH_TOKEN> form are accepted. GET /health is public and unauthenticated for uptime checks.

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    -
    quality
    -
    maintenance
    A self-hosted MCP server that connects AI clients to WhatsApp via the WAHA HTTP API. It enables users to manage sessions, search contacts, and send or receive messages and media directly through natural language interfaces.
    21
  • F
    license
    -
    quality
    C
    maintenance
    WhatsApp MCP server that exposes messaging, groups, contacts, and profile management as tools and resources for AI agents, supporting Baileys and Meta Cloud API.
    19
  • A
    license
    -
    quality
    C
    maintenance
    MCP server that connects AI agents to WhatsApp using the multi-device API, enabling messaging, group management, and more as a regular user.
    15
    MIT

View all related MCP servers

Related MCP Connectors

  • Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.

  • MCP server for Gainium — manage trading bots, deals, and balances via AI assistants

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

View all MCP Connectors

Latest Blog Posts

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/pedrogmbh/whatsmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server