communication
Telegram MCP Integration for Codex
Connect Telegram to Codex through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Telegram to Codex
Use KosmoKrator as a local MCP proxy for Codex so coding sessions can reach selected integrations with explicit write policy.
Register kosmo mcp:serve as a local stdio server and choose the integration allowlist. The gateway is local, scoped to this integration, and starts with
--write=deny so Codex can inspect read-capable tools without receiving write access by default.
Telegram MCP Config for Codex
Keep write access denied or ask-based unless the workspace is trusted.
{
"mcpServers": {
"kosmokrator-telegram": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=telegram",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=telegram --write=deny Why Use KosmoKrator Here
Expose only Telegram instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Telegram Tools Visible to Codex
Codex sees stable MCP tool names generated from the Telegram integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__telegram__telegram_send_message | telegram.telegram_send_message | Write | Send a text message to a Telegram chat. Provide the chat_id and message text. The chat_id can be a numeric ID or @channelusername. Supports optional parse_mode (Markdown, MarkdownV2, HTML) and other formatting options. |
integration__telegram__telegram_list_updates | telegram.telegram_list_updates | Read | Get incoming updates (messages, callback queries, inline queries, etc.) for the Telegram bot. Use offset to acknowledge previously received updates. Returns an array of update objects. |
integration__telegram__telegram_get_me | telegram.telegram_get_me | Read | Get information about the authenticated Telegram bot. Returns the bot ID, username, display name, and capability flags. |
integration__telegram__telegram_list_chats | telegram.telegram_list_chats | Read | List recent chats the bot has interacted with. Since Telegram Bot API does not have a native list-chats endpoint, this fetches recent updates and extracts unique chats. Returns chat IDs, types, and titles. |
integration__telegram__telegram_get_chat | telegram.telegram_get_chat | Read | Get information about a specific Telegram chat by its ID or @username. Returns chat type, title, description, member count, and other metadata. |
integration__telegram__telegram_send_photo | telegram.telegram_send_photo | Write | Send a photo to a Telegram chat. Provide the chat_id and a photo URL or file_id. Supports optional caption with formatting and other options. |
integration__telegram__telegram_get_current_user | telegram.telegram_get_current_user | Read | Get the profile of the currently authenticated Telegram bot. Returns bot ID, username, display name, and capability flags. |