telebiz-mcp

Access Telegram data via MCP using the telebiz-tt browser client. Lists chats, reads messages, searches, manages folders, and sends messages through an authenticated Telegram session.

3,891 stars

Best use case

telebiz-mcp is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Access Telegram data via MCP using the telebiz-tt browser client. Lists chats, reads messages, searches, manages folders, and sends messages through an authenticated Telegram session.

Teams using telebiz-mcp should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/telebiz-mcp-skill/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/acastellana/telebiz-mcp-skill/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/telebiz-mcp-skill/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How telebiz-mcp Compares

Feature / Agenttelebiz-mcpStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Access Telegram data via MCP using the telebiz-tt browser client. Lists chats, reads messages, searches, manages folders, and sends messages through an authenticated Telegram session.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# telebiz-mcp

MCP integration for Telegram via telebiz-tt browser client.

## Quick Rules (read this first)
- **Rate limits are strict**: max 20 calls/request, 30 calls/min, 500ms between calls, heavy ops 1s.
- For adding many chats to folders: **do NOT use `batchAddToFolder` with multiple chatIds** (known bug). Loop `addChatToFolder` sequentially.
- For CRM linking: `linkEntityToChat` is **unstable** in our tests. We observed `company` failing with Validation error, and at one point `organization` succeeding — but later `organization` also failed. Treat `linkEntityToChat` as unreliable until upstream clarifies schema/feature flags.
- Prefer reversible operations and clean up test artifacts (folders, groups) immediately.

## Architecture

```
┌──────────────┐     ┌──────────────────┐     ┌─────────────────┐
│ Clawdbot     │────▶│ MCP Server       │────▶│ WebSocket Relay │
│ (mcporter)   │     │ (stdio)          │     │ (port 9716)     │
└──────────────┘     └──────────────────┘     └────────┬────────┘
                                                       │
                                                       ▼
                                              ┌─────────────────┐
                                              │ Browser         │
                                              │ (telebiz-tt)    │
                                              │ [executor]      │
                                              └─────────────────┘
```

## Quick Setup

### Prerequisites
- Node.js 18+
- Telegram account

### 1. Install telebiz-mcp

```bash
npm install -g @telebiz/telebiz-mcp
```

### 2. Open Telebiz in browser

Go to **https://telebiz.io** and login with your Telegram account.

### 3. Start the HTTP server

```bash
cd ~/clawd/skills/telebiz-mcp
./start-http.sh
```

This starts a persistent server that:
- Runs telebiz-mcp internally
- Keeps browser connection alive  
- Exposes HTTP API on port 9718

### 4. Enable MCP in Telebiz

In telebiz.io: **Settings → Agent → Local MCP**

The status should show "Connected" once the server is running.

### 4. Verify connection

```bash
# Quick health check
cd ~/clawd/skills/telebiz-mcp
npm run health

# Should show:
# 📱 Telebiz MCP Status
# ────────────────────
# Relay: ✅ Running
# Executor: ✅ Connected
# Tools: 31 available
```

### 5. Test via mcporter

```bash
cd ~/clawd
mcporter call telebiz.listChats limit:5
```

## Health Monitoring

### Manual Check

```bash
# Check status
npm run health

# JSON output for automation
node dist/health.js --json
```

### Monitor Script

The monitor tracks state changes and can be used with cron:

```bash
# Check and alert on changes
npm run monitor

# Quiet mode - only output on state change
node dist/monitor.js --quiet

# JSON output
node dist/monitor.js --json
```

Exit codes:
- `0` = Healthy (relay up, executor connected)
- `1` = Degraded (relay up, executor disconnected)
- `2` = Down (relay not running)
- `3` = State changed (for alerting)

### Cron Integration

Add to crontab for periodic monitoring:

```bash
# Check every 5 minutes, alert on changes
*/5 * * * * cd ~/clawd/skills/telebiz-mcp && node dist/monitor.js --quiet >> /var/log/telebiz-monitor.log 2>&1
```

### Heartbeat Integration

Add to `HEARTBEAT.md` for Clawdbot monitoring:

```markdown
### Telebiz MCP (every 2h)
- [ ] Run: `cd ~/clawd/skills/telebiz-mcp && npm run health`
- [ ] If degraded/down: Alert Albert via Telegram
```

## Available Tools

### Chat Tools
| Tool | Description |
|------|-------------|
| `listChats` | List chats with filters (type, unread, archived, etc.) |
| `getChatInfo` | Get detailed chat information |
| `getCurrentChat` | Get currently open chat |
| `openChat` | Navigate to a chat |
| `archiveChat` | Archive a chat |
| `unarchiveChat` | Unarchive a chat |
| `pinChat` | Pin a chat |
| `unpinChat` | Unpin a chat |
| `muteChat` | Mute notifications |
| `unmuteChat` | Unmute notifications |
| `deleteChat` | Delete/leave chat ⚠️ |

### Message Tools
| Tool | Description |
|------|-------------|
| `sendMessage` | Send text message (markdown supported) |
| `forwardMessages` | Forward messages between chats |
| `deleteMessages` | Delete messages ⚠️ |
| `searchMessages` | Search globally or in a chat |
| `getRecentMessages` | Get message history |
| `markChatAsRead` | Mark all messages as read |

### Folder Tools
| Tool | Description |
|------|-------------|
| `listFolders` | List all chat folders |
| `createFolder` | Create a new folder |
| `addChatToFolder` | Add chat to folders |
| `removeChatFromFolder` | Remove chat from folders |
| `deleteFolder` | Delete a folder ⚠️ |

