kurigram-mcp
Allows AI agents to interact with Telegram through a user session, providing tools for sending messages and media, reading chats and history, managing reactions and inline buttons, waiting for updates, and invoking raw MTProto methods for debugging Telegram bots.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kurigram-mcpsend /start to @MyTestBot and measure reply latency"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ค kurigram-mcp
Debug Telegram bots with AI โ a local MCP server that drives your Telegram user session over MTProto.
English ยท ็ฎไฝไธญๆ
โจ Features
๐ Standard MCP | Streamable HTTP transport, 2026-07-28 protocol, backward-compatible with 2025-11-25 clients (Claude Code, Codex, DSH) |
๐งช Bot debugging | Send |
๐ ๏ธ Deep debugging |
|
๐ Chat whitelist | Per-account whitelist with global fallback, fail-closed by default |
โก Stateless | Clients stay connected across server restarts |
๐ Zero config |
|
Related MCP server: io.github.daedalus/mcp-telegram-bot
๐ Quick Start
# 1. Install (provides `kurigram-mcp` and the `km` alias)
uv tool install kurigram-mcp
# 2. One-time setup: API_ID / API_HASH / whitelist / proxy
# AUTH_TOKEN is auto-generated (Bearer auth on by default)
km setup
# 3. Log in
km session add # interactive wizard: name โ credentials โ whitelist โ phone โ code โ 2FA
# 4. Start the server (foreground โ stop with Ctrl-C)
km run # default: http://127.0.0.1:8765/mcpGet
API_ID/API_HASHfrom my.telegram.org/apps. Login must be performed by you โ credentials stay on your machine.
๐ฅ Multi-Account Sessions
Some test scenarios need several users in the same chat (e.g. group bots). Register one account per Telegram user โ each
account keeps its own session file, optional proxy and chat whitelist โ then all accounts live in one server, and
every tool takes an
account parameter:
# 1. Add each account
km session add alice # interactive wizard; credentials can reuse the setup app by default
km session add bob
# 2. See login status
km session list # add -v for proxy/whitelist details
# 3. Edit an account's whitelist / proxy
km session set alice --allowed-chat-ids="-1001234567890,@mybot,me" # note: use `=` for values starting with `-`
km session set alice --allowed-chat-ids "" # clear โ fall back to global whitelist
km session set bob --proxy socks5://127.0.0.1:1080 # or --proxy "" to clear
# 4. Start ONE server โ all logged-in accounts connect together
km run # every tool now accepts account="alice" / account="bob"Every tool (send, read, events, raw,
whoami) acceptsaccount: <name>โ omit it to use the default account. Example:send_message(account="alice")โwait_for_update(account="alice").km run --account alicestarts a single-account server (isolation mode).The legacy single-account config (
api_idat top level) is the implicit accountdefault.Per-account
--allowed-chat-idsoverrides the global whitelist for that account; accounts without their own whitelist fall back to the globalallowed_chat_ids.mcp_get_server_infolists all connected accounts.
๐งฐ Tools (34)
Group | Tools |
๐งพ Session |
|
๐ค Send |
|
๐ฅ Read |
|
๐ฅ Group |
|
โฑ๏ธ Events |
|
๐ฌ Deep |
|
๐ Client Setup
# Claude Code
claude mcp add --transport http kurigram-mcp http://127.0.0.1:8765/mcp \
--header "Authorization: Bearer <AUTH_TOKEN>"# Codex (~/.codex/config.toml)
[mcp_servers.kurigram-mcp]
url = "http://127.0.0.1:8765/mcp"
http_headers = { "Authorization" = "Bearer <AUTH_TOKEN>" }# 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}`'๐ Chat Whitelist
Per-account whitelist โ
km session add NAME --allowed-chat-ids "..."(comma-separated: numeric chat ids,@username,me). Each account is isolated.Global fallback โ config
allowed_chat_idsapplies to any account that didn't set its own.
โ๏ธ Configuration
All configuration lives in one file: ~/.kurigram-mcp/config.yaml.
api_id: 123456
api_hash: your_hash
allowed_chat_ids: "123456789,me" # global fallback whitelist (per-account overrides it)
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๐ Data & Files
~/.kurigram-mcp/
โโโ config.yaml # setup-generated config (chmod 600)
โโโ sessions/ # Telegram session files: u_{API_ID}.session (one per account)
โโโ downloads/ # download_media output๐งโ๐ป Development
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๐ License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 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
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
The official MCP Server for the Mux API
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP 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.3MIT
- AlicenseAqualityCmaintenanceMCP server that exposes a Telegram bot, enabling sending messages and retrieving updates through natural language.31MIT
- AlicenseNot gradedqualityBmaintenanceAn 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.16MIT
- AlicenseNot gradedqualityAmaintenanceA 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.5Apache 2.0
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