mcp-max-messenger
An MCP server for MAX Messenger (Russia's national messenger by VK) that enables AI clients to send and read messages, manage chats and members, send media, and more through 21 tools.
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.
License
MIT + Commons Clause © Oleg Alekseev
Free to use for personal and corporate purposes. Selling as a hosted service requires author's permission. See LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。