Skip to main content
Glama

whatsmcp

ステートレスなMCPサーバーをCloudflare Workers上で動作させ、Z-API WhatsApp REST APIをツールとして公開します。Streamable HTTP経由で https://whatsmcp.unfld.dev/mcp にて提供されます。

ツールはビルド時に postman.json から生成されるため、手動でメンテナンスするのではなく、コレクションに追従したツールサーフェスが保たれます。3つのメタツール(zapi_list_endpointszapi_describe_endpointzapi_request)は常に登録されるため、ツールセットフィルターで公開範囲を絞っても、どのエンドポイントも到達不能になることはありません。

セットアップ

bun install

リポジトリルートに .dev.vars を作成し(gitignore対象)、Z-APIの認証情報を記述します:

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

ZAPI_INSTANCE_IDZAPI_INSTANCE_TOKEN はインスタンスのベースURLを構築するために使用し、ZAPI_CLIENT_TOKENClient-Token ヘッダーとして送信されます。MCP_AUTH_TOKEN はクライアントが提示する必要がある静的ベアラートークンです。

Related MCP server: WA MCP

ローカル実行

bun run dev

Wrangler は Worker を http://localhost:8787 で提供します。MCPエンドポイントは http://127.0.0.1:8787/mcp です。クライアントは以下のいずれかを送信する必要があります:

Authorization: Bearer <MCP_AUTH_TOKEN>
Authorization: <MCP_AUTH_TOKEN>

GET /health は公開されており、{ "ok": true, "name": "whatsmcp" } を返します。

スクリプト

スクリプト

説明

bun run generate

Postmanコレクションから src/generated/endpoints.ts を再生成

bun run dev

wrangler dev でWorkerをローカル実行

bun run deploy

Cloudflareにデプロイ

bun run typecheck

tsc --noEmit

bun test

テストスイートを実行

bun run cf-typegen

wrangler.jsonc + .dev.vars から worker-configuration.d.ts を再生成

wrangler.jsonc のバインディングや変数を変更した後は、bun run cf-typegen を再実行してください。

設定

ZAPI_TOOLSETSwrangler.jsonc 内のプレーン変数、デフォルトは *)は、ツールとして登録するZ-APIカテゴリを選択します(例:instance,messages,groups)。メタツールはこのフィルターを無視します。

デプロイ

シークレットは wrangler.jsonc に保存されません。環境ごとに一度設定します:

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

カスタムドメイン whatsmcp.unfld.devwrangler.jsonc で宣言されており、初回デプロイ時にCloudflareによってプロビジョニングされます。

クライアントの接続

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

Authorization: Bearer <MCP_AUTH_TOKEN> とベアの Authorization: <MCP_AUTH_TOKEN> の両方の形式が受け入れられます。GET /health は公開されており、アップタイムチェックのために認証不要です。

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