TeleBotHost MCP Server
Allows managing Telegram bots via the TeleBotHost API, providing tools for bot lifecycle, storage, broadcasts, commands, community store, binary import/export, and more.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TeleBotHost MCP Serverlist all my Telegram bots"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TeleBotHost MCP Server
A production-ready Model Context Protocol server for the TeleBotHost Developer API.
Runs locally via stdio — exposes 48 tools covering 100% of the TeleBotHost Developer API (47/47 endpoints) to any MCP-compatible AI client (Claude Desktop, Cursor, Continue, Cline, etc.).
⚠️ Important: Why Local stdio (Not Cloud Hosted)
The TeleBotHost API is protected by Cloudflare bot detection, which blocks requests from datacenter IPs. This means:
Platform | Works? | Why |
Local stdio (your machine) | ✅ Yes | Uses your residential IP — Cloudflare allows it |
Vercel | ❌ No | Datacenter IP → Cloudflare 403 challenge |
Render | ❌ No | AWS datacenter IP → Cloudflare 403 challenge |
Railway | ❌ No | Datacenter IP → Cloudflare 403 challenge |
Fly.io | ❌ No | Datacenter IP → Cloudflare 403 challenge |
Self-hosted (home server) | ✅ Yes | Residential IP |
This is why the server runs locally via stdio — the standard MCP deployment pattern. Your AI client (Claude Desktop, Cursor) launches the server as a subprocess, and it makes API requests from your IP.
💡 Advanced: An HTTP server mode (
server.ts) is included for self-hosting on residential connections. See HTTP Server Mode below.
Related MCP server: Telegram Bot MCP Server
✨ Features
🔧 48 Tools — 100% coverage of the TeleBotHost Developer API (47/47 endpoints + 1 quota helper)
🏠 Runs Locally — stdio transport, uses your residential IP, no Cloudflare issues
🔐 Secure — API key in env var (set in client config), never transmitted over network
⚡ Resilient — Automatic 429 retry with exponential backoff, rate-limit header tracking
📦 Binary-Safe — Base64-encoded ZIP download/upload for
download_botandimport_bot🛡️ Safe by Design — Broadcast tool requires explicit
confirm: trueflag🧪 Tested — Compliance test suite verifies MCP spec adherence
🎯 Type-Safe — Strict TypeScript throughout, clean compile
📦 Zero-Config Install — Just
npx telebothost-mcpornpx github:sahilxteam/telebothost-mcp
🚀 Quick Start
1. Get your TeleBotHost API key
Log in to TeleBotHost
Go to Developer Settings → API Keys
Generate a key:
sk_*— Secret key (full write access) — keep privatepub_*— Public key (read-only) — safe for client-side
2. Add to your AI client
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"telebothost": {
"command": "npx",
"args": ["-y", "github:sahilxteam/telebothost-mcp"],
"env": {
"TELEBOTHOST_API_KEY": "sk_your_key_here"
}
}
}
}Note: Replace
github:sahilxteam/telebothost-mcpwithtelebothost-mcponce published to npm.
Cursor
Settings → MCP → Add Server:
{
"mcpServers": {
"telebothost": {
"command": "npx",
"args": ["-y", "github:sahilxteam/telebothost-mcp"],
"env": {
"TELEBOTHOST_API_KEY": "sk_your_key_here"
}
}
}
}VS Code (with Cline / Continue)
Add to your MCP settings:
{
"mcp.servers": {
"telebothost": {
"command": "npx",
"args": ["-y", "github:sahilxteam/telebothost-mcp"],
"env": {
"TELEBOTHOST_API_KEY": "sk_your_key_here"
}
}
}
}3. Restart & use
Restart your AI client. Try prompts like:
"List my TeleBotHost bots"
"Create a new command called /start on bot 12345"
"Browse the community store and show me the top 5 bots"
"What's my current API quota?"
📦 Alternative: Local Clone
If you prefer to clone the repo (for development or customization):
git clone https://github.com/sahilxteam/telebothost-mcp.git
cd telebothost-mcp
npm installThen in your client config, point to the local clone:
{
"mcpServers": {
"telebothost": {
"command": "node",
"args": ["--import", "tsx", "/absolute/path/to/telebothost-mcp/bin/mcp.ts"],
"env": {
"TELEBOTHOST_API_KEY": "sk_your_key_here"
}
}
}
}🛠️ Available Tools (48)
🩺 Health (1)
Tool | Description |
| API health & version probe |
🌐 Public Discovery (8) — no auth required
Tool | Description |
| Get a user's public profile |
| List a user's published bots & templates |
| Get a published bot by Telegram username |
| Get published bot README only |
| Browse shareable bot templates |
| Get a template by ID |
| Get template README |
| Browse community store (public) |
| Get a store listing (public) |
🤖 Bot Lifecycle (20) — sk_* key required for writes
Tool | Description |
| List your bots + statistics |
| Register a new bot |
| Soft-delete bots (10-day backup) |
| List soft-deleted bots |
| Recover a soft-deleted bot |
| Permanently delete from backup |
| Pin / unpin bots |
| Get single bot details |
| Update bot config |
| Generate temp JWT download URL |
| Download bot ZIP (base64-encoded binary) |
| Import bot from base64-encoded ZIP |
| Clone a bot or template |
| Clone as child (inherits env/commands) |
| List child bots of a parent |
| Transfer bot to another user |
| Reset logs & sessions |
| Toggle template status |
| Get bot README (owner) |
| Update README (template only) |
💾 Bot Storage (4)
Tool | Description |
| Sync/async storage size & metrics |
| List storage keys (no values) |
| Clear all storage (irreversible) |
| Migrate sync → async storage |
📢 Broadcasts (6)
Tool | Description |
| Start a broadcast ( |
| Real-time broadcast progress |
| Stop an active broadcast |
| Modify message body mid-run |
| Delete broadcast history record |
| List broadcasts for a bot |
⚡ Commands (5)
Tool | Description |
| List commands & folders |
| Create a new command |
| Batch delete commands |
| List soft-deleted commands (7-day recovery) |
| Recover a deleted command |
🛍️ Community Store (2)
Tool | Description |
| Browse store (authenticated) |
| Install a store bot |
📊 Quota (1)
Tool | Description |
| Check daily / per-minute / monthly limits |
🔌 MCP Protocol
This server implements the Model Context Protocol stdio transport — the standard for local AI client integration.
JSON-RPC 2.0 Methods Supported
Method | Behavior |
| Returns |
| Acknowledged (no response) |
| Returns empty |
| Returns all 48 tool definitions (name, description, inputSchema) |
| Executes a tool by name with arguments; returns |
Stdio Design
The AI client launches the server as a subprocess
Client writes JSON-RPC requests to the server's stdin
Server writes JSON-RPC responses to stdout
Server writes logs/diagnostics to stderr
Single-user, single-session — no auth headers needed
API key read from
TELEBOTHOST_API_KEYenv var (set in client config)
🚨 Error Handling
Layer 1: Protocol Errors (JSON-RPC)
Code | Meaning | When |
| Parse error | Invalid JSON in request |
| Invalid Request | Missing |
| Method not found | Unknown JSON-RPC method |
| Invalid params | Unknown tool name |
| Internal error | Unexpected exception |
Layer 2: Tool Errors (MCP isError)
When the upstream TBH API returns an error, the response includes isError: true:
{
"content": [{
"type": "text",
"text": "TeleBotHost API error 429: Rate limit exceeded. Retry after 60s."
}],
"isError": true
}Layer 3: Automatic Retry
HTTP 429 responses from the TBH API are automatically retried up to 3 times with exponential backoff (2s, 4s, 8s).
Layer 4: Cloudflare Detection
If you accidentally run in a datacenter environment, the client detects Cloudflare challenge responses (HTTP 403 + cf_chl in body) and returns a clear error message instead of the raw HTML challenge page.
🧪 Testing
Compliance Test Suite
# Test the stdio server
npm test
# Or test an HTTP deployment (advanced)
MCP_URL=http://localhost:3000/api/mcp bash scripts/test-mcp.shWhat it verifies:
initializehandshake returns correct protocol version & server infopingreturns a resulttools/listreturns exactly 48 toolsAll tools have
name+description+inputSchemaAll tools use clean names (no
telebothost_prefix)tools/callrejects unknown tools with error-32602All required tools are present (10 critical tools checked)
Manual Smoke Test
# Test stdio directly
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
TELEBOTHOST_API_KEY=sk_your_key node --import tsx bin/mcp.ts📊 API Coverage
This MCP server covers 100% of the TeleBotHost Developer API — every endpoint in the OpenAPI 3.0.3 spec is mapped to a tool.
Group | Endpoints | Tools | Coverage |
Health | 1 | 1 | ✅ 100% |
Public Discovery | 9 | 9 | ✅ 100% |
Bot Lifecycle | 20 | 20 | ✅ 100% |
Bot Storage | 4 | 4 | ✅ 100% |
Broadcasts | 6 | 6 | ✅ 100% |
Commands | 5 | 5 | ✅ 100% |
Community Store | 2 | 2 | ✅ 100% |
Quota (helper) | — | 1 | N/A (reuses |
Total | 47 | 48 | ✅ 100% |
Binary Endpoints
Two endpoints involve binary data (ZIP files), handled via base64 encoding:
Endpoint | Tool | Approach |
|
| Downloads ZIP as |
|
| Accepts base64-encoded ZIP, decodes to |
🔧 Environment Variables
Variable | Required | Description |
| Yes | TeleBotHost Developer API key ( |
| No | Override API base URL (default: |
In stdio mode, there is no
MCP_AUTH_TOKEN— the server is single-user and access is controlled by your local machine.
⏱️ Rate Limits
The TeleBotHost API enforces plan-based limits. This MCP server automatically retries on HTTP 429 with exponential backoff.
Plan | Daily | Per-min | Monthly |
FREE / FREEMIUM | 1,000 | 15 | 15,000 |
PREMIUM | 5,000 | 60 | 75,000 |
ELITE | 10,000 | 120 | 150,000 |
pub_*keys are always capped at 1,000/day, 15/min, 15,000/month regardless of plan.
Use get_quota to check remaining quota at any time.
💻 HTTP Server Mode (Optional)
⚠️ Only works on residential IPs. Cloud hosting (Vercel/Render/Railway/Fly) will be blocked by Cloudflare.
For self-hosting on a home server or VPS with residential IP, an HTTP server mode is included:
# Install
git clone https://github.com/sahilxteam/telebothost-mcp.git
cd telebothost-mcp
npm install
# Set env vars
export TELEBOTHOST_API_KEY=sk_your_key_here
# Optional: export MCP_AUTH_TOKEN=your-mcp-access-token
# Start HTTP server on port 3000
npm run serve:httpHTTP Endpoints
Method | Path | Description |
|
| Documentation page (HTML) |
|
| Alias for |
|
| JSON health probe |
|
| MCP JSON-RPC endpoint |
HTTP Auth (Two Layers)
Layer | Header | Purpose |
MCP access control |
| Restrict WHO can call your MCP |
TeleBotHost API auth |
| Per-user TBH API key (forwarded to TBH) |
📁 Project Structure
telebothost-mcp/
├── bin/
│ ├── mcp.js # Entry point shim (loads tsx, runs mcp.ts)
│ └── mcp.ts # stdio MCP server (primary entry point)
├── lib/
│ ├── types.ts # Shared types & TbhApiError
│ ├── client.ts # TeleBotHost API client (auth, retry, binary, errors)
│ ├── tools.ts # All 48 MCP tool definitions
│ └── docs.ts # HTML docs page generator (for HTTP mode)
├── scripts/
│ └── test-mcp.sh # Compliance test suite
├── server.ts # HTTP server (optional, self-hosting only)
├── render.yaml # Render.com Blueprint (with Cloudflare warning)
├── .env.example # Environment variable template
├── .nvmrc # Node version pin
├── package.json # bin field → ./bin/mcp.js
├── tsconfig.json
├── LICENSE
├── CONTRIBUTING.md
└── README.md💻 Local Development
# Install deps
npm install
# Set env var
cp .env.example .env
# Edit .env with your TELEBOTHOST_API_KEY
# Run stdio server (primary mode)
npm start
# Run HTTP server (advanced, for testing docs page)
npm run serve:http
# → http://localhost:3000
# Type-check
npm run typecheck
# Run compliance tests
npm test🗺️ Roadmap
v1.0.0 — Initial release: 46 tools, Vercel deployment
v1.1.0 — Cleaner tool names (dropped
telebothost_prefix)v1.2.0 — 100% API coverage: added
download_bot&import_bot, compliance test suitev1.3.0 — Per-request API key via
X-Tbh-Api-Keyheader (HTTP mode)v1.4.0 — Pivot to stdio (local run) — removed Vercel/Render as primary options due to Cloudflare bot detection blocking datacenter IPs
v1.5.0 — Publish to npm, Docker support, GitHub Actions CI
v2.0.0 — Cloudflare Workers transport (whitelisted by Cloudflare)
🤝 Contributing
Contributions welcome! See CONTRIBUTING.md for setup, conventions, and PR guidelines.
📄 License
🔗 Links
TeleBotHost: telebothost.com
Developer API Docs: api.telebothost.com/api/v1/docs
MCP Specification: modelcontextprotocol.io
Issues: GitHub Issues
Built with ❤️ for the TeleBotHost community
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to send and receive messages, media, and files on Telegram, and manage chats via a bot token.Last updated17MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with the Telegram Bot API, supporting messaging, user management, and bot configuration with intelligent message splitting and error handling.Last updated547MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with the Telegram Bot API, allowing them to send messages, forward messages, get bot information, and receive updates.Last updated223MIT
- Alicense-qualityBmaintenanceEnables sending Telegram messages, photos, and documents, and retrieving bot information through the Telegram Bot API.Last updated231MIT
Related MCP Connectors
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
Create, test, publish, and manage Dreamlit notification workflows from AI clients.
Build, edit, and deploy Telegram bots on FlowCastle's hosted visual flow platform.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/animexteam/telebothost-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server