@thxmxx/telegram-mcp 1.3.1 → 1.3.3

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/setup.js +19 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thxmxx/telegram-mcp",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Telegram bridge for Claude Code — notify, ask and choose via your phone",
5
5
  "type": "module",
6
6
  "repository": {
package/src/setup.js CHANGED
@@ -76,6 +76,21 @@ console.log(`\n${BOLD}Registering MCP server globally…${RESET}`);
76
76
 
77
77
  const serverPath = new URL("./index.js", import.meta.url).pathname;
78
78
 
79
+ // Remove existing registration first so token updates take effect
80
+ try {
81
+ execFileSync("claude", ["mcp", "remove", "telegram-mcp", "--scope", "user"], {
82
+ stdio: "ignore",
83
+ });
84
+ } catch {
85
+ try {
86
+ execFileSync("claude", ["mcp", "remove", "telegram-mcp"], {
87
+ stdio: "ignore",
88
+ });
89
+ } catch {
90
+ // Not registered yet — that's fine
91
+ }
92
+ }
93
+
79
94
  try {
80
95
  execFileSync(
81
96
  "claude",
@@ -83,7 +98,7 @@ try {
83
98
  "mcp",
84
99
  "add",
85
100
  "--scope",
86
- "user", // global, persists across all projects
101
+ "user",
87
102
  "telegram-mcp",
88
103
  "-e",
89
104
  `TELEGRAM_BOT_TOKEN=${token}`,
@@ -206,5 +221,7 @@ ${GREEN}${BOLD}All done!${RESET}
206
221
  ${DIM}"deploy to staging, ask me via telegram if anything is unclear"${RESET}
207
222
 
208
223
  Each session auto-identifies itself as ${BOLD}[folder#id]${RESET} in Telegram.
209
- ${DIM}No need to run init again unless you change your bot token.${RESET}
224
+
225
+ ${BOLD}⚠️ Restart Claude Code now${RESET} to apply the new credentials.
226
+ ${DIM}The MCP server only picks up token changes on restart.${RESET}
210
227
  `);