max-channel-mcp
max-channel-mcp
用于在 MAX 信使频道中发布的 MCP 服务器。
可连接到 Claude Desktop、Claude Code 以及其他支持 Model Context Protocol 的客户端。配置完成后,助手可以按您的请求在您的频道中发布文本、照片、视频、音频、文档和地理位置标记。
Вы: Опубликуй в канале анонс с картинкой из ~/Downloads/banner.png
и кнопкой на сайт.
ИИ: [вызывает max_send_photos]
Опубликовано. Ссылка: https://max.ru/ваш_канал/AaApSIDNYGM功能
支持 Markdown 或 HTML 标记的文本发布
最多 10 张照片、视频、混合相册
音频、文档、地理位置标记
消息下方的按钮——链接和回调
修改和置顶已发布的消息
读取频道历史记录
故意未实现消息删除功能:助手不应具备清除频道内容的能力。
Related MCP server: Telegram Channel MCP Server
要求
Node.js 18.18 或更高版本
通过 MasterBot 创建的机器人
机器人在您的频道中具有管理员权限
安装
Claude Code
claude mcp add max-channel \
--scope local \
--env MAX_BOT_TOKEN=ваш_токен \
--env MAX_CHAT_ID=-10000000000001 \
-- npx -y max-channel-mcplocal 作用域将令牌保存在您的个人配置中,而不是项目文件中。
Claude Desktop
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"max-channel": {
"command": "npx",
"args": ["-y", "max-channel-mcp"],
"env": {
"MAX_BOT_TOKEN": "ваш_токен",
"MAX_CHAT_ID": "-10000000000001"
}
}
}
}配置文件路径:
macOS —
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows —
%APPDATA%\Claude\claude_desktop_config.json
从源码安装
git clone https://github.com/eduard256/max-channel-mcp.git
cd max-channel-mcp
npm install
npm run build然后在配置中指定 node /完整路径/dist/index.js 而不是 npx。
配置
如何获取令牌
打开 MasterBot,按照说明创建机器人——您将收到一个令牌作为回复。
如何获取频道标识符
将机器人以管理员身份添加到频道。
执行请求:
curl -H "Authorization: ВАШ_ТОКЕН" https://platform-api2.max.ru/chats获取所需频道的
chat_id字段。通常是一个负数。
环境变量
变量 | 必填 | 用途 |
| 是 | 来自 MasterBot 的机器人令牌 |
| 是 | 用于发布的频道标识符 |
| 否 | 自定义根证书,替代内置证书 |
| 否 |
|
工具
工具 | 功能 |
| 文本消息 |
| 1 到 10 张照片,带共同说明 |
| 一个或多个视频 |
| 同一消息中的照片和视频 |
| 音频文件 |
| 文档 |
| 地图上的点 |
| 修改已发布消息的文本 |
| 置顶消息 |
| 取消置顶 |
| 频道最近的消息 |
| 频道信息和机器人权限 |
文件通过磁盘路径传递。按钮是所有发布工具的可选参数 кнопки。
MAX 限制
已通过实践验证。官方文档中这些规则描述不完整。
规则 | 详情 |
文本长度 | 不超过 4000 个字符 |
照片 | 一条消息中最多 10 张 |
视频 | 一条消息中允许多个 |
音频 | 恰好一个,不能与其他内容组合 |
文档 | 恰好一个,不能与其他内容组合 |
地理位置 | 恰好一个,不能与其他内容组合 |
照片 + 视频 | 唯一允许的不同类型组合 |
按钮 | 可添加到任何消息 |
标记 | 仅在明确指定格式时有效 |
将音频、文档和地理位置标记与其他附件混合时,服务器会拒绝,并显示类似 Must be only one audio attachment in message 的错误。
证书
MAX 服务器使用 «Russian Trusted Root CA»(俄罗斯数字发展部)证书颁发机构的证书。该根证书不在 Node.js 的标准存储中,因此如果不进行额外配置,连接会中断并显示错误 unable to get local issuer certificate。
为了使服务器在任何机器上无需手动配置即可运行,根证书已包含在包中——文件 certs/russian_trusted_root.pem。
工作原理如下:
证书仅应用于
max.ru、oneme.ru、okcdn.ru和mycdn.me域——其余流量按常规方式验证;它添加到系统根证书中,而不是替换它们;
启动时校验 SHA-256 校验和;如果文件被替换,服务器将无法启动;
不会在系统中安装任何内容——配置仅在服务器进程内生效。
内置证书的指纹:
d26d2d0231b7c39f92cc738512ba54103519e4405d68b5bd703e9788ca8ecf31可与 gosuslugi.ru 上发布的证书进行核对。
如果根证书已安装在您的系统中,可以禁用内置证书:MAX_DISABLE_CUSTOM_CA=1。自定义证书通过 MAX_CA_CERT_PATH 加载。
诊断
服务器将诊断信息写入标准错误流。启动时输出 TLS 状态和连接检查结果。
消息 | 原因和解决方案 |
| 检查客户端配置中的 |
| 令牌已过期或未完整复制——通过 MasterBot 重新生成 |
| 机器人未添加到频道或不是管理员 |
| 确保未设置 |
| 检查文件路径和格式 |
| 使用绝对路径 |
已知的库问题
服务器使用官方库 @maxhub/max-bot-api。在 0.2.5 版本中,通过文件路径或流上传图像和文档在 Node.js 21 及更高版本上无法工作:FormData 中插入的对象无法被现代 undici 识别为文件,服务器返回 NO_IMAGE。
此服务器通过将文件读入内存并以 Buffer 形式传递来绕过此问题。视频和音频通过其他方式上传,不受影响。
许可证
MIT
This server cannot be installed
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
- AlicenseBqualityDmaintenanceEnables interaction with Telegram channels through the Bot API, supporting comprehensive messaging operations including sending text/photos, creating polls, managing reactions, and editing/deleting messages. Provides complete channel management capabilities for automated Telegram bot operations.727MIT
- FlicenseNot gradedqualityDmaintenanceEnables sending messages to Telegram channels via MCP protocol, integrating with AI assistants for automated messaging.7
- AlicenseAqualityDmaintenanceEnables AI assistants to publish, edit, search, and manage messages in Telegram channels via a set of MCP tools.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send Telegram messages including text, images, links, and documents through MCP tools.MIT
Related MCP Connectors
Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
Publish, schedule and verify social posts across seven networks from your AI assistant.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/eduard256/max-channel-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server