Skip to content

Commit 1f8fea4

Browse files
committed
docs: update README and repository rules for AI agents
1 parent 2affaac commit 1f8fea4

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Update Telegram MCP Tools
3+
description: Procedure for updating the 'ALLOWED_TOOLS' environment variable in the Telegram MCP server configuration, preventing SQLite lock issues, and contributing upstream.
4+
---
5+
6+
# Updating Telegram MCP Tools
7+
8+
**Use this skill when** the user requests updating the allowed tools for their `telegram-mcp` server, changing its configuration, or sharing changes upstream via Pull Request.
9+
10+
Follow this precise procedure to prevent orphaned Python processes from locking the SQLite database or to push changes cleanly to the Open Source project.
11+
12+
## Procedure
13+
14+
1. **Update Configuration**:
15+
Edit the `ALLOWED_TOOLS` environment variable inside the `telegram-mcp` section of `mcp_config.json` with the new comma-separated tools list.
16+
17+
2. **Kill Orphaned Processes**:
18+
Whenever config is modified, the IDE tries to restart the MCP automatically. Because Telethon/Python does not always shut down cleanly, the old process stays in the background locking `telegram_session.session`.
19+
You **MUST** proactively run the following command to terminate hanging instances BEFORE asking the user to verify (adjust the string `telegram-mcp` if the user named the directory differently):
20+
```bash
21+
pkill -f "telegram-mcp"
22+
```
23+
24+
3. **Instruct the User to Refresh**:
25+
Inform the user what tools were updated and explicitly ask them to click the **"Refresh"** button in their "Manage MCP servers" UI. The server will restart correctly.
26+
27+
4. **Contributing Upstream (Pull Requests)**:
28+
Si el usuario pide subir el código para aportar al proyecto original (`upstream`), aplica esta secuencia estandarizada:
29+
- Revisa si el remoto secundario ya existe. Si origin es el oficial y el usuario no tiene permisos: asegúrate de tener el alias `fork` configurado apuntando a su bifurcación personal (Ej. `nhomar/telegram-mcp`).
30+
- Genera una rama nueva: `git checkout -b feat/nombre-del-cambio`.
31+
- Efectúa el `commit` documentando las razones concretas del cambio.
32+
- Sube forzosamente los cambios al *fork* del usuario: `git push -f fork feat/nombre-del-cambio`.
33+
- Emplea el cliente oficial de GitHub ubicando siempre explícitamente el repositorio principal `-R chigwell/telegram-mcp` (o el correspondiente) para levantar el PR oficial con formato documentado:
34+
```bash
35+
gh pr create -R chigwell/telegram-mcp --title "Detalle formal del asunto" --body "Explicación integral del impacto de este merge"
36+
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Security semantics (aligned with MCP filesystem server):
168168

169169
Example server launch with allowlisted roots:
170170
```bash
171-
uv --directory /full/path/to/telegram-mcp run main.py /data/telegram /tmp/telegram-mcp
171+
uv --directory /full/path/to/telegram-mcp run telegram-mcp /data/telegram /tmp/telegram-mcp
172172
```
173173

174174
GIF tools are currently limited: `get_gif_search` and `send_gif` are available, while `get_saved_gifs` is not implemented due to reliability limits in Telethon/Telegram API interactions.
@@ -278,7 +278,7 @@ Edit your Claude desktop config (e.g. `~/Library/Application Support/Claude/clau
278278
"--directory",
279279
"/full/path/to/telegram-mcp",
280280
"run",
281-
"main.py"
281+
"telegram-mcp"
282282
]
283283
}
284284
}

0 commit comments

Comments
 (0)