@overpod/mcp-telegram 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +18 -2
  2. package/dist/index.js +17 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -83,9 +83,13 @@ claude mcp add telegram -s user \
83
83
  -- npx @overpod/mcp-telegram
84
84
  ```
85
85
 
86
- ### Claude Desktop / Cursor / VS Code
86
+ ### Claude Desktop
87
87
 
88
- Add to your MCP configuration file:
88
+ 1. Open your config file:
89
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
90
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
91
+
92
+ 2. Add the Telegram server:
89
93
 
90
94
  ```json
91
95
  {
@@ -102,6 +106,18 @@ Add to your MCP configuration file:
102
106
  }
103
107
  ```
104
108
 
109
+ 3. Restart Claude Desktop.
110
+
111
+ 4. Ask Claude: **"Run telegram-login"** -- a QR code will appear. If the image is not visible, Claude will provide a browser link to view the QR code. Scan it in Telegram (**Settings > Devices > Link Desktop Device**).
112
+
113
+ 5. Ask Claude: **"Run telegram-status"** to verify the connection.
114
+
115
+ > **Note**: No terminal required! Login works entirely through Claude Desktop.
116
+
117
+ ### Cursor / VS Code
118
+
119
+ Add the same JSON config above to your MCP settings (Cursor Settings > MCP, or VS Code MCP config).
120
+
105
121
  ### Mastra
106
122
 
107
123
  ```typescript
package/dist/index.js CHANGED
@@ -48,8 +48,11 @@ server.tool("telegram-status", "Check Telegram connection status", {}, async ()
48
48
  });
49
49
  server.tool("telegram-login", "Login to Telegram via QR code. Returns QR image. IMPORTANT: pass the entire result to user without modifications.", {}, async () => {
50
50
  let qrDataUrl = "";
51
+ let qrRawUrl = "";
51
52
  const loginPromise = telegram.startQrLogin((dataUrl) => {
52
53
  qrDataUrl = dataUrl;
54
+ }, (url) => {
55
+ qrRawUrl = url;
53
56
  });
54
57
  // Wait for first QR to be generated
55
58
  const startTime = Date.now();
@@ -68,8 +71,20 @@ server.tool("telegram-login", "Login to Telegram via QR code. Returns QR image.
68
71
  console.error(`[mcp-telegram] Login failed: ${result.message}`);
69
72
  }
70
73
  });
71
- // Return as MCP image content + markdown image as fallback
74
+ // Return as MCP image content + text with fallback options
72
75
  const base64 = qrDataUrl.replace(/^data:image\/png;base64,/, "");
76
+ const qrApiUrl = qrRawUrl
77
+ ? `https://api.qrserver.com/v1/create-qr-code/?size=256x256&data=${encodeURIComponent(qrRawUrl)}`
78
+ : "";
79
+ const instructions = [
80
+ "Scan this QR code in Telegram: **Settings → Devices → Link Desktop Device**.",
81
+ "",
82
+ qrApiUrl ? `If the QR image is not visible, open this link in your browser:\n${qrApiUrl}` : "",
83
+ "",
84
+ "After scanning, run **telegram-status** to verify the connection.",
85
+ ]
86
+ .filter(Boolean)
87
+ .join("\n");
73
88
  return {
74
89
  content: [
75
90
  {
@@ -79,7 +94,7 @@ server.tool("telegram-login", "Login to Telegram via QR code. Returns QR image.
79
94
  },
80
95
  {
81
96
  type: "text",
82
- text: `Scan QR in Telegram: Settings → Devices → Link Desktop Device.\n\nIf image not visible: ![QR](${qrDataUrl})\n\nAfter scanning, check with telegram-status.`,
97
+ text: instructions,
83
98
  },
84
99
  ],
85
100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overpod/mcp-telegram",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "MCP server for Telegram userbot — 20 tools for messages, media, contacts & more. Built on GramJS/MTProto.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",