{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_krj39rqfafpy","handle":"telegram-desktop-mcp","url":"https://wellknown.network/agents/telegram-desktop-mcp","links":{"self":"https://wellknown.network/agents/telegram-desktop-mcp/record.json","html":"https://wellknown.network/agents/telegram-desktop-mcp","markdown":"https://wellknown.network/agents/telegram-desktop-mcp/record.md","api":"https://wellknown.network/api/v1/agents/telegram-desktop-mcp","status":"https://wellknown.network/api/v1/agents/telegram-desktop-mcp/status","claim":"https://wellknown.network/agents/telegram-desktop-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/telegram-desktop-mcp/claim.json","badge":"https://wellknown.network/agents/telegram-desktop-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/telegram-desktop-mcp/history","tools":"https://wellknown.network/api/v1/agents/telegram-desktop-mcp/tools"},"ard":{"identifier":"urn:air::server:telegram-desktop-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"telegram-desktop-mcp","summary":"A Telegram MCP server to control Telegram and read PDFs","description":"# Telegram MCP Server\n\nTelegram MCP server scaffold that logs in to Telegram using a QR code before starting the MCP server.\n\nThis project uses:\n\n- `telethon` to connect to Telegram\n- `qrcode` to print a login QR code in the terminal\n- `python-dotenv` to load private keys from a local `.env` file\n\n> مهم: لا ترفع مفاتيح Telegram الخاصة بك أو ملف `.session` إلى GitHub.\n\n## Requirements\n\n- Python 3.10+\n- Telegram account\n- Telegram API credentials from <https://my.telegram.org>\n\n## 1. Get Telegram API ID and API Hash\n\n1. Open <https://my.telegram.org>\n2. Login with your Telegram phone number\n3. Go to **API development tools**\n4. Create an app\n5. Copy:\n   - `api_id`\n   - `api_hash`\n\n## 2. Install dependencies\n\nCreate and activate a virtual environment:\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\nInstall packages:\n\n```bash\npip install telethon qrcode python-dotenv\n```\n\n## 3. Configure environment variables\n\nCopy the example file:\n\n```bash\ncp .env.example .env\n```\n\nEdit `.env`:\n\n```env\nTELEGRAM_API_ID=123456\nTELEGRAM_API_HASH=your_api_hash_here\nTELEGRAM_SESSION=telegram_mcp\n```\n\nReplace the values with your real Telegram credentials.\n\n## 4. How QR login works\n\nWhen the server starts, it checks if your Telegram session is already authorized.\n\n- If authorized, it continues normally.\n- If not authorized, it prints a QR code in the terminal.\n\nTo login:\n\n1. Open Telegram on your phone\n2. Go to **Settings**\n3. Go to **Devices**\n4. Tap **Link Desktop Device**\n5. Scan the QR code from the terminal\n\nAfter scanning, a `.session` file is created locally. This file keeps you logged in.\n\n## 5. Run\n\nCurrent `server.py` contains the login helper and Telegram client setup.\n\nIf your MCP server has a main function, call this before starting MCP:\n\n```python\nawait before_mcp_start()\n```\n\nExample:\n\n```python\nasync def main():\n    await before_mcp_start()\n    await mcp.run_async()\n```\n\nThen run:\n\n```bash\npython server.py\n```\n\n## Project files\n\n```text\nserver.py       # Telegr…","publisher":null,"homepage":null,"repository":null,"version":"0.1.0","license":null,"protocols":["mcp"],"tags":["mcp"],"pricing":null,"endpoints":[{"url":"pypi:telegram-desktop-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","summary":"pypi","version":"pypi","description":"pypi"}},"derived":{"capabilities":[{"slug":"communication.sms-voice","name":"SMS & Voice","confidence":1,"provenance":"derived"},{"slug":"dev.package-management","name":"Packages & Dependencies","confidence":0.859,"provenance":"derived"},{"slug":"dev.terminal","name":"Terminal & Shell","confidence":0.779,"provenance":"derived"}],"categories":["communication","dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"telegram-desktop-mcp","registry":"pypi","observedAt":"2026-10-24T18:29:11.679Z","publishedAt":"2026-09-27T22:39:13.522734Z","latestVersion":"0.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"telegram-desktop-mcp","url":"https://pypi.org/project/telegram-desktop-mcp/","firstSeenAt":"2026-09-30T11:24:59.870Z","fetchedAt":"2026-10-24T18:28:32.934Z","normalizedAt":"2026-10-24T18:28:32.934Z"}]},"firstSeenAt":"2026-09-30T11:24:59.870Z","updatedAt":"2026-10-24T18:29:11.679Z"}