whatsmcp
whatsmcp
ステートレスなMCPサーバーをCloudflare Workers上で動作させ、Z-API WhatsApp REST APIをツールとして公開します。Streamable HTTP経由で https://whatsmcp.unfld.dev/mcp にて提供されます。
ツールはビルド時に postman.json から生成されるため、手動でメンテナンスするのではなく、コレクションに追従したツールサーフェスが保たれます。3つのメタツール(zapi_list_endpoints、zapi_describe_endpoint、zapi_request)は常に登録されるため、ツールセットフィルターで公開範囲を絞っても、どのエンドポイントも到達不能になることはありません。
セットアップ
bun installリポジトリルートに .dev.vars を作成し(gitignore対象)、Z-APIの認証情報を記述します:
MCP_AUTH_TOKEN=...
ZAPI_INSTANCE_ID=...
ZAPI_INSTANCE_TOKEN=...
ZAPI_CLIENT_TOKEN=...ZAPI_INSTANCE_ID と ZAPI_INSTANCE_TOKEN はインスタンスのベースURLを構築するために使用し、ZAPI_CLIENT_TOKEN は Client-Token ヘッダーとして送信されます。MCP_AUTH_TOKEN はクライアントが提示する必要がある静的ベアラートークンです。
Related MCP server: WA MCP
ローカル実行
bun run devWrangler は 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" } を返します。
スクリプト
スクリプト | 説明 |
| Postmanコレクションから |
|
|
| Cloudflareにデプロイ |
|
|
| テストスイートを実行 |
|
|
wrangler.jsonc のバインディングや変数を変更した後は、bun run cf-typegen を再実行してください。
設定
ZAPI_TOOLSETS(wrangler.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.dev は wrangler.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 は公開されており、アップタイムチェックのために認証不要です。
This server cannot be installed
Maintenance
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
- Flicense-qualityCmaintenanceWhatsApp MCP server that exposes messaging, groups, contacts, and profile management as tools and resources for AI agents, supporting Baileys and Meta Cloud API.19
- Alicense-qualityCmaintenanceMCP server that connects AI agents to WhatsApp using the multi-device API, enabling messaging, group management, and more as a regular user.15MIT
- Alicense-qualityBmaintenanceMCP server exposing WhatsApp Cloud API operations as tools for AI agents like Claude Code, Cursor, and Codex.MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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