Tgcli
MCP server by kfastov Verified · npm:@kfastov
Runs tgcli, a Telegram command-line tool with background sync and an optional MCP server for a personal Telegram account. It suits people who want to search, read and send Telegram messages from a terminal or an AI assistant.
Install Tgcli
Built from the published package, never by AI.
claude mcp add tgcli -- npx -y @kfastov/tgcliRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"tgcli": {
"args": [
"-y",
"@kfastov/tgcli"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"tgcli": {
"args": [
"-y",
"@kfastov/tgcli"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"tgcli": {
"args": [
"-y",
"@kfastov/tgcli"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add tgcli -- npx -y @kfastov/tgcli{
"mcpServers": {
"tgcli": {
"args": [
"-y",
"@kfastov/tgcli"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add tgcli npx -y @kfastov/tgcliGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the tgcli block.
About
tgcli is a command-line tool for Telegram. It works with a personal account through MTProto rather than the Bot API. After you authenticate with your Telegram api_id and api_hash, it can run archive backfill and realtime sync in the background. You can list and search messages and channels, send text or files, download media, and manage topics, contacts and groups. Add --json to any command for machine-readable output.
The MCP server is optional and off by default. You turn it on with tgcli config set mcp.enabled true. It binds to http://127.0.0.1:8080/mcp unless you change the host or port, and you point your MCP client at that address. The project is aimed at people who want their own Telegram data available from the terminal or from AI tools. Developers can run it from a clone with Node 22.
Written from the project's README and checked against it.
What you need
- A Telegram account with a phone number
- Telegram API credentials (api_id and api_hash) from my.telegram.org
- npm or Homebrew to install the tool
Try asking
- Search my Telegram chat with @channel for the word course
- Send a hello message to @username on Telegram
- Show the last 20 messages from a Telegram chat
Good to know
- Uses a personal Telegram account through MTProto, not the Bot API.
- The MCP server stays off until mcp.enabled is set to true.
- A server you started by hand keeps running old code after an upgrade until you restart it.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
What you can do with it
- Search Telegram chat history
- Send Telegram messages from the terminal
- Sync Telegram chats to a local archive
Alternatives to Tgcli
All alternatives →Jitsu MCP server lets AI assistants configure and operate Jitsu data pipelines. It covers destinations, streams, connections and functions, plus Live Events and connector syncs. It is aimed at teams that run event data pipelines.
Vexa sends a bot into Google Meet, Microsoft Teams, Zoom and Jitsi calls to capture speaker-labelled transcripts live or after the call. It suits teams that want meeting transcripts they can self-host.
Gives Claude and other MCP-compatible AI agents access to LinkedIn through your own browser session. It reads profiles, researches companies, finds jobs, and manages messages and connection requests.
Runs a NetSapiens phone system from Claude, ChatGPT, or any MCP client. Each person signs in as themselves, and their assistant gets role-aware tools for calls, voicemail, queues, and provisioning.
Resend MCP Server connects AI assistants to the Resend email platform. It lets them send and receive emails and manage contacts, broadcasts, templates, and domains. It suits developers and teams who use MCP clients such as Claude or Cursor.
The source does not describe labelhead-artist-momentum. It is a README for Paperclip, an open-source orchestration app for teams of AI agents.
Compare with Jitsu, Vexa or Linkedin MCP server
Tgcli: common questions
Does tgcli use the Telegram Bot API?
No. The source says tgcli uses MTProto for a personal account, not the Bot API.
Where does tgcli store its data?
The store lives in the OS app-data directory and holds config.json, sessions and messages.db. Set TGCLI_STORE to change the location.
Can I turn off the update check?
Yes. Set the environment variable TGCLI_NO_UPDATE_CHECK=1 to turn off the daily check for a newer release.
How do I install Tgcli?
In Claude Code run claude mcp add tgcli -- npx -y @kfastov/tgcli. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Tgcli the official server?
Tgcli is published by npm:@kfastov from its verified domain in the official MCP Registry.
Is Tgcli free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Tgcli safe to use?
It scores 75 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Tgcli?
Similar MCP servers: Jitsu, Vexa, Linkedin MCP server, Netsapiens MCP.
Does Tgcli work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
