Skip to main content
Glama
eduard256

max-channel-mcp

by eduard256

max-channel-mcp

MCP server for publishing to channels of the messenger MAX.

Connects to Claude Desktop, Claude Code, and other clients that support the Model Context Protocol. After setup, the assistant can publish text, photos, videos, audio, documents, and geo tags to your channel — simply at your request.

Вы:  Опубликуй в канале анонс с картинкой из ~/Downloads/banner.png
     и кнопкой на сайт.

ИИ:  [вызывает max_send_photos]
     Опубликовано. Ссылка: https://max.ru/ваш_канал/AaApSIDNYGM

Features

  • Publishing text with Markdown or HTML markup

  • Albums of up to 10 photos, videos, mixed albums

  • Audio, documents, geo tags

  • Buttons under messages — links and callback

  • Editing and pinning published messages

  • Reading channel history

Deleting messages is intentionally not implemented: the assistant must not be able to erase channel content.

Related MCP server: Telegram Channel MCP Server

Requirements

  • Node.js 18.18 or newer

  • A bot created via MasterBot

  • Administrator rights for the bot in your channel

Installation

Claude Code

claude mcp add max-channel \
  --scope local \
  --env MAX_BOT_TOKEN=ваш_токен \
  --env MAX_CHAT_ID=-10000000000001 \
  -- npx -y max-channel-mcp

The local scope keeps the token in your personal config, not in the project file.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "max-channel": {
      "command": "npx",
      "args": ["-y", "max-channel-mcp"],
      "env": {
        "MAX_BOT_TOKEN": "ваш_токен",
        "MAX_CHAT_ID": "-10000000000001"
      }
    }
  }
}

Path to the settings file:

  • macOS — ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows — %APPDATA%\Claude\claude_desktop_config.json

From source

git clone https://github.com/eduard256/max-channel-mcp.git
cd max-channel-mcp
npm install
npm run build

Then specify node /full/path/dist/index.js in the config instead of npx.

Configuration

How to get a token

Open MasterBot, create a bot according to the instructions — you will receive a token in response.

How to find the channel ID

  1. Add the bot to the channel as an administrator.

  2. Run the request:

curl -H "Authorization: ВАШ_ТОКЕН" https://platform-api2.max.ru/chats
  1. Take the chat_id field of the desired channel. This is usually a negative number.

Environment variables

Variable

Required

Purpose

MAX_BOT_TOKEN

yes

Bot token from MasterBot

MAX_CHAT_ID

yes

Channel ID for publishing

MAX_CA_CERT_PATH

no

Your own root certificate instead of the built-in one

MAX_DISABLE_CUSTOM_CA

no

1 — do not load the built-in certificate

Tools

Tool

What it does

max_send_text

Text message

max_send_photos

1 to 10 photos with a shared caption

max_send_video

One or more videos

max_send_media_group

Photos and videos in a single message

max_send_audio

Audio file

max_send_file

Document

max_send_location

A point on a map

max_edit_message

Edit the text of a published message

max_pin_message

Pin a message

max_unpin_message

Unpin a message

max_get_messages

Latest channel messages

max_get_channel_info

Information about the channel and bot permissions

Files are passed as paths on disk. Buttons are an optional кнопки parameter for all publishing tools.

MAX limitations

Verified in practice. The official documentation describes these rules only partially.

Rule

Details

Text length

no more than 4000 characters

Photos

up to 10 in one message

Video

multiple in one message allowed

Audio

exactly one, combined with nothing

Document

exactly one, combined with nothing

Geo tag

exactly one, combined with nothing

Photo + video

the only allowed combination of different types

Buttons

added to any message

Markup

works only when the format is explicitly specified

Mixing audio, documents, or geo tags with other attachments is rejected by the server with an error like Must be only one audio attachment in message.

Certificates

MAX servers use a certificate from the certificate authority «Russian Trusted Root CA» (Ministry of Digital Development of the Russian Federation). This root is not present in the standard Node.js store, so without additional configuration the connection is interrupted with the error unable to get local issuer certificate.

To make the server work on any machine without manual configuration, the root certificate is included in the package — the file certs/russian_trusted_root.pem.

How it works:

  • the certificate is applied only to the domains max.ru, oneme.ru, okcdn.ru, and mycdn.me — all other traffic is checked normally;

  • it is added to the system roots, not replacing them;

  • on startup the SHA-256 checksum is verified; if the file has been replaced, the server does not start;

  • nothing is installed into the system — the setting only applies inside the server process.

Fingerprint of the built-in certificate:

d26d2d0231b7c39f92cc738512ba54103519e4405d68b5bd703e9788ca8ecf31

It can be checked against the one published on gosuslugi.ru.

If the root is already installed in your system, you can disable the built-in one: MAX_DISABLE_CUSTOM_CA=1. Your own certificate is connected via MAX_CA_CERT_PATH.

Diagnostics

The server writes diagnostics to the standard error stream. On startup it prints the TLS state and the result of the connection check.

Message

Cause and solution

не задана переменная MAX_BOT_TOKEN

Check env in the client config

Токен отклонён

The token is outdated or was copied incompletely — reissue it through MasterBot

Нет доступа к каналу

The bot was not added to the channel or is not an administrator

Ошибка проверки сертификата

Make sure that MAX_DISABLE_CUSTOM_CA=1 is not set

Не удалось загрузить изображение

Check the file path and format

Файл не найден

Use absolute paths

Known library issue

The server uses the official library @maxhub/max-bot-api. In version 0.2.5, uploading images and documents by file path or via a stream does not work on Node.js 21 and newer: an object is put into FormData that modern undici does not recognize as a file, and the server responds with NO_IMAGE.

This server works around the issue by reading files into memory and passing them as a Buffer. Videos and audio are uploaded through a different path and are not affected.

License

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

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

  • A
    license
    B
    quality
    D
    maintenance
    Enables 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.
    7
    27
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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