Telegram MCP Server
kfastov/tgcli · 44 stars · JavaScript · MIT
MCP server Telegram user console client and archiver
Install
The repo has no one-line install. Follow its README.
Files
tgcli
Telegram CLI with background sync and an optional MCP server for your personal account (MTProto, not bot API).
Installation
npm install -g @kfastov/tgcli
brew install kfastov/tap/tgcli
Authentication
Get Telegram API credentials:
- Go to https://my.telegram.org/apps
- Log in with your phone number
- Create a new application
- Copy
api_idandapi_hash
Then authenticate:
tgcli auth
Quick start
tgcli auth tgcli sync --follow tgcli messages list --chat @username --limit 20 tgcli messages search "course" --chat @channel --source archive tgcli send text --to @username --message "hello" tgcli server
Commands
tgcli auth Authentication and session setup tgcli config View and edit config tgcli sync Archive backfill and realtime sync tgcli server Run background sync service (MCP optional) tgcli service Install/start/stop/status/logs for background service tgcli channels List/search channels tgcli messages List/search messages tgcli send Send text or files tgcli media Download media tgcli topics Forum topics tgcli tags Channel tags tgcli metadata Channel metadata cache tgcli contacts Contacts and people tgcli groups Group management tgcli doctor Diagnostics and sanity checks
Use tgcli [command] --help for details. Add --json for machine-readable output.
MCP (optional)
Enable it via config:
tgcli config set mcp.enabled true
By default the server binds to http://127.0.0.1:8080/mcp. To change it:
tgcli config set mcp.host 127.0.0.1 tgcli config set mcp.port 8080
Then run tgcli server and point your client at the configured address.
Configuration & Store
The tgcli store lives in the OS app-data directory and contains config.json, sessions, and messages.db.
Override the location with TGCLI_STORE.
Legacy version: see MIGRATION.md.
Facts
- Kind
- MCP server
- Repo
- kfastov/tgcli
- Group
- Uncategorized
- Stars
- 44
- License
- MIT
- Language
- JavaScript
- Last push
- 2026-09-20
- Forks
- 24
- Topics
- ai-agents, mcp, mcp-server, telegram, telegram-client, agent-skill, ai
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k