Skip to main content
Glama
vertexdevs-hq

Meta Business Messaging

mcp-meta

用于 Meta Business Messaging 的 MCP 服务器:WhatsApp Cloud API、Messenger Platform、Instagram Messaging 和 Graph API Webhooks。

涵盖约 55 个工具,分为 4 个产品。所有端点均指向 graph.facebook.com/{version}(默认 v22.0,可通过 META_API_VERSION 覆盖)。

安装

cd /Users/barboza/Solutions/mcp-meta
npm install
npm run build

配置(环境变量)

所有变量均为可选——也可在工具参数中通过 access_token / phone_number_id 等传入。环境变量仅作为默认值。

环境变量

用途

META_API_VERSION

Graph API 版本(默认 v22.0

META_BASE_URL

基础 URL(默认 https://graph.facebook.com

META_APP_SECRET

webhook_validate_signature 使用

META_VERIFY_TOKEN

握手令牌(hub.verify_token

WHATSAPP_ACCESS_TOKEN

Cloud API 的 Bearer 令牌

WHATSAPP_PHONE_NUMBER_ID

默认发件人号码 ID

WHATSAPP_BUSINESS_ACCOUNT_ID

WABA ID(模板、电话号码)

MESSENGER_PAGE_ACCESS_TOKEN

Facebook 主页令牌

MESSENGER_PAGE_ID

默认主页 ID

INSTAGRAM_PAGE_ACCESS_TOKEN

与 IG 关联的主页令牌(默认:与 MESSENGER_PAGE_ACCESS_TOKEN 相同)

INSTAGRAM_USER_ID

IG 用户 ID(如适用)

通过 Claude Code / MCP 客户端使用

~/.claude.json(或等效文件)中添加:

{
  "mcpServers": {
    "meta": {
      "command": "node",
      "args": ["/Users/barboza/Solutions/mcp-meta/dist/index.js"],
      "env": {
        "WHATSAPP_ACCESS_TOKEN": "EAAJB...",
        "WHATSAPP_PHONE_NUMBER_ID": "1234567890",
        "WHATSAPP_BUSINESS_ACCOUNT_ID": "987654321",
        "MESSENGER_PAGE_ACCESS_TOKEN": "EAAJB...",
        "MESSENGER_PAGE_ID": "1111111",
        "META_APP_SECRET": "...",
        "META_VERIFY_TOKEN": "..."
      }
    }
  }
}

用于开发(tsx,无需构建):

"args": ["--import", "tsx", "/Users/barboza/Solutions/mcp-meta/src/index.ts"]

可用工具

发现

  • meta_list_tools(product?) — 列出所有映射的工具和端点

  • 资源 meta://reference/endpoints.json — 完整的 JSON 目录

WhatsApp Cloud API(约 26 个工具)

消息:whatsapp_send_textwhatsapp_send_imagewhatsapp_send_audiowhatsapp_send_videowhatsapp_send_documentwhatsapp_send_stickerwhatsapp_send_locationwhatsapp_send_contactswhatsapp_send_reactionwhatsapp_send_templatewhatsapp_send_reply_buttonswhatsapp_send_listwhatsapp_send_cta_urlwhatsapp_send_flow

状态:whatsapp_mark_as_read

媒体:whatsapp_upload_mediawhatsapp_get_mediawhatsapp_delete_media

模板:whatsapp_list_templateswhatsapp_create_templatewhatsapp_delete_template

个人资料/账户:whatsapp_get_business_profilewhatsapp_update_business_profilewhatsapp_list_phone_numberswhatsapp_register_phone_numberwhatsapp_block_users

Messenger Platform(约 14 个工具)

messenger_send_textmessenger_send_quick_repliesmessenger_send_attachmentmessenger_send_generic_templatemessenger_send_button_templatemessenger_send_media_templatemessenger_sender_actionmessenger_upload_attachmentmessenger_get_user_profilemessenger_list_conversationsmessenger_set_profilemessenger_get_profilemessenger_pass_thread_controlmessenger_take_thread_control

Instagram Messaging(约 10 个工具)

instagram_send_textinstagram_send_quick_repliesinstagram_send_attachmentinstagram_send_generic_templateinstagram_send_button_templateinstagram_send_product_templateinstagram_private_reply_to_commentinstagram_react_to_messageinstagram_get_user_profileinstagram_list_conversations

Webhooks(3 个工具)

webhook_verify_challengewebhook_validate_signaturewebhook_parse_event

事实来源

文件 reference/endpoints.json 是端点的规范目录——通过爬取官方文档生成,来源为 developers.facebook.com/documentation/business-messaging/...developers.facebook.com/docs/messenger-platform/...

每个工具封装了该目录中的一个端点。要添加对新端点的支持:

  1. reference/endpoints.json 中添加条目

  2. 使用 src/client.ts 中的 graphRequest()src/tools/<produto>.ts 中创建工具

  3. src/index.ts 中注册(已通过 registerXxxTools 自动完成)

许可证

MIT。

-
license - not tested
Not graded
quality - not tested
D
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 Connectors

  • 60+ Meta Ads tools for AI agents: audits, campaign management, audiences and CAPI tracking.

  • Boost posts and launch community growth campaigns from your AI assistant. OAuth, credit-billed.

  • Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.

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/vertexdevs-hq/mcp-meta'

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