mcp-evolution
One-liner: An MCP server exposing guarded tools to drive a pinned Evolution API (WhatsApp) instance — send messages and media, read chats/contacts/groups, and manage profile, group, instance and webhook state.
Read chats & messages —
find_chats,find_contacts(search/where/limit/offset),find_messagesandget_chat_historyby JID, plusdownload_media(writes to disk) andfetch_profile_picture.Send messages —
send_text,send_media(image/video/audio/document),send_audio(PTT),send_sticker,send_location,send_contact(vCards),send_reaction,send_poll,send_listandsend_buttoninteractive messages.Chat management —
mark_as_read,archive_chat/unarchive,send_presence(typing/recording),check_number,find_labelsandhandle_label(add/remove labels).Profile —
fetch_business_profile,fetch_privacy, and updates: profile name, status, picture (set/remove), privacy settings, block/unblock contacts.Groups —
list_groups,get_group_info,get_group_resolved_participants(LID → phone via Postgres),create_group, edit subject/description/picture/settings/participants,leave_group, invite code fetch/revoke/accept,send_group_invite,find_group_by_invite.Instance & webhooks —
connection_state,get_settings/set_settings,restart_instance,logout_instance,find_webhook/set_webhook.Message management —
delete_message(for everyone),send_status(story broadcast), plusaccept_inviteandleave_group.Safety guards (server-side, not in the schema) — instance is pinned; tool allowlist, recipient allowlist, plus dangerous tools (
send_status,delete_message, group/instance/profile mutations,set_webhook) disabled unless explicitly enabled; secrets redacted from all results.
Provides tools for interacting with WhatsApp through the Evolution API, enabling sending and receiving messages, managing chats, groups, contacts, profile, and webhooks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-evolution Send a WhatsApp text to John saying Hello!"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-evolution
TypeScript MCP server for Evolution API (WhatsApp) with an instance allowlist and server-side guards (tool allowlist, recipient allowlist, secret redaction).
Architecture
This server implements the Model Context Protocol:
Transport: stdio — the MCP host (Claude Desktop, Claude Code, etc.) spawns this process and speaks JSON-RPC over stdin/stdout.
Server: uses the high-level
McpServerclass from the official TypeScript SDK, which handles capability negotiation and session lifecycle automatically.Tools: 55 tools registered via
registerTool()with Zod-validated input schemas — the SDK enforces types before the handler runs.Guards: every tool goes through a registry that enforces the tool allowlist, the instance allowlist and the recipient allowlist, and redacts secrets from everything returned to the client.
The API URL, API key and the set of allowed instances are fixed at startup via environment variables. The AI caller can only pick an instance from that list — it can never address an instance outside it.
Related MCP server: mcp-evolution-api
Tools
Tools marked (D) are dangerous and disabled unless explicitly enabled.
Instances
Tool | Description |
| List the allowed instances (names only), the default one and, optionally, each connection state |
Message
Tool | Description |
| Send a plain text message |
| Send an image, video, audio, or document |
| Send a WhatsApp audio (PTT voice note) |
| Send a sticker (webp) |
| Send a location pin |
| Share one or more contacts (vCards) |
| React to a message with an emoji |
| Send a poll message |
| Send an interactive list/menu message |
| Send an interactive button message |
| Post a WhatsApp Status (story) update |
Chat
Tool | Description |
| Find chats, optionally filtered with a Prisma-style |
| Find contacts, optionally filtered |
| Find messages by remoteJid with optional limit |
| Get message history for a contact or group JID |
| Mark one or more messages as read |
| Archive or unarchive a chat |
| Delete a message for everyone |
| Fetch a contact's profile picture URL |
| Download media from a message to a local file |
| Send a presence update (typing, recording, etc.) |
| Check whether phone numbers have WhatsApp accounts |
Profile
Tool | Description |
| Fetch a contact's WhatsApp Business profile |
| Update the instance's display name |
| Update the instance's about/status text |
| Update the instance's profile picture |
| Remove the instance's profile picture |
| Fetch current privacy settings |
| Update privacy settings |
| Block or unblock a contact |
Group
Tool | Description |
| List all WhatsApp groups for the selected instance |
| Get detailed info for a specific group by JID |
| Create a new WhatsApp group |
| Update a group's name |
| Update a group's description |
| Update a group's profile picture |
| Fetch the invite code/link for a group |
| Revoke and regenerate a group's invite code |
| Accept a group invite by code |
| Send a group invite link to specific contacts |
| Add, remove, promote, or demote group participants |
| Update group settings (announcement mode, locked) |
| Leave a group |
| Get group info from an invite code without joining |
Instance
Tool | Description |
| Get the current connection state of the instance |
| Restart the instance (reconnects without logging out) |
| Logout the instance (clears session) |
| Get current instance settings |
| Update instance settings |
Webhook
Tool | Description |
| Get the current webhook configuration |
| Configure the webhook |
Label
Tool | Description |
| List all labels (requires WhatsApp Business) |
| Add or remove a label from a chat |
Install & run via npx
EVOLUTION_API_URL=http://localhost:8080 \
EVOLUTION_API_KEY=your-key \
EVOLUTION_INSTANCE=your-instance \
npx mcp-evolutionConfiguration
Variable | Required | Description |
| Yes | Base URL of your Evolution API (e.g. |
| Yes | Global API key from Evolution API config |
| One of these two | Single instance name (legacy / simplest mode) |
| One of these two | Comma-separated list of allowed instances, e.g. |
| No | Instance used when a call omits |
| No | Comma-separated tool names and/or groups. Unset = every non-dangerous tool |
| No | Comma-separated recipient allowlist (numbers, JIDs, LIDs, group JIDs). Unset = unrestricted |
| No | Per-instance recipient allowlist; overrides the global one for that instance |
| No | Base64 |
| No | Evolution Postgres URL, only for |
Invalid configuration (unknown tool names, default instance outside the list, both EVOLUTION_INSTANCE and EVOLUTION_INSTANCES set, malformed recipients…) aborts at startup with a message that never includes secret values.
Instances
One instance (
EVOLUTION_INSTANCE=foo, orEVOLUTION_INSTANCES=foo): works exactly like before — noinstanceparameter is added and every call goes tofoo.Several instances (
EVOLUTION_INSTANCES=foo,bar): every instance-bound tool gets an optionalinstanceparameter, validated against the list (a zodenum). Omitted →EVOLUTION_DEFAULT_INSTANCE; if no default is set the call fails asking forinstance. Any value outside the list is rejected before any HTTP request is made.list_instancesreturns the configured names and which one is the default;includeState: truealso queries each connection state.
Tool allowlist — EVOLUTION_ALLOWED_TOOLS
When set, only the listed tools are registered; everything else does not even show up in tools/list. Entries are tool names or groups:
Group | Tools |
|
|
|
|
| every tool except the dangerous ones (what you get when the variable is unset) |
| every dangerous tool (see below) |
Examples: @read,@send · @read,send_text · @default,send_status.
Dangerous tools (disabled by default)
These tools change account/group state irreversibly, broadcast, or can redirect traffic. They are not registered unless named explicitly in EVOLUTION_ALLOWED_TOOLS (or via @dangerous):
Tool | Why |
| Broadcasts to all contacts; known to disconnect every linked device (evolution-api#2196) |
| Deletes messages for everyone |
| Changes account privacy |
| Change the public profile |
| Blocks/unblocks contacts |
| Change group state/membership |
| Disrupt or destroy the WhatsApp session |
| Changes instance behaviour (auto-read, reject calls, always online…) |
| Can redirect every incoming event to an arbitrary URL |
To re-enable, list them: EVOLUTION_ALLOWED_TOOLS=@default,send_status,delete_message (or @default,@dangerous for the pre-0.6 behaviour).
Recipient allowlist — EVOLUTION_ALLOWED_RECIPIENTS
When set, any tool argument that identifies a chat — number, numbers[], remoteJid, jid, groupJid, chat, participants[], statusJidList[], including nested ones such as readMessages[].remoteJid or key.remoteJid — must match the list, otherwise the call is rejected before reaching Evolution (the error names the rejected value, never the list). In addition:
find_chats,find_contactsandlist_groupsonly return entries in the list;find_group_by_inviterefuses groups outside it.send_statusrequires an explicitstatusJidList;accept_inviteis refused.
Matching normalises both sides to digits of the part before @ (dropping a :device suffix). Accepted forms: 5511999999999, +55 (11) 99999-9999, 5511999999999@s.whatsapp.net, …@c.us, 123456789012345@lid, 120363…@g.us. A LID is a different identifier from the phone number — if a contact reaches you as @lid, list that LID too. Write Brazilian mobiles in full (55 DD 9XXXXXXXX); legacy JIDs without the extra 9 then match as well.
All groups: add *@g.us to admit every group (any …@g.us JID, for reading and sending) while direct chats stay limited to the numbers you list, e.g. 5511999999999,*@g.us. Groups must then be addressed by their full @g.us JID.
Per instance: EVOLUTION_ALLOWED_RECIPIENTS__<INSTANCE> replaces the global list for that instance. <INSTANCE> is the instance name upper-cased with every character outside A-Z0-9 replaced by _ (e.g. billy-franklim.2 → EVOLUTION_ALLOWED_RECIPIENTS__BILLY_FRANKLIM_2). Use * as the value to leave one instance unrestricted while a global list applies to the others.
Secret redaction
The API key, EVOLUTION_BASIC_AUTH (both the base64 value and the decoded user:password/password) and passwords embedded in EVOLUTION_API_URL/EVOLUTION_DB_URL are replaced by [REDACTED] in every tool result and error returned to the MCP client, including Evolution error bodies that echo request headers.
Use with Claude Code / Claude Desktop
Keep secrets out of the MCP JSON by putting them in an env file and loading it with Node's --env-file (Node ≥ 20.6):
# /path/to/credentials.env (chmod 600)
EVOLUTION_API_URL=https://evolution.example.com
EVOLUTION_API_KEY=...
EVOLUTION_BASIC_AUTH=...Single instance, read + basic send, one test recipient (.mcp.json or claude mcp add-json):
{
"mcpServers": {
"whatsapp": {
"command": "node",
"args": [
"--env-file=/path/to/credentials.env",
"/absolute/path/to/mcp-evolution/dist/index.js"
],
"env": {
"EVOLUTION_INSTANCE": "my-instance",
"EVOLUTION_ALLOWED_TOOLS": "@read,@send",
"EVOLUTION_ALLOWED_RECIPIENTS": "5511999999999"
}
}
}
}Several instances with a default and per-instance recipients:
{
"mcpServers": {
"whatsapp": {
"command": "node",
"args": ["--env-file=/path/to/credentials.env", "/absolute/path/to/mcp-evolution/dist/index.js"],
"env": {
"EVOLUTION_INSTANCES": "personal,support",
"EVOLUTION_DEFAULT_INSTANCE": "personal",
"EVOLUTION_ALLOWED_TOOLS": "@read,@send",
"EVOLUTION_ALLOWED_RECIPIENTS__PERSONAL": "5511999999999,123456789012345@lid",
"EVOLUTION_ALLOWED_RECIPIENTS__SUPPORT": "*"
}
}
}
}If a variable is defined both in env and in the file, Node keeps the value from env (the process environment wins). Keep secrets in the file and the guards in the JSON, where they are easy to review. With npx ("command": "npx", "args": ["mcp-evolution"]) there is no --env-file, so every variable has to go in env.
Run as a remote server (Streamable HTTP)
Set MCP_TRANSPORT=http to serve MCP over HTTP instead of stdio, so clients connect by URL and nothing runs on their machine. The server is stateless: each request gets a fresh MCP server with the same guards.
Variable | Default | Notes |
|
|
|
| — | Required in HTTP mode, at least 32 characters. Clients send |
|
| |
|
| Use |
|
|
GET /health answers without auth for uptime checks. Put the server behind HTTPS (nginx, Caddy) and keep the guards (EVOLUTION_ALLOWED_TOOLS, EVOLUTION_ALLOWED_RECIPIENTS) in its environment: the token only proves who is calling, the guards still decide what they can do.
Register it in Claude Code:
claude mcp add --transport http evolution https://your-host/mcp --header "Authorization: Bearer $MCP_AUTH_TOKEN"Development
# 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 startEvolution API endpoints wrapped
Tool | Method | Path |
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| DELETE |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| DELETE |
|
| GET |
|
| POST |
|
| POST |
|
| GET |
|
| GET |
|
| POST |
|
| POST |
|
| POST |
|
| POST |
|
| GET |
|
| POST |
|
| GET |
|
| POST |
|
| POST |
|
| POST |
|
| DELETE |
|
| GET |
|
| GET |
|
| POST |
|
| DELETE |
|
| GET |
|
| POST |
|
| GET |
|
| POST |
|
| GET |
|
| POST |
|
Requires Evolution API v2.
License
MIT — see LICENSE.
Disclaimer
Community software, not affiliated with Evolution API or any WhatsApp entity.
Available Tools
54 toolsaccept_inviteAccept InviteB
Accept a WhatsApp group invite by invite code via the pinned instance.
Inputs: inviteCode (required).
archive_chatArchive ChatB
Archive or unarchive a WhatsApp chat via the pinned instance.
Inputs: lastMessage (required), chat (required), archive (required).
check_numberCheck NumberA
Check whether phone numbers have WhatsApp accounts. Returns exists, jid, and number for each.
Inputs: numbers (required).
connection_stateConnection StateA
Get the current connection state of the pinned WhatsApp instance (open, close, connecting).
Inputs: no named parameters.
create_groupCreate GroupB
Create a new WhatsApp group via the pinned instance.
Inputs: subject (required), participants (required), description.
delete_messageDelete MessageA
Delete a message for everyone via the pinned WhatsApp instance.
Inputs: id (required), remoteJid (required), fromMe (required), participant.
download_mediaDownload MediaA
Download media from a WhatsApp message and write it to disk. Returns { path, mimetype, size, messageId } — NOT raw base64 (prevents context overflow). File is written to /tmp/mcp-evolution-media/-.. Caller is responsible for cleanup (rm the file when done).
Inputs: message (required), convertToMp4.
fetch_business_profileFetch Business ProfileA
Fetch the WhatsApp Business profile information of a contact via the pinned instance.
Inputs: number (required).
fetch_invite_codeFetch Invite CodeB
Fetch the invite code/link for a WhatsApp group via the pinned instance.
Inputs: groupJid (required).
fetch_privacyFetch Privacy SettingsA
Fetch the current privacy settings of the pinned WhatsApp instance.
Inputs: no named parameters.
fetch_profile_pictureFetch Profile PictureA
Fetch the profile picture URL of a WhatsApp contact via the pinned instance.
Inputs: number (required).
find_chatsFind ChatsB
Find chats for the pinned instance. Supports search, limit, and offset to prevent large payloads.
Inputs: where, search, limit, offset.
find_contactsFind ContactsA
Find contacts for the pinned instance. Supports search (substring on pushName/name/remoteJid), limit, and offset to prevent large payloads. Returns normalized { remoteJid, pushName, profilePicUrl, isBusiness } — extra fields dropped.
Inputs: where, search, limit, offset.
find_group_by_inviteFind Group by InviteA
Get group information from an invite code without joining via the pinned instance. Returns { id, subject, subjectOwner, subjectTime, size, desc, descId, creation, owner, admins } by default. Set includeParticipants=true to also get the full participant list.
Inputs: inviteCode (required), includeParticipants.
find_labelsFind LabelsA
List all WhatsApp labels for the pinned instance (requires WhatsApp Business). Returns normalized { id, name, color } array — nested chat blobs dropped to prevent overflow.
Inputs: no named parameters.
find_messagesFind MessagesA
Find messages by remoteJid (phone number or group JID) for the pinned instance. Returns normalized { id, fromMe, remoteJid, timestamp, type, text, mediaKey?, quotedMessageId? } — raw payload dropped to prevent overflow.
Inputs: remoteJid (required), limit, offset.
find_webhookFind WebhookA
Get the current webhook configuration for the pinned WhatsApp instance.
Inputs: no named parameters.
get_chat_historyGet Chat HistoryA
Get chat history for a specific contact or group JID. Returns normalized { id, fromMe, remoteJid, timestamp, type, text, mediaKey?, quotedMessageId? } — raw payload dropped to prevent overflow.
Inputs: remoteJid (required), limit, offset.
get_group_infoGet Group InfoA
Get detailed info for a specific WhatsApp group. By default returns { id, subject, subjectOwner, subjectTime, size, desc, descId, creation, owner, admins } — participant list is dropped to prevent payload overflow. Set includeParticipants=true to get the full list (use sparingly for large groups).
Inputs: groupJid (required), includeParticipants.
get_group_resolved_participantsGet Group Resolved Participants (LID → phone + name)A
Resolve a group's LID participants to phone JID + pushName by cross-referencing the Evolution Postgres Message history (key->>'participantAlt' field). Returns: { groupJid, total, resolved, unresolved, participants: [{ lid, phone, name, isAdmin, lastSeen }] }. Coverage depends on how many participants sent messages in the lookback window — silent members stay unresolved. Phone field is ready to use with send_text. Requires EVOLUTION_DB_URL env var pointing to Evolution's Postgres.
Inputs: groupJid (required), sinceDays, onlyResolved.
get_settingsGet SettingsA
Get the current settings of the pinned WhatsApp instance.
Inputs: no named parameters.
handle_labelHandle LabelA
Add or remove a WhatsApp label from a chat via the pinned instance (requires WhatsApp Business).
Inputs: number (required), labelId (required), action (required).
leave_groupLeave GroupB
Leave a WhatsApp group via the pinned instance.
Inputs: groupJid (required).
list_groupsList GroupsA
List WhatsApp groups for the pinned instance. Supports search and limit to prevent large payloads.
Inputs: search, limit.
logout_instanceLogout InstanceA
Logout the pinned WhatsApp instance (disconnects and clears session — requires QR scan to reconnect).
Inputs: no named parameters.
mark_as_readMark as ReadA
Mark one or more messages as read via the pinned WhatsApp instance.
Inputs: readMessages (required).
remove_profile_pictureRemove Profile PictureB
Remove the profile picture of the pinned WhatsApp instance.
Inputs: no named parameters.
restart_instanceRestart InstanceA
Restart the pinned WhatsApp instance (reconnects without logging out).
Inputs: no named parameters.
revoke_invite_codeRevoke Invite CodeA
Revoke and regenerate the invite code for a WhatsApp group via the pinned instance.
Inputs: groupJid (required).
send_audioSend AudioB
Send a WhatsApp audio (PTT voice note) via the pinned instance.
Inputs: number (required), audio (required), encoding, delay.
send_buttonSend ButtonB
Send a WhatsApp interactive button message via the pinned instance (max 3 buttons).
Inputs: number (required), title (required), description (required), buttons (required), +1 more.
send_contactSend ContactA
Share one or more contacts (vCards) via the pinned WhatsApp instance.
Inputs: number (required), contact (required).
send_group_inviteSend Group InviteB
Send a WhatsApp group invite link to specific contacts via the pinned instance.
Inputs: groupJid (required), description (required), numbers (required).
send_listSend ListB
Send a WhatsApp list message (interactive menu) via the pinned instance.
Inputs: number (required), title (required), description (required), buttonText (required), +2 more.
send_locationSend LocationA
Send a location pin message via the pinned WhatsApp instance.
Inputs: number (required), latitude (required), longitude (required), name, +1 more.
send_mediaSend MediaB
Send a media message (image, video, audio, document) via the pinned instance.
Inputs: number (required), mediatype (required), media (required), fileName, +1 more.
send_pollSend PollC
Send a WhatsApp poll message via the pinned instance.
Inputs: number (required), name (required), selectableCount (required), values (required).
send_presenceSend PresenceC
Send a presence update (typing, recording, etc.) to a chat via the pinned instance.
Inputs: number (required), presence (required), delay.
send_reactionSend ReactionB
React to a WhatsApp message with an emoji via the pinned instance. Send empty string to remove reaction.
Inputs: key (required), reaction (required).
send_statusSend StatusB
Post a WhatsApp Status update (story) via the pinned instance.
Inputs: type (required), content (required), caption, backgroundColor, +2 more.
send_stickerSend StickerB
Send a sticker message via the pinned WhatsApp instance.
Inputs: number (required), sticker (required).
send_textSend TextA
Send a text message via the pinned WhatsApp instance.
Inputs: number (required), text (required).
set_settingsSet SettingsB
Update settings for the pinned WhatsApp instance.
Inputs: rejectCall, msgCall, groupsIgnore, alwaysOnline, +3 more.
set_webhookSet WebhookC
Configure the webhook for the pinned WhatsApp instance.
Inputs: enabled (required), url (required), events (required), byEvents, +2 more.
update_block_statusUpdate Block StatusB
Block or unblock a WhatsApp contact via the pinned instance.
Inputs: number (required), status (required).
update_group_descriptionUpdate Group DescriptionB
Update the description of a WhatsApp group via the pinned instance.
Inputs: groupJid (required), description (required).
update_group_pictureUpdate Group PictureB
Update the profile picture of a WhatsApp group via the pinned instance.
Inputs: groupJid (required), image (required).
update_group_settingUpdate Group SettingB
Update group settings (announcement mode, locked) via the pinned instance.
Inputs: groupJid (required), action (required).
update_group_subjectUpdate Group SubjectA
Update the name/subject of a WhatsApp group via the pinned instance.
Inputs: groupJid (required), subject (required).
update_participantsUpdate ParticipantsB
Add, remove, promote, or demote participants in a WhatsApp group via the pinned instance.
Inputs: groupJid (required), action (required), participants (required).
update_privacyUpdate Privacy SettingsB
Update privacy settings for the pinned WhatsApp instance. Values: all, contacts, contact_blacklist, none.
Inputs: readreceipts, profile, status, online, +3 more.
update_profile_nameUpdate Profile NameA
Update the display name of the pinned WhatsApp instance's profile.
Inputs: name (required).
update_profile_pictureUpdate Profile PictureB
Update the profile picture of the pinned WhatsApp instance.
Inputs: picture (required).
update_profile_statusUpdate Profile StatusB
Update the 'about' status text of the pinned WhatsApp instance's profile.
Inputs: status (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 54 tools
Each tool has a clear, distinct purpose. Even similar actions (e.g., send_media vs send_audio) are precisely differentiated by description. No two tools overlap in function.
All tools follow a consistent verb_noun pattern (e.g., send_text, update_group_subject, fetch_privacy). No mixing of camelCase or other conventions, making the set predictable.
54 tools is well above the 25+ threshold, making the server feel heavy and potentially overwhelming for agents. While the domain is broad, the count could be reduced by combining or omitting rarely used tools.
The tool set comprehensively covers WhatsApp messaging, groups, instance management, and profile operations. Minor gaps exist (e.g., no forward message or fetch status updates) but do not critically impair core workflows.
Maintenance
Related MCP Connectors
Your own WhatsApp as an MCP server: read, search and send from any MCP client.
Free WhatsApp MCP server for ChatGPT and Claude: read and search chats, every send you approve.
MCP server for AI agents: posts, messages and comments on WhatsApp, Instagram, TikTok and Facebook.
WhatsApp (Web + Business API), SMS, contacts, and call records via 2Chat's MCP server.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server for sending and receiving WhatsApp messages through Evolution API, enabling management of instances, messages, and chats directly from Claude Code.-
- AlicenseAqualityDmaintenanceMCP 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.32MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for managing WhatsApp instances and sending messages through Evolution API.1-
- AlicenseCqualityDmaintenanceExposes the full WhatsApp API via Evolution API, enabling message sending, chat history, group management, and more through MCP tools.70MIT