Skip to main content
All connectors
qbash Connectors / Telegram

Telegram MCP serverand Python AI tasks

qbash hosts a Telegram MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse.

Developers use qbash Tasks to write cloud-hosted Python functions that pair Telegram with models such as Claude and GPT.

MCP server

Build a Telegram MCP server

Give ChatGPT, Claude and your other AI tools access to Telegram through one server. You pick which Telegram tools it shares, and you can add other connectors, memory folders and Tasks to the same server.

How to set it up

  1. Connect Telegram on the qbash Connectors page.
  2. Create an MCP server and add the Telegram tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

Python AI task

Write a Telegram task in Python

A qbash Task is a hosted Python function that calls Telegram and AI models.

Check a channel’s pinned announcement

Read a channel through your bot, then ask an inline prompt to check the pinned message for dates, links and claims that may have gone stale.

main.py
report = qbash.integrations.telegram.get_chat(chat_id="@your_channel")
chat = report.get("chat", {})
if chat.get("pinned_message"):
review = qbash.ai.run_prompt(
slug="telegram-pinned-review",
variables={"chat": json.dumps(chat)},
)
qbash.output(review)
else:
qbash.output("This chat has no pinned message in the API response.")
Sample get_chat response
{
"status": "success",
"chat": {
"id": -1001234567890,
"type": "channel",
"title": "Product updates",
"username": "your_channel",
"pinned_message": {
"message_id": 12,
"text": "Our next release is on Friday."
}
}
}

What the Telegram connector can do

  • Send a text message to a chat
  • Send a photo to a chat
  • Send a document to a chat
  • Edit a previously sent message
  • Delete a message from a chat
  • Send a poll to a chat
  • Poll for new incoming updates
  • Get detailed info about a chat
  • Get the member count of a chat
  • Configure a webhook URL for receiving updates
  • Get basic info about the bot (test connection)
  • Pin a message in a chat
  • Unpin a message in a chat
  • Set the title of a chat
  • Set the description of a chat
  • Leave a group, supergroup, or channel
  • Send a chat action like typing indicator
See every Telegram method in the SDK Reference

qbash Tasks: AI applications in Python

A Task is a Python function that calls Telegram, your other connectors and models such as Claude, GPT, Gemini and Grok. qbash hosts and runs it.

AnthropicOpenAIGeminixAI

Run Tasks on a schedule or from your team's tools

OpenAIAnthropicGrokGmailSlackGitHub+ more
  • Deterministic where it counts Write the logic in Python and call a model only for the steps that need judgement, so the rest runs the same way every time.
  • Version controlled Every save is a revision you can compare and roll back.
  • Logged Each run records its inputs, output, errors and what started it.
  • Shared credentials Connections belong to your organization, so a Task keeps working when its author is away.

Telegram MCP questions

Does Telegram have an official MCP server?

No. Telegram publishes the Bot API, and the MCP servers built on it come from the community. qbash runs this one on the Bot API with your own bot token.

Can the bot read every message in a group?

Only if you turn off privacy mode in BotFather. With privacy mode on, which is the default, a bot in a group receives commands and replies to its own messages.

Guides that use Telegram

Build a Telegram task

Write it in Python with AI steps, and qbash hosts it with versions and run logs.

Build a task

Build a Telegram MCP server

Pick the Telegram tools to share and connect ChatGPT, Claude or Grok Bot.

Build an MCP server