whatsmcp
whatsmcp
一个无状态的 MCP 服务器,运行在 Cloudflare Workers 上,将 Z-API WhatsApp REST API 作为工具暴露,通过 Streamable HTTP 在 https://whatsmcp.unfld.dev/mcp 提供服务。
工具在构建时从 postman.json 生成,因此工具集跟随集合更新,而非手动维护。三个元工具(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 是客户端必须提供的静态 Bearer 令牌。
Related MCP server: WA MCP
本地运行
bun run devWrangler 在 http://localhost:8787 上提供 Worker 服务。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 deploywhatsmcp.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