kurigram-mcp
🤖 kurigram-mcp
Отлаживайте Telegram-ботов с помощью ИИ — локальный MCP-сервер, который управляет вашей пользовательской сессией Telegram через MTProto.
English · 简体中文
✨ Возможности
🔌 Стандартный MCP | Транспорт Streamable HTTP, протокол 2026-07-28, обратная совместимость с клиентами 2025-11-25 (Claude Code, Codex, DSH) |
🧪 Отладка ботов | Отправка |
🛠️ Глубокая отладка |
|
🔒 Белый список чатов | Контроль для каждого клиента через заголовок запроса, по умолчанию закрыт (fail-closed) |
⚡ Без состояния | Перезапуск сервера не разрывает подключённых клиентов |
🚀 Без конфигурации |
|
Related MCP server: io.github.daedalus/mcp-telegram-bot
🚀 Быстрый старт
# 1. Install (provides `kurigram-mcp` and the `km` alias)
uv tool install kurigram-mcp
# 2. One-time setup: API_ID / API_HASH / whitelist / proxy / port
# AUTH_TOKEN is auto-generated if left blank (Bearer auth on by default)
km setup
# 3. Log in (skip if you chose to during setup): phone → code → 2FA
km auth
# 4. Start the server
km run # default: http://127.0.0.1:8765/mcpПолучите
API_ID/API_HASHна my.telegram.org/apps. Вход должны выполнить вы — учётные данные никогда не покидают вашу машину.
🧰 Инструменты (22)
Группа | Инструменты |
🧾 Сессия |
|
📤 Отправка |
|
📥 Чтение |
|
⏱️ События |
|
🔬 Глубокое |
|
Ошибки следуют стабильному формату [CODE] message: NOT_WHITELISTED · FLOOD_WAIT {seconds} · SESSION_INVALID · RPC ·
NETWORK · INTERNAL.
🔌 Настройка клиента
# Claude Code
claude mcp add --transport http kurigram-mcp http://127.0.0.1:8765/mcp \
--header "Authorization: Bearer <AUTH_TOKEN>" \
--header "X-Kurigram-Allowed-Chats: 6540476263" # optional per-client whitelist# Codex (~/.codex/config.toml)
[mcp_servers.kurigram-mcp]
url = "http://127.0.0.1:8765/mcp"
http_headers = { "Authorization" = "Bearer <AUTH_TOKEN>", "X-Kurigram-Allowed-Chats" = "6540476263" }# DSH — cordis.yml plugin row (@deepseek-ai/dsh-mcp-client)
- id: mcp-kurigram
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: kurigram
transport: streamable-http
url: http://127.0.0.1:8765/mcp
headers:
Authorization: !!js '`Bearer ${process.env.KURIGRAM_TOKEN}`'
X-Kurigram-Allowed-Chats: '6540476263'🔐 Белый список чатов
Заголовок запроса
X-Kurigram-Allowed-Chats— объявление для каждого клиента (через запятую: числовые id чатов,@username,me).Конфиг
allowed_chat_ids— запасной вариант, когда заголовок отсутствует.
Закрыт по умолчанию: чаты вне белого списка отклоняются с [NOT_WHITELISTED]; get_dialogs возвращает только чаты из белого
списка.
⚙️ Конфигурация
Вся конфигурация хранится в одном файле: ~/.kurigram-mcp/config.yaml.
api_id: 123456
api_hash: your_hash
allowed_chat_ids: "123456789,me" # fallback whitelist
host: 127.0.0.1
port: 8765
auth_token: auto_generated_or_yours # Bearer auth
proxy: "" # optional, e.g. socks5://127.0.0.1:1080📁 Данные и файлы
~/.kurigram-mcp/
├── config.yaml # setup-generated config (chmod 600)
├── u_{API_ID}.session # Telegram session (bound to API_ID, persists)
└── downloads/ # download_media output🧑💻 Разработка
uv sync
uv run pytest
uv run ruff check src tests scripts
# Configure like a regular user (shared ~/.kurigram-mcp):
uv run kurigram-mcp setup
# Or isolate a dev environment (never touches your real config):
# KURIGRAM_MCP_HOME=$PWD/.dev-home uv run kurigram-mcp setup
# KURIGRAM_MCP_HOME=$PWD/.dev-home uv run kurigram-mcp run📄 Лицензия
This server cannot be installed
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
- Alicense-qualityDmaintenanceMCP server that connects AI assistants to your real Telegram account via User API (MTProto). Features default-deny ACL with per-chat permissions, message search, file sending, forwarding, media downloads, and rate limiting.2MIT
- AlicenseAqualityCmaintenanceMCP server that exposes a Telegram bot, enabling sending messages and retrieving updates through natural language.31MIT
- Alicense-qualityBmaintenanceAn MCP server that connects to Telegram as your real user account and exposes read-only tools to read and search messages, list chats and folders, inspect group info, and download media.9MIT
- Alicense-qualityAmaintenanceA safe-by-default MCP server for real Telegram accounts powered by TDLib, enabling AI agents to read and act on your account with read-only mode and human approval for destructive actions.1Apache 2.0
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
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/z-mio/kurigram-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server