### Member Tools
| Tool | Description |
|------|-------------|
| `getChatMembers` | List group/channel members |
| `addChatMembers` | Add users to group |
| `removeChatMember` | Remove user from group |
| `createGroup` | Create a new group |

### User Tools
| Tool | Description |
|------|-------------|
| `searchUsers` | Search by name/username |
| `getUserInfo` | Get user details |

### Batch Tools
| Tool | Description |
|------|-------------|
| `batchSendMessage` | Send to multiple chats |
| `batchAddToFolder` | Add multiple chats to folder |
| `batchArchive` | Archive multiple chats |

## Usage Examples

### Find chats waiting for my reply
```bash
mcporter call telebiz.listChats iAmLastSender=false hasUnread=true limit:20
```

### Find stale conversations I started
```bash
mcporter call telebiz.listChats iAmLastSender=true lastMessageOlderThanDays:7 limit:20
```

### Search all messages
```bash
mcporter call telebiz.searchMessages query="invoice" limit:20
```

### Search in specific chat
```bash
mcporter call telebiz.searchMessages query="meeting" chatId=-1001234567890 limit:10
```

### Send message
```bash
mcporter call telebiz.sendMessage chatId=-1001234567890 text="Hello from Clawdbot!"
```

### Get recent messages
```bash
mcporter call telebiz.getRecentMessages chatId=-1001234567890 limit:50
```

### Paginate through history
```bash
# Page 1 (newest 50)
mcporter call telebiz.getRecentMessages chatId=-1001234567890 limit:50 offset:0

# Page 2 (messages 51-100)
mcporter call telebiz.getRecentMessages chatId=-1001234567890 limit:50 offset:50
```

### Organize chats
```bash
# List folders
mcporter call telebiz.listFolders

# Add chats to folder
mcporter call telebiz.batchAddToFolder chatIds='["-1001234","-1001235"]' folderId:5
```

## Rate Limiting

The browser enforces rate limits to prevent Telegram flood protection:
- **Max calls per request**: 20
- **Max calls per minute**: 30
- **Min delay between calls**: 500ms
- **Delay for heavy operations** (send/forward/delete): 1s

(These values come from the Telebiz UI and are the effective limits we observed in practice.)

## Known Issues / Workarounds (Feb 2026)

### `batchAddToFolder` fails for multiple chatIds
Observed behavior:
- `batchAddToFolder(folderId, chatIds=[one])` works (or reports `alreadyIncluded`)
- `batchAddToFolder(folderId, chatIds=[two or more])` fails with: **"Error: Failed to update folder"**
- Repro confirmed for both:
  - Auto + another **group**
  - Auto + a **private** chat

**Workaround:** loop sequentially:
- `addChatToFolder(chatId=A, folderIds=[folderId])`
- `addChatToFolder(chatId=B, folderIds=[folderId])`

### `linkEntityToChat` is unstable / schema mismatch
Observed behavior (Feb 2026):
- `linkEntityToChat` returns **"Validation error"** for `entityType=deal`, `contact`, and `company`.
- In one run, using `entityType="organization"` successfully linked a HubSpot company to a chat — but later `organization` also returned **"Validation error"**.

**Implication:** this tool is either behind a feature flag, has changing server-side validation, or the published schema/enums don’t match what the backend expects.

**Workaround:**
- Prefer linking via `createContact/createDeal/createCompany` (these link to the chat at creation time).
- Use `associateEntities` to connect deal↔company/contact.
- Don’t depend on `linkEntityToChat` until upstream provides a stable contract + better error messages.

## Troubleshooting

### Relay not starting
```bash
# Check if port is in use
ss -tlnp | grep 9716

# Kill existing process
pkill -f "relay.js"

# Start fresh
./start-relay.sh
```

### Browser not connecting
1. Verify relay is running: `npm run health`
2. Check browser console (F12) for WebSocket errors
3. Ensure MCP is enabled in Settings → Agent → Enable MCP
4. Try refreshing the telebiz-tt page

### "Executor not connected" error
The browser tab with telebiz-tt must be:
- Open and visible (not suspended)
- Logged into Telegram
- MCP enabled in settings

### Rate limit errors
- Reduce batch sizes
- Add delays between operations
- Be more specific in filters to reduce API calls

### Session expired
If Telegram session expires:
1. Refresh the telebiz-tt browser page
2. Re-login if prompted
3. Re-enable MCP in settings

## Configuration

### Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `TELEBIZ_PORT` | `9716` | Relay WebSocket port |
| `TELEBIZ_RELAY_URL` | `ws://localhost:9716` | Relay URL for MCP server |
| `TELEBIZ_STATE_FILE` | `~/.telebiz-mcp-state.json` | Monitor state file |

### mcporter Config

Located at `~/clawd/config/mcporter.json`:

```json
{
  "mcpServers": {
    "telebiz": {
      "url": "http://localhost:9718/mcp"
    }
  }
}
```

**Note**: Use the HTTP URL (not stdio) to avoid spawning conflicts.

## Security Notes

- The browser holds your Telegram session - keep it secure
- Don't expose the relay port (9716) to the internet
- Review tool calls before executing destructive operations
- Rate limits help prevent accidental spam

Related Skills

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity

Meeting Prep

3891
from openclaw/skills

Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.

Workflow & Productivity

self-improvement

3891
from openclaw/skills

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Agent Intelligence & Learning

botlearn-healthcheck

3891
from openclaw/skills

botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.

DevOps & Infrastructure

linkedin-cli

3891
from openclaw/skills

A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.

Content & Documentation

notebooklm

3891
from openclaw/skills

Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。

Data & Research

小红书长图文发布 Skill

3891
from openclaw/skills

## 概述

Content & Documentation