telemcp

Open source · MIT licence

A Telegram MCP server on your own account.

telemcp is an open source Telegram MCP server. It connects Claude or another AI assistant to your own Telegram account, or a bot, to read, search and send your messages, and it runs on your machine.

  • Runs on your own machineTalks only to Telegram
  • Your own account or a botAnswers your chats as you
  • Any MCP clientClaude Code, Claude Desktop, Cursor
  • Open source, MITFree to run yourself
npx -y github:telemcp/telemcp login
claude mcp add telemcp -- npx -y github:telemcp/telemcp

Prefer hosted? A hosted version is coming. Write to hi@telemcp.com.

Search
Priya Raman14:09
Jonas is in the edit until 18:00. Notes…Perfect, thank you 🙏
Henrik Dahl13:42
Hi Henrik, yes. Last month's price still…
Elif Demir13:42
Hi Elif, of course. Next week Jonas has…
Telegram13:39
New login. Dear Jonas, we detected a lo…
Amaka ObiYesterday
Poster draft is coming along
Mateo RuizYesterday
See you at the screening
Tomasz WójcikMon
Drone day footage is in the folder
Noah BeckerMon
The LUT is in the shared folder
Yuki TanakaSun
🎬 Sticker
Priya Ramanonline
Today
Hi Jonas, is the first cut of the Nordahl film ready? Our client call is at 414:07
your agent
Hi Priya, yes. The first cut is up for review:
jonaslindqvist.film
Nordahl, first cut v1
12:48, password in your email
14:08
Jonas is in the edit until 18:00. Notes can go here and he reads them tonight.14:08
Perfect, thank you 🙏14:09
Write a message…

Plate 1Jonas lets his agent answer the people who write to him on Telegram. Jonas is an example, not a customer.

17:58
Edit

Chats

Search
Tomasz Wójcik16:30
Is Thursday still on?1
Priya Raman14:05
Hi Jonas, the file you sent will not open on my side. Could you send it again?2
Henrik Dahl11:40
When can we expect the delivery?1
Elif Demir09:12
Hi Jonas, could you send me a quote for…1
Amaka ObiYesterday
Poster draft is coming along
Mateo RuizYesterday
See you at the screening
Noah BeckerMon
The LUT is in the shared folder
Yuki TanakaSun
🎬 Sticker
Contacts
Calls
Chats5
Settings

Plate 2Example chats. Jonas and the people writing to him are examples, not customers.

Four chats waited until six.

The problem is not Telegram. It is that the one person who can answer is busy.

Jonas runs a small video studio and talks to clients on Telegram. On a shoot day his phone stays in his bag. At 17:58 he opens it and four people are waiting: a quote request from the morning, a question about a delivery date, a file that did not open, and a client asking if Thursday still works. None of it was hard. All of it sat for hours.

Elif Demir, quote request09:12seen 17:58
Henrik Dahl, delivery date11:40seen 17:58
Priya Raman, file will not open14:05seen 17:58
Tomasz Wójcik, is Thursday still on16:30seen 17:58

The bot route does not fix it. A bot made with BotFather is a separate account. People have to find it and message it, and it never sees the chats that arrive in your own inbox. telemcp is built for the other case: your own account, the chats you already have. His agent answers from his account, so the people writing to him see a message from Jonas.

Set up in three steps.

You need Node.js 20 or newer and a Telegram account. The README has the config for Claude Desktop, Cursor, OpenClaw, local HTTP and Docker.

Step 1Install

Get your API keys, then install.

Open my.telegram.org, log in with your phone number, choose API development tools and create an application; any title will do. Copy the api_id and api_hash. telemcp never ships shared ones. Then run the two lines below on your machine.

jonas@edit-suite: ~
$npx -y github:telemcp/telemcp login
Asks for your api_id, api_hash, phone number, the login code Telegram sends you, and your two step verification password if you set one.
The session is saved in ~/.telemcp/session, readable only by you.
$claude mcp add telemcp -- npx -y github:telemcp/telemcp
$

Plate 3The two install lines from the README, run on your own machine.

Step 2Sign in

Sign in as you.

The login asks for the code Telegram sends to your app. Telegram then lists telemcp under Settings, Devices, like any other login. Want a separate identity instead? Log in with a bot token from @BotFather.

13:39
7 Telegramservice notifications
Today
Login code: 61382. Do not give this code to anyone, even if they say they are from Telegram.

This code can be used to log in to your Telegram account. We never ask it for anything else.13:38
New login. Dear Jonas, we detected a login into your account from a new device at 13:39. Device: telemcp. If this wasn't you, you can go to Settings, Devices and terminate that session.13:39
Message

Plate 4Example sign in screen. The code 61382 is an example.

Step 3The brief

Brief your agent.

Restart your agent after adding telemcp. Tell it who you are, how you write and what it may answer. Your agent decides what to say.

