Skip to content

Commit ffeebe8

Browse files
authored
Merge pull request chigwell#255 from markov12/feat/mcpb-desktop-extension
feat: add MCPB manifest for one-click Claude Desktop install
2 parents 7d506f7 + eb5b3c6 commit ffeebe8

3 files changed

Lines changed: 129 additions & 0 deletions

File tree

‎.mcpbignore‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Secrets and local state must never end up in the bundle
2+
.env
3+
.env.*
4+
*.session
5+
*.session-journal
6+
*.log
7+
data/
8+
9+
# Environments and caches
10+
.venv/
11+
__pycache__/
12+
*.pyc
13+
.pytest_cache/
14+
.mypy_cache/
15+
.ruff_cache/
16+
.coverage
17+
*.egg-info/
18+
build/
19+
dist/
20+
21+
# Not needed at runtime
22+
.git/
23+
.github/
24+
tests/
25+
screenshots/
26+
skills/
27+
Dockerfile
28+
docker-compose.yml
29+
poetry.lock
30+
requirements.txt
31+
.pre-commit-config.yaml
32+
*.mcpb

‎README.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,26 @@ uv run main.py
336336

337337
## MCP Client Configuration
338338

339+
### Claude Desktop extension (.mcpb)
340+
341+
The repository ships a `manifest.json`, so it can be packed into a
342+
[Claude Desktop extension](https://github.com/modelcontextprotocol/mcpb) and
343+
installed without editing any JSON:
344+
345+
```bash
346+
npx @anthropic-ai/mcpb pack . telegram-mcp.mcpb
347+
```
348+
349+
Open the resulting `telegram-mcp.mcpb` with Claude Desktop (or drag it onto
350+
Settings → Extensions) and fill in the API ID, API hash and session string
351+
(see [Quick Start](#quick-start) for generating one). Claude Desktop installs
352+
Python and the dependencies itself via `uv`, and masks the API hash and
353+
session string as sensitive fields. The allowed-chats and files-directory fields map to
354+
`TELEGRAM_ALLOWED_CHAT_IDS` and `TELEGRAM_ALLOWED_ROOTS`. `.mcpbignore` keeps
355+
`.env`, session files and logs out of the bundle.
356+
357+
### Manual configuration
358+
339359
For Claude Desktop or Cursor, point the MCP server at a cloned checkout of
340360
this project:
341361

‎manifest.json‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/modelcontextprotocol/mcpb/main/dist/mcpb-manifest.schema.json",
3+
"manifest_version": "0.4",
4+
"name": "telegram-mcp",
5+
"display_name": "Telegram",
6+
"version": "2.0.1",
7+
"description": "Read, search and send Telegram messages from your own account via Telethon",
8+
"author": {
9+
"name": "chigwell"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/chigwell/telegram-mcp"
14+
},
15+
"homepage": "https://github.com/chigwell/telegram-mcp",
16+
"documentation": "https://github.com/chigwell/telegram-mcp#readme",
17+
"support": "https://github.com/chigwell/telegram-mcp/issues",
18+
"server": {
19+
"type": "uv",
20+
"entry_point": "main.py",
21+
"mcp_config": {
22+
"command": "uv",
23+
"args": ["run", "--directory", "${__dirname}", "main.py"],
24+
"env": {
25+
"TELEGRAM_API_ID": "${user_config.api_id}",
26+
"TELEGRAM_API_HASH": "${user_config.api_hash}",
27+
"TELEGRAM_SESSION_STRING": "${user_config.session_string}",
28+
"TELEGRAM_ALLOWED_CHAT_IDS": "${user_config.allowed_chat_ids}",
29+
"TELEGRAM_ALLOWED_ROOTS": "${user_config.allowed_root}"
30+
}
31+
}
32+
},
33+
"user_config": {
34+
"api_id": {
35+
"type": "string",
36+
"title": "API ID",
37+
"description": "From https://my.telegram.org/apps",
38+
"required": true
39+
},
40+
"api_hash": {
41+
"type": "string",
42+
"title": "API hash",
43+
"description": "From https://my.telegram.org/apps",
44+
"required": true,
45+
"sensitive": true
46+
},
47+
"session_string": {
48+
"type": "string",
49+
"title": "Session string",
50+
"description": "Generate it with session_string_generator.py (see the README). Anyone holding it has full access to your account.",
51+
"required": true,
52+
"sensitive": true
53+
},
54+
"allowed_chat_ids": {
55+
"type": "string",
56+
"title": "Allowed chats",
57+
"description": "Optional comma-separated chat IDs or @usernames. When set, every other chat is hidden from Claude.",
58+
"required": false,
59+
"default": ""
60+
},
61+
"allowed_root": {
62+
"type": "directory",
63+
"title": "Files directory",
64+
"description": "Optional directory that file tools (send_file, download_media, ...) may read from and write to.",
65+
"required": false,
66+
"default": ""
67+
}
68+
},
69+
"compatibility": {
70+
"platforms": ["darwin", "linux", "win32"],
71+
"runtimes": {
72+
"python": ">=3.10"
73+
}
74+
},
75+
"keywords": ["telegram", "telethon", "messaging", "chat"],
76+
"license": "Apache-2.0"
77+
}

0 commit comments

Comments
 (0)