Integrate MAX Messenger with MCP
MCP server that connects Claude and other MCP clients to MAX Messenger, Russia's national messenger, with 21 tools covering the full Bot API.
1.2.2Add to Favorites
Why it matters
Connect your MAX Messenger (VK) to the MCP server, enabling advanced messaging features and member management directly within your existing communication channels.
Outcomes
What it gets done
Send and read messages with HTML formatting.
Utilize buttons and media within messages.
Manage members and handle incoming events.
Securely manage API keys and credentials.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/mcp-max-messenger | bash Capabilities
Tools your agent gets
Send a message via MAX messenger (VK)
Read messages from MAX messenger (VK)
Apply HTML formatting to messages
Add interactive buttons to messages
Send media files via MAX messenger
Manage group members in MAX messenger
Handle and process incoming events from MAX messenger
Overview
MCP MAX Messenger
Connects Claude Desktop, Cursor, n8n, or any MCP-compatible client to MAX Messenger, Russia's national messenger, through 21 tools covering messages, media, chats, members, and inline-button events. Use it to have an AI agent send or read MAX Messenger messages, manage group chats and admins, send media, or respond to button presses on behalf of a bot. Requires a MAX bot token created at max.ru.
What it does
MCP MAX Messenger is the first MCP server for MAX Messenger, VK's national messenger in Russia with more than 75 million registered users. It exposes 21 tools covering the full MAX Bot API to any MCP-compatible client - Claude Desktop, Cursor, n8n, or others - so an AI agent can send and read messages, manage chats and their members, send media, respond to inline button presses, and format messages in HTML or Markdown, all through natural-language requests translated into MCP tool calls.
When to use - and when NOT to
Use it whenever a task involves operating a MAX Messenger bot: sending notifications or approval requests to a chat, reading recent messages, managing group membership and admin rights, sending photos/video/audio/files, or reacting to inline button presses and new-message events via get_updates. It requires an actual MAX bot token created at max.ru, so it is not usable for personal MAX accounts without a bot in front of them. Two known MAX-side API bugs are worth flagging before relying on this tool for those flows: remove_admin can report success without actually revoking rights, and the open_app button type currently errors with "Field 'webApp' cannot be null."
Inputs and outputs
Setup is a single MCP server entry: for Claude Desktop or Cursor, add an entry running npx -y @woyax/mcp-max-messenger with a MAX_TOKEN environment variable in the client's MCP config, restart the client, and the 21 tools appear automatically. For a remote/hosted deployment, the same package can run over HTTP instead of stdio (MCP_TRANSPORT=http MCP_PORT=3000), exposing an endpoint at /mcp that any MCP client can connect to. The tools are grouped by area - messages (get_messages, send_message, edit_message, delete_message, pin_message/unpin_message), media (send_media, send_action), chats (get_bot_info, get_chats, get_chat, edit_chat), members (get_chat_members, get_admins, set_admin/remove_admin, add_members/remove_member), and events (get_updates, answer_callback) - plus five inline button types (callback, link, message, request_contact, request_geo_location) sendable as message attachments.
Integrations
Under the hood it talks to MAX's Bot API at https://platform-api.max.ru, authenticating with a plain Authorization: <token> header (no Bearer prefix) and respecting a 30 requests/second rate limit. Its architecture splits business logic from transport, so the same tool implementations work identically whether the server runs in local stdio mode (Claude Desktop, Cursor) or in remote Streamable HTTP mode for hosted/n8n use cases.
Who it's for
Teams and developers building bots or AI-driven automation on MAX Messenger - Russia's mandated pre-installed national messenger - who want an AI client to send messages, manage chats, and react to events through natural language instead of writing direct MAX Bot API calls.
Source README
mcp-max-messenger
The first MCP server for MAX Messenger - Russia's national messenger by VK (75M+ users).
Connect AI clients (Claude Desktop, Cursor, n8n, and any MCP-compatible app) to MAX: send and read messages, manage chats and members, send media, handle button presses, format with HTML/Markdown - all through the open Model Context Protocol standard.
21 tools with full coverage of MAX Bot API.
Why MAX?
- ๐ท๐บ National messenger mandated for pre-installation on all smartphones in Russia (September 2025)
- ๐ฑ 75M+ registered users
- ๐ข Recommended by the Ministry of Digital Development for government agencies and large enterprises
- ๐ค Full Bot API with official SDKs: TypeScript, Python, Go, Java, PHP
Quick Start
Prerequisites
- Node.js 18+
- A MAX bot token (create a bot at max.ru)
Claude Desktop / Cursor (stdio mode)
Add to your Claude Desktop config:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"max-messenger": {
"command": "npx",
"args": ["-y", "@woyax/mcp-max-messenger"],
"env": {
"MAX_TOKEN": "YOUR_BOT_TOKEN"
}
}
}
}
Restart Claude Desktop. The MAX tools will appear automatically.
Remote / Hosted mode (HTTP)
MAX_TOKEN=YOUR_BOT_TOKEN MCP_TRANSPORT=http MCP_PORT=3000 npx @woyax/mcp-max-messenger
Connect any MCP client to http://your-server:3000/mcp.
Available Tools (21)
Messages
| Tool | Description |
|---|---|
get_messages |
Read messages from a chat (by chat_id or message_ids) |
send_message |
Send a message with text, HTML/Markdown, inline keyboard, media attachments |
edit_message |
Edit message text and attachments |
delete_message |
Delete a message |
pin_message |
Pin a message in a chat |
unpin_message |
Unpin the currently pinned message |
Media
| Tool | Description |
|---|---|
send_media |
Upload and send photo, video, audio, or file by URL |
send_action |
Show typing indicator, "sending photo/video/audio/file", mark as read |
Chats
| Tool | Description |
|---|---|
get_bot_info |
Bot info: name, ID, username, description |
get_chats |
List all group chats the bot participates in |
get_chat |
Full chat details: participants, pinned message, owner |
edit_chat |
Rename chat, change description or icon |
Members
| Tool | Description |
|---|---|
get_chat_members |
List chat members with roles |
get_admins |
List chat administrators with permissions |
set_admin |
Grant admin rights to a member |
remove_admin |
Revoke admin rights |
add_members |
Add users to a group chat |
remove_member |
Remove a user from a group chat |
Events
| Tool | Description |
|---|---|
get_updates |
Incoming events: messages, button presses, new dialogs (long polling) |
answer_callback |
Respond to inline button press: show notification or update message |
Buttons (via send_message attachments)
5 button types supported: callback, link, message, request_contact, request_geo_location.
Usage Examples
Once connected to Claude Desktop, use natural language:
"Send a message to chat 123456789: 'The meeting starts in 10 minutes'"
"Send an approval request with Approve/Reject buttons to the team chat"
"Show me the last 10 messages from the announcements chat"
"Send this photo to the chat: https://example.com/image.jpg"
"Who are the members of the sales group? Make Alex an admin."
"Check for new incoming messages and button presses"
Configuration
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
MAX_TOKEN |
โ | - | Your MAX bot token |
MCP_TRANSPORT |
โ | stdio |
Transport: stdio or http |
MCP_PORT |
โ | 3000 |
Port for HTTP mode |
Command-line Flags
# Local stdio mode (default)
npx @woyax/mcp-max-messenger
# Remote HTTP mode
npx @woyax/mcp-max-messenger --transport http --port 3000
Architecture
Two independent layers - tools work identically in both modes:
src/
โโโ core/ # Business logic - shared between modes
โ โโโ max-client.ts # MAX API HTTP client
โ โโโ types.ts # TypeScript types for MAX API
โ โโโ tools/
โ โโโ bot.ts # get_bot_info
โ โโโ chats.ts # get_chats, get_chat, edit_chat, send_action
โ โโโ messages.ts # send/get/edit/delete/pin/unpin, send_media
โ โโโ members.ts # get_chat_members, get_admins, set/remove_admin, add/remove_members
โ โโโ updates.ts # get_updates, answer_callback
โโโ transports/ # Transport layer - selected at runtime
โ โโโ stdio.ts # Local mode (Claude Desktop, Cursor)
โ โโโ http.ts # Remote mode (Streamable HTTP)
โโโ index.ts # Entry point: transport selection
MAX API Notes
- Authorization: Token passed as
Authorization: <token>- noBearerprefix - Base URL:
https://platform-api.max.ru - Rate limit: 30 requests/second
- Group chats:
GET /chatsreturns group chats only - Personal dialogs: Accessible via
get_updates- use the returnedchat_idwith all standard tools - Media upload: Two-step process (upload โ send). Audio/video tokens come from the upload step, not the file transfer
- HTTP transport: Uses Streamable HTTP (SSE deprecated since MCP SDK 1.10.0)
Known MAX API Issues
remove_adminmay returnsuccess: truewithout actually revoking rights - confirmed bug on MAX sideopen_appbutton type returns "Field 'webApp' cannot be null" - MAX API bugadd_membersmay fail withadd.participant.privacyif the user has privacy mode enabled
Roadmap
- HTTP mode testing on VPS with n8n integration
- Hosted MCP service (connect by URL, no local install)
- Webhook support for real-time event handling
-
answer_callbacktesting via n8n webhook workflow
Links
Author & Support
Built by Oleg Alekseev - ERP/AI integration architect.
- ๐ง woyaxnini@gmail.com ยท woyax@yandex.com
- ๐ฌ Telegram: @ale_oleg ยท Channel: @woyax_ai
- ๐ฌ MAX: max.ru/id503610654564_biz
Need help integrating AI agents with your ERP, CRM, or MAX? Custom MCP servers, n8n workflows, AI automation - contact me.
FAQ
Common questions
Trust
How it checks out
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.