telegram-commandcode
Provides tools for sending messages, photos, files, and reading updates from Telegram, allowing AI agents to communicate via Telegram chats.
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., "@telegram-commandcodeSend the test results to Telegram"
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.
telegram-commandcode
MCP server for Telegram integration with Command Code — send messages, photos, and files straight from your AI coding agent.
> "Run the tests, then send me the results on Telegram"
✅ Tests pass → telegram_send_message → you get notifiedHow It Works
This is an MCP (Model Context Protocol) server. Once registered in Command Code, you get these tools:
Tool | What it does |
| Send a text message (Markdown or HTML) |
| Send a photo (URL or local file) |
| Send any file/document |
| Read recent incoming messages |
Related MCP server: telegram-mcp
Quickstart
1. Create a Telegram Bot
Talk to @BotFather on Telegram:
/newbot
→ pick a name and username
→ copy the token (looks like: 123456:ABCdef...)2. Install & Register in Command Code
# Install globally via npm
npm i -g github:qrak/telegram-commandcode
# Or run directly via npx
npx github:qrak/telegram-commandcodeThen register it in your project:
# One-liner with token
cmd mcp add telegram \
-e TELEGRAM_BOT_TOKEN=123456:ABCdef... \
-- npx telegram-commandcode
# Or with a .env file (create .env from .env.example first)
cmd mcp add telegram \
-e TELEGRAM_BOT_TOKEN=123456:ABCdef... \
-e TELEGRAM_DEFAULT_CHAT_ID=1141080547 \
-- npx telegram-commandcode3. Find your chat ID
Message your bot on Telegram, then ask Command Code:
> Use telegram_get_updates to get recent messagesOr via curl:
curl https://api.telegram.org/bot<TOKEN>/getUpdates | jq ".result[0].message.chat.id"4. Use It
Now Command Code automatically discovers the tools. Just ask naturally:
> Run the build, and if it passes send "✅ Build OK" to Telegram> Deploy to staging, then telegram_send_message to chat 1141080547> Write the release notes to /tmp/CHANGELOG.md and send it via telegram_send_fileConfiguration
Environment Variables
Variable | Required | Description |
| Yes | Bot token from @BotFather |
| No | Default target chat — if set, you can omit |
Scopes
Scope | Command |
Project (default) |
|
Global (all projects) |
|
Shared (team) |
|
Example Session
> Build the CLI, run the test suite, and send results to my Telegram
[Command Code builds the project...]
[Runs tests: 42 pass, 0 fail]
Using telegram tool: telegram_send_message
→ ✅ CLI built successfully. Tests: 42 passed, 0 failed.
You get this on your phone:
┌──────────────────────────┐
│ ✅ CLI built successfully │
│ Tests: 42 passed, 0 failed │
└──────────────────────────┘Manual Testing
You can run the server directly to test:
# Set token
export TELEGRAM_BOT_TOKEN=123456:ABCdef...
# Send a message (via MCP JSON-RPC over stdio)
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"telegram_send_message","arguments":{"text":"Hello from Command Code!","chat_id":"1141080547"}}}' | node index.jsTroubleshooting
Symptom | Fix |
| Token not passed. Check |
| Set |
Server starts but tools are ✗ | Check |
| Use absolute paths. For files in your project, use full path like |
License
MIT — use it, fork it, ship it.
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.
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/qrak/telegram-commandcode'
If you have feedback or need assistance with the MCP directory API, please join our Discord server