jonas@edit-suite: ~/nordahl
›connect my Telegram
Telegram just sent a login code to your phone. What is it?
›61382
Connected as Jonas Lindqvist. I can read your private chats and reply from your account. What should I answer while you are in the edit?
›I am in the edit suite until 18:00. Answer my Telegram while I am in there. Priya can have the Nordahl first cut link. Anyone else: say I will reply tonight.
Okay. I will watch your Telegram until 18:00 and answer as you said. Elif and Henrik wrote before I was connected; I will answer them first.
›

Plate 5Example brief. Names in it are examples, not customers.

The code is on GitHub.

telemcp is open source under the MIT licence. Read the code, open an issue, or send a pull request. Prefer hosted? A hosted version is coming. Write to hi@telemcp.com.

What it does, in one chat.

The jobs your agent does on your own Telegram account.

1
Reads and searches your chats.

Private chats, groups and channels you are in, with full text search over a local database.

16:20
2
Answers as you.

Replies go out from your account, not from a bot. The person on the other side sees a message from you.

16:21
3
Your words.

What your agent writes is what gets sent. If a reply is wrong, the brief your agent follows is where to fix it.

16:21
Search
Tomasz Wójcik16:21
Got it, thanks 👍
Priya Raman14:09
Perfect, thank you 🙏
Henrik Dahl13:42
Hi Henrik, yes. Last month's price still…
Elif Demir13:42
Hi Elif, of course. Next week Jonas has…
Telegram13:39
New login. Dear Jonas, we detected a lo…
Amaka ObiYesterday
Poster draft is coming along
Mateo RuizYesterday
See you at the screening
Noah BeckerMon
The LUT is in the shared folder
Yuki TanakaSun
🎬 Sticker
Tomasz Wójciklast seen just now
Today
Can you send the invoice for the drone day? Accounts closes Friday16:20
your agent
Here it is, Tomasz. Jonas is in the edit until 18:00; if anything on it is off, write here.16:21
Invoice_2026-114_drone.pdf
61 KB · PDF
16:21
Got it, thanks 👍16:21
Write a message…
1 2 3

Plate 6An invoice question answered in one chat. Priya and Tomasz are examples, not customers.

What it will not do.

Some limits come from Telegram, some from how telemcp is built. The defaults live in ~/.telemcp/config.json; edit the file and the next send uses the new values.

18:06
SettingsDevices
Link Desktop Device
This device
iPhone 15 ProTelegram iOSonline
Active sessions
telemcpYour agent, since 13:39online
MacBook ProTelegram macOSMon
Terminate All Other Sessions

Logs out all devices except for this one.

Plate 7Settings, Devices in Telegram, where you can end the session.

No mass messages.

There is no bulk send tool and every send has one recipient. By default 200 messages and 20 new contacts a day, a random 45 to 120 seconds before the next new contact, and 1 to 3 seconds between any two sends.

It stops when Telegram says stop.

On FLOOD_WAIT telemcp never retries inside the wait and pauses all sends until it has passed. After PEER_FLOOD it stops messaging new people until local midnight. Telegram decides what happens to an account; messaging people who expect to hear from you is the best protection.

One tap ends it.

Open Telegram, go to Settings, Devices, and end the session, or run telemcp logout. The session file is deleted; the local message database stays until you delete it.

Three more chats.

The kind of message that waits for hours when you are busy.

13:42
3Henrik Dahllast seen recently
Today
Hi Jonas, does last month's price still stand for the second film?13:15
your agent
Hi Henrik, yes. Last month's price still stands for the second film. Jonas will send the quote himself tonight.13:42
Great, thanks 👍13:42
Message

Plate 8Henrik, a returning client, asks whether last month's price still stands. The agent reads the earlier messages in the chat and answers with what the brief says. Henrik is an example, not a customer.

13:42
3Elif Demironline
Today
Hi Jonas, could we move our call to next week? Something came up on Thursday.12:40
your agent
Hi Elif, of course. Next week Jonas has Tuesday at 10:00 or Wednesday at 15:00. Tell me which one suits you and he will confirm it tonight.13:42
Message

Plate 9Elif asks to move a call to next week. The agent offers the slots the brief allows and leaves the booking to you. Elif is an example, not a customer.

15:03
3Amaka Obionline
Today
Hi, the course link in your welcome mail will not open for me15:02
your agent
Sorry about that, Amaka. Here is the right link: jonaslindqvist.film/course15:03
Message

Plate 10Amaka writes in because a course link will not open. The agent sends the right link in one message. Amaka is an example, not a customer.

Who it is for.

People who can run a local server today. A hosted version is coming for everyone else.

You run Claude Code, Claude Desktop, Cursor or OpenClaw.

You already have an agent on your machine and want it on your Telegram as you, not as a separate bot your contacts have to find.

You want your chats to stay with you.

telemcp runs on your machine and talks only to Telegram. No telemetry, no update checks, no hosted API.

Freelancers and founders who live in Telegram.

Clients write to your personal account, not to a bot. Prefer not to run a server? A hosted version is coming; write to hi@telemcp.com.

Creators who get the same questions every day.

Your agent answers the people who wrote to you, in your voice, and leaves the rest to you.

Asked before you install.

Short answers to what people ask when they look for a Telegram MCP server.

What is a Telegram MCP server?

It is a server that lets an AI assistant such as Claude use Telegram through the Model Context Protocol. telemcp is an open source one: it connects your own Telegram account or a bot, runs on your machine, and reads, searches and sends your messages. It is free under the MIT licence.

Is there a Telegram MCP server that uses my own account, not a bot?

Yes. telemcp signs in to your own Telegram account, so people get messages from you, and it reads the groups and channels you are in. It can also run as a bot when you want a separate identity.

Should I use my user account or a bot?

Use your user account when the assistant should work with your own chats: read groups and channels you are in, search your history, reply as you. Use a bot when you want a separate identity that people message on purpose, for example a support bot. Bots cannot read history from before they joined a chat and cannot start conversations.

How do I install telemcp?

Get an api_id and api_hash at my.telegram.org, run npx -y github:telemcp/telemcp login, then add it to Claude Code with claude mcp add telemcp -- npx -y github:telemcp/telemcp and restart. The README has the config for Claude Desktop, Cursor, OpenClaw, local HTTP and Docker.

Is telemcp open source, and where does it run?

Yes. It is MIT licensed and the code is at github.com/telemcp/telemcp. It runs on your own machine and keeps everything in ~/.telemcp: the session, config.json and a SQLite database of your chats and messages.

Does telemcp send my messages anywhere?

No. telemcp connects only to Telegram. Your messages are stored in a SQLite file on your machine and passed to the AI assistant you connected it to. There is no telemetry and no server of ours in between.

How much does telemcp cost?

Nothing. It is free and open source under the MIT licence. A hosted version is coming for people who do not want to run it themselves; write to hi@telemcp.com.

Do I need my own api_id and api_hash?

Yes. Every telemcp install uses its owner's credentials from my.telegram.org. It takes about two minutes and keeps your usage separate from everyone else's.

Will Telegram ban my account if an AI assistant uses it?

Telegram decides that, based on how an account behaves. telemcp keeps your sending close to normal use: a daily message cap, a smaller daily cap on new contacts, random pauses between new contacts and between sends, and a typing indicator. When Telegram answers with FLOOD_WAIT, telemcp waits the full time instead of retrying, and after PEER_FLOOD it stops messaging new people for the rest of the day. Messaging people who expect to hear from you is the best protection.

Can my agent message people who never wrote to me on Telegram?

With a user account, yes, within limits: 20 new contacts a day by default and a random wait between them, and after PEER_FLOOD it stops messaging new people for the day. A bot can only message people who started a chat with it first.

Can it mass message?

No. There is no bulk send tool, each send has exactly one recipient, and the daily caps and pacing apply to every send.

Does telemcp work with Telegram groups and channels?

Yes. With a user account it lists and reads every group, supergroup and channel you are a member of, and searches across them. A bot reads the groups it was added to, from the moment it joined.

How do I disconnect telemcp from my Telegram account?

Run telemcp logout, or ask your assistant to call disconnect_telegram. Both end the session on Telegram and delete the session file. You can also end it in Telegram under Settings, Devices. The local message database stays until you delete ~/.telemcp/telemcp.db.

Is telemcp made by Telegram?

No. telemcp is not affiliated with, endorsed by or sponsored by Telegram.

Your Telegram, answered. Still yours.

Open source, MIT, on your own machine, signed in as you.

npx -y github:telemcp/telemcp login
claude mcp add telemcp -- npx -y github:telemcp/telemcp

Prefer hosted? A hosted version is coming. Write to hi@telemcp.com.

AppendixThe setup lines for your MCP client, from the README.

telemcp speaks MCP over stdio by default. Log in once with npx -y github:telemcp/telemcp login, then add one of these and restart your client. The full list is in the README.

Claude Code

claude mcp add telemcp -- npx -y github:telemcp/telemcp

Claude Desktop and Cursor (claude_desktop_config.json, ~/.cursor/mcp.json)

{
  "mcpServers": {
    "telemcp": {
      "command": "npx",
      "args": ["-y", "github:telemcp/telemcp"]
    }
  }
}

OpenClaw

openclaw mcp add telemcp --command npx --arg -y --arg github:telemcp/telemcp

Local HTTP, listens on 127.0.0.1 only

npx -y github:telemcp/telemcp serve --http --port 8788 --token choose-a-long-secret

Docker

docker run -it --rm -v telemcp-data:/data ghcr.io/telemcp/telemcp login
docker run -i --rm -v telemcp-data:/data ghcr.io/telemcp/telemcp