Skip to main content
Glama
billyfranklim1

mcp-evolution

mcp-evolution

npm version license CI

用于 Evolution API (WhatsApp) 的 TypeScript MCP 服务器,支持实例绑定。

架构

该服务器实现了 Model Context Protocol

  • 传输: stdio — MCP 主机(Claude Desktop、Claude Code 等)启动此进程并通过 stdin/stdout 进行 JSON-RPC 通信。

  • 服务器: 使用官方 TypeScript SDK 中的高级 McpServer 类,自动处理能力协商和会话生命周期。

  • 工具: 通过 registerTool() 注册了 50 个工具,并使用 Zod 验证输入模式 — SDK 在处理程序运行前强制执行类型检查。

所有三个连接参数(API URL、API 密钥、实例名称)在启动时通过环境变量绑定。AI 调用者无法在对话中途切换实例。

Related MCP server: mcp-evolution-api

工具

消息

工具

描述

send_text

发送纯文本消息

send_media

发送图片、视频、音频或文档

send_audio

发送 WhatsApp 音频(PTT 语音笔记)

send_sticker

发送贴纸 (webp)

send_location

发送位置定位

send_contact

分享一个或多个联系人 (vCards)

send_reaction

使用表情符号对消息做出反应

send_poll

发送投票消息

send_list

发送交互式列表/菜单消息

send_button

发送交互式按钮消息

send_status

发布 WhatsApp 状态 (story) 更新

聊天

工具

描述

find_chats

查找聊天,可选择使用 Prisma 风格的 where 子句进行过滤

find_contacts

查找联系人,可选择进行过滤

find_messages

通过 remoteJid 查找消息,可选择限制数量

get_chat_history

获取联系人或群组 JID 的消息历史记录

mark_as_read

将一条或多条消息标记为已读

archive_chat

归档或取消归档聊天

delete_message

为所有人删除消息

fetch_profile_picture

获取联系人的头像 URL

download_media

将消息中的媒体下载为 base64

send_presence

发送状态更新(正在输入、正在录音等)

check_number

检查电话号码是否拥有 WhatsApp 账户

个人资料

工具

描述

fetch_business_profile

获取联系人的 WhatsApp 商业资料

update_profile_name

更新实例的显示名称

update_profile_status

更新实例的关于/状态文本

update_profile_picture

更新实例的头像

remove_profile_picture

移除实例的头像

fetch_privacy

获取当前的隐私设置

update_privacy

更新隐私设置

update_block_status

阻止或解除阻止联系人

群组

工具

描述

list_groups

列出绑定实例的所有 WhatsApp 群组

get_group_info

通过 JID 获取特定群组的详细信息

create_group

创建新的 WhatsApp 群组

update_group_subject

更新群组名称

update_group_description

更新群组描述

update_group_picture

更新群组头像

fetch_invite_code

获取群组的邀请码/链接

revoke_invite_code

撤销并重新生成群组邀请码

accept_invite

通过代码接受群组邀请

send_group_invite

向特定联系人发送群组邀请链接

update_participants

添加、移除、提升或降级群组成员

update_group_setting

更新群组设置(公告模式、锁定)

leave_group

退出群组

find_group_by_invite

在不加入的情况下通过邀请码获取群组信息

实例

工具

描述

connection_state

获取实例当前的连接状态

restart_instance

重启实例(重新连接而不注销)

logout_instance

注销实例(清除会话)

get_settings

获取当前实例设置

set_settings

更新实例设置

Webhook

工具

描述

find_webhook

获取当前的 Webhook 配置

set_webhook

配置 Webhook

标签

工具

描述

find_labels

列出所有标签(需要 WhatsApp Business)

handle_label

为聊天添加或移除标签

通过 npx 安装并运行

EVOLUTION_API_URL=http://localhost:8080 \
EVOLUTION_API_KEY=your-key \
EVOLUTION_INSTANCE=your-instance \
npx mcp-evolution

配置

变量

必需

描述

EVOLUTION_API_URL

Evolution API 的基础 URL (例如 http://localhost:8080)

EVOLUTION_API_KEY

Evolution API 配置中的全局 API 密钥

EVOLUTION_INSTANCE

在 Evolution API 中创建的实例名称

.env.example 复制到 .env 以进行本地开发。

与 Claude Desktop / Claude Code 一起使用

添加到 ~/.claude/claude_desktop_config.json 或项目 .mcp.json 中:

{
  "mcpServers": {
    "whatsapp": {
      "command": "npx",
      "args": ["mcp-evolution"],
      "env": {
        "EVOLUTION_API_URL": "http://localhost:8080",
        "EVOLUTION_API_KEY": "your-evolution-api-key",
        "EVOLUTION_INSTANCE": "your-instance-name"
      }
    }
  }
}

或者,如果从本地检出运行,直接指向构建的二进制文件:

{
  "mcpServers": {
    "whatsapp": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-evolution/dist/index.js"],
      "env": {
        "EVOLUTION_API_URL": "http://localhost:8080",
        "EVOLUTION_API_KEY": "your-evolution-api-key",
        "EVOLUTION_INSTANCE": "your-instance-name"
      }
    }
  }
}

开发

# Install dependencies
npm install

# Run in dev mode (no build step)
npm run dev

# Build TypeScript → dist/
npm run build

# Run tests
npm test

# Start from built output
npm start

封装的 Evolution API 端点

工具

方法

路径

send_text

POST

/message/sendText/{instance}

send_media

POST

/message/sendMedia/{instance}

send_audio

POST

/message/sendWhatsAppAudio/{instance}

send_sticker

POST

/message/sendSticker/{instance}

send_location

POST

/message/sendLocation/{instance}

send_contact

POST

/message/sendContact/{instance}

send_reaction

POST

/message/sendReaction/{instance}

send_poll

POST

/message/sendPoll/{instance}

send_list

POST

/message/sendList/{instance}

send_button

POST

/message/sendButtons/{instance}

send_status

POST

/message/sendStatus/{instance}

find_chats

POST

/chat/findChats/{instance}

find_contacts

POST

/chat/findContacts/{instance}

find_messages / get_chat_history

POST

/chat/findMessages/{instance}

mark_as_read

POST

/chat/markMessageAsRead/{instance}

archive_chat

POST

/chat/archiveChat/{instance}

delete_message

DELETE

/chat/deleteMessageForEveryone/{instance}

fetch_profile_picture

POST

/chat/fetchProfilePictureUrl/{instance}

download_media

POST

/chat/getBase64FromMediaMessage/{instance}

send_presence

POST

/chat/sendPresence/{instance}

check_number

POST

/chat/whatsappNumbers/{instance}

fetch_business_profile

POST

/chat/fetchBusinessProfile/{instance}

update_profile_name

POST

/chat/updateProfileName/{instance}

update_profile_status

POST

/chat/updateProfileStatus/{instance}

update_profile_picture

POST

/chat/updateProfilePicture/{instance}

remove_profile_picture

DELETE

/chat/removeProfilePicture/{instance}

fetch_privacy

GET

/chat/fetchPrivacySettings/{instance}

update_privacy

POST

/chat/updatePrivacySettings/{instance}

update_block_status

POST

/chat/updateBlockStatus/{instance}

list_groups

GET

/group/fetchAllGroups/{instance}

get_group_info

GET

/group/findGroupInfos/{instance}

create_group

POST

/group/create/{instance}

update_group_subject

POST

/group/updateGroupSubject/{instance}?groupJid=

update_group_description

POST

/group/updateGroupDescription/{instance}?groupJid=

update_group_picture

POST

/group/updateGroupPicture/{instance}?groupJid=

fetch_invite_code

GET

/group/inviteCode/{instance}?groupJid=

revoke_invite_code

POST

/group/revokeInviteCode/{instance}?groupJid=

accept_invite

GET

/group/acceptInviteCode/{instance}?inviteCode=

send_group_invite

POST

/group/sendInvite/{instance}

update_participants

POST

/group/updateParticipant/{instance}?groupJid=

update_group_setting

POST

/group/updateSetting/{instance}?groupJid=

leave_group

DELETE

/group/leaveGroup/{instance}?groupJid=

find_group_by_invite

GET

/group/inviteInfo/{instance}?inviteCode=

connection_state

GET

/instance/connectionState/{instance}

restart_instance

POST

/instance/restart/{instance}

logout_instance

DELETE

/instance/logout/{instance}

get_settings

GET

/settings/find/{instance}

set_settings

POST

/settings/set/{instance}

find_webhook

GET

/webhook/find/{instance}

set_webhook

POST

/webhook/set/{instance}

find_labels

GET

/label/findLabels/{instance}

handle_label

POST

/label/handleLabel/{instance}

需要 Evolution API v2。

许可证

MIT — 参见 LICENSE

免责声明

社区软件,与 Evolution API 或任何 WhatsApp 实体无关。

Install Server
A
license - permissive license
B
quality
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 Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server for sending and receiving WhatsApp messages through Evolution API, enabling management of instances, messages, and chats directly from Claude Code.
  • F
    license
    A
    quality
    D
    maintenance
    MCP server that wraps the Evolution API (WhatsApp) as semantic tools for LLM agents, enabling messaging, chat management, group operations, and instance control via natural language.
    32
  • A
    license
    C
    quality
    C
    maintenance
    Exposes the full WhatsApp API via Evolution API, enabling message sending, chat history, group management, and more through MCP tools.
    70
    MIT

View all related MCP servers

Related MCP Connectors

  • Official MCP server for OmniDimension. Drive voice agents, dispatch calls, and run bulk campaigns.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • MCP server for Vonage API documentation, code snippets, tutorials, and troubleshooting.

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/billyfranklim1/mcp-evolution'

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