MCP Hub
Back to servers

mcp-evolution

MCP server that integrates Evolution API to enable WhatsApp messaging, chat management, group operations, and instance control through natural language tools.

glama
Updated
Apr 25, 2026

mcp-evolution

npm version license CI

TypeScript MCP server for Evolution API (WhatsApp) with instance pinning.

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 McpServer class from the official TypeScript SDK, which handles capability negotiation and session lifecycle automatically.
  • Tools: 50 tools registered via registerTool() with Zod-validated input schemas — the SDK enforces types before the handler runs.

All three connection parameters (API URL, API key, instance name) are pinned at startup via environment variables. The AI caller cannot switch instances mid-conversation.

Tools

Message

ToolDescription
send_textSend a plain text message
send_mediaSend an image, video, audio, or document
send_audioSend a WhatsApp audio (PTT voice note)
send_stickerSend a sticker (webp)
send_locationSend a location pin
send_contactShare one or more contacts (vCards)
send_reactionReact to a message with an emoji
send_pollSend a poll message
send_listSend an interactive list/menu message
send_buttonSend an interactive button message
send_statusPost a WhatsApp Status (story) update

Chat

ToolDescription
find_chatsFind chats, optionally filtered with a Prisma-style where clause
find_contactsFind contacts, optionally filtered
find_messagesFind messages by remoteJid with optional limit
get_chat_historyGet message history for a contact or group JID
mark_as_readMark one or more messages as read
archive_chatArchive or unarchive a chat
delete_messageDelete a message for everyone
fetch_profile_pictureFetch a contact's profile picture URL
download_mediaDownload media from a message as base64
send_presenceSend a presence update (typing, recording, etc.)
check_numberCheck whether phone numbers have WhatsApp accounts

Profile

ToolDescription
fetch_business_profileFetch a contact's WhatsApp Business profile
update_profile_nameUpdate the instance's display name
update_profile_statusUpdate the instance's about/status text
update_profile_pictureUpdate the instance's profile picture
remove_profile_pictureRemove the instance's profile picture
fetch_privacyFetch current privacy settings
update_privacyUpdate privacy settings
update_block_statusBlock or unblock a contact

Group

ToolDescription
list_groupsList all WhatsApp groups for the pinned instance
get_group_infoGet detailed info for a specific group by JID
create_groupCreate a new WhatsApp group
update_group_subjectUpdate a group's name
update_group_descriptionUpdate a group's description
update_group_pictureUpdate a group's profile picture
fetch_invite_codeFetch the invite code/link for a group
revoke_invite_codeRevoke and regenerate a group's invite code
accept_inviteAccept a group invite by code
send_group_inviteSend a group invite link to specific contacts
update_participantsAdd, remove, promote, or demote group participants
update_group_settingUpdate group settings (announcement mode, locked)
leave_groupLeave a group
find_group_by_inviteGet group info from an invite code without joining

Instance

ToolDescription
connection_stateGet the current connection state of the instance
restart_instanceRestart the instance (reconnects without logging out)
logout_instanceLogout the instance (clears session)
get_settingsGet current instance settings
set_settingsUpdate instance settings

Webhook

ToolDescription
find_webhookGet the current webhook configuration
set_webhookConfigure the webhook

Label

ToolDescription
find_labelsList all labels (requires WhatsApp Business)
handle_labelAdd 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-evolution

Configuration

VariableRequiredDescription
EVOLUTION_API_URLYesBase URL of your Evolution API (e.g. http://localhost:8080)
EVOLUTION_API_KEYYesGlobal API key from Evolution API config
EVOLUTION_INSTANCEYesInstance name created in Evolution API

Copy .env.example to .env for local development.

Use with Claude Desktop / Claude Code

Add to ~/.claude/claude_desktop_config.json or project .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"
      }
    }
  }
}

Or point directly at the built binary if running from a local checkout:

{
  "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"
      }
    }
  }
}

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 start

Evolution API endpoints wrapped

ToolMethodPath
send_textPOST/message/sendText/{instance}
send_mediaPOST/message/sendMedia/{instance}
send_audioPOST/message/sendWhatsAppAudio/{instance}
send_stickerPOST/message/sendSticker/{instance}
send_locationPOST/message/sendLocation/{instance}
send_contactPOST/message/sendContact/{instance}
send_reactionPOST/message/sendReaction/{instance}
send_pollPOST/message/sendPoll/{instance}
send_listPOST/message/sendList/{instance}
send_buttonPOST/message/sendButtons/{instance}
send_statusPOST/message/sendStatus/{instance}
find_chatsPOST/chat/findChats/{instance}
find_contactsPOST/chat/findContacts/{instance}
find_messages / get_chat_historyPOST/chat/findMessages/{instance}
mark_as_readPOST/chat/markMessageAsRead/{instance}
archive_chatPOST/chat/archiveChat/{instance}
delete_messageDELETE/chat/deleteMessageForEveryone/{instance}
fetch_profile_picturePOST/chat/fetchProfilePictureUrl/{instance}
download_mediaPOST/chat/getBase64FromMediaMessage/{instance}
send_presencePOST/chat/sendPresence/{instance}
check_numberPOST/chat/whatsappNumbers/{instance}
fetch_business_profilePOST/chat/fetchBusinessProfile/{instance}
update_profile_namePOST/chat/updateProfileName/{instance}
update_profile_statusPOST/chat/updateProfileStatus/{instance}
update_profile_picturePOST/chat/updateProfilePicture/{instance}
remove_profile_pictureDELETE/chat/removeProfilePicture/{instance}
fetch_privacyGET/chat/fetchPrivacySettings/{instance}
update_privacyPOST/chat/updatePrivacySettings/{instance}
update_block_statusPOST/chat/updateBlockStatus/{instance}
list_groupsGET/group/fetchAllGroups/{instance}
get_group_infoGET/group/findGroupInfos/{instance}
create_groupPOST/group/create/{instance}
update_group_subjectPOST/group/updateGroupSubject/{instance}?groupJid=
update_group_descriptionPOST/group/updateGroupDescription/{instance}?groupJid=
update_group_picturePOST/group/updateGroupPicture/{instance}?groupJid=
fetch_invite_codeGET/group/inviteCode/{instance}?groupJid=
revoke_invite_codePOST/group/revokeInviteCode/{instance}?groupJid=
accept_inviteGET/group/acceptInviteCode/{instance}?inviteCode=
send_group_invitePOST/group/sendInvite/{instance}
update_participantsPOST/group/updateParticipant/{instance}?groupJid=
update_group_settingPOST/group/updateSetting/{instance}?groupJid=
leave_groupDELETE/group/leaveGroup/{instance}?groupJid=
find_group_by_inviteGET/group/inviteInfo/{instance}?inviteCode=
connection_stateGET/instance/connectionState/{instance}
restart_instancePOST/instance/restart/{instance}
logout_instanceDELETE/instance/logout/{instance}
get_settingsGET/settings/find/{instance}
set_settingsPOST/settings/set/{instance}
find_webhookGET/webhook/find/{instance}
set_webhookPOST/webhook/set/{instance}
find_labelsGET/label/findLabels/{instance}
handle_labelPOST/label/handleLabel/{instance}

Requires Evolution API v2.

License

MIT — see LICENSE.

Disclaimer

Community software, not affiliated with Evolution API or any WhatsApp entity.

Reviews

No reviews yet

Sign in to write a review