bale-mcp-server
Production-grade Model Context Protocol (MCP) server for Bale Messenger with 32 tools for LLMs (Claude, Cursor, Antigravity) to interact with user accounts.
Install / Use
claude mcp add aminmadaniofficial -- npx -y github:aminmadaniofficial/bale-mcp-serverIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of bale-mcp-server
bale-mcp-server scores 83/100 on our quality scale, 657th of 938 AI & Machine Learning skills we index.
Its MCP Server is 7.6 KB long, well organised into 18 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 18 days ago, so bale-mcp-server is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
bale-mcp-server compared with similar skills
All 4 of these similar skills score higher than bale-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| bale-mcp-server (this skill)by aminmadaniofficial | 83 | 10 | 18d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 106.4k | 5d ago | CLAUDE.md |
| claude-memby thedotmack | 100 | 105.0k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 88.9k | 4d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.3k | today | CLAUDE.md |
Frequently asked questions
- How do I install bale-mcp-server?
- Run
claude mcp add aminmadaniofficial -- npx -y github:aminmadaniofficial/bale-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does bale-mcp-server work with?
- It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
- Is bale-mcp-server safe to use?
- It is MIT-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is bale-mcp-server still maintained?
- The repository was last updated 18 days ago, so bale-mcp-server is actively maintained.
Skill content
View source on GitHubBale MCP Server 🚀
<div align="center">Production-grade Model Context Protocol (MCP) server for Bale Messenger.
Empowers Large Language Models (LLMs) to authenticate, inspect dialogs, read histories, send messages, interact with groups, and manage contacts on Bale user accounts.
🌟 Key Highlights
- ⚡ Native Async Performance: Powered by
aiobale-pyand official Python MCP SDK (mcp.server.mcpserver). - 🔐 Multi-Account Sessions: Auto-discovers and switches between
.balesessions on disk with zero credentials re-prompting. - 📱 Interactive & Tool-based Auth: Support for interactive phone SMS login via CLI (
bale-mcp login) or programmatically via MCP tools (bale_auth_request_code,bale_auth_verify_code,bale_auth_verify_password). - 💬 Complete Messaging Ecosystem: Send, reply, edit, delete, forward, pin, and mark read across private chats, groups, and channels.
- 👥 Contacts & Profile Search: Query users by
@usernameor phone number, fetch full profiles, manage contacts, and block/unblock. - 📢 Groups & Channels Management: Inspect settings, member counts, invite users, generate invite URLs, and manage participant states.
- ⚡ Reactions & Presence: Send and remove emoji reactions (
👍,❤️,🔥) and broadcast typing indicators. - 🛡️ Zero Data Leakage: Session keys and
.baletokens remain strictly local and are protected by.gitignore.
📦 Architecture
LLM Client (Claude Desktop / Cursor / Antigravity / Cline)
│
│ JSON-RPC (STDIO / SSE / Streamable HTTP)
▼
Bale MCP Server
│
Session Connection Pool
│
aiobale Async Client (WebSockets / Protobuf)
▼
Bale Messenger Network
🛠️ Complete MCP Tools Catalog (34 Tools)
🔐 Authentication & Session Management
| Tool Name | Description |
| :--- | :--- |
| bale_list_sessions | List all available Bale user sessions/accounts stored locally on disk. |
| bale_connect_session | Connect or switch to a specific Bale account using session name or phone. |
| bale_get_me | Get profile information and connection status of the active account. |
| bale_auth_request_code | Request an SMS/Bale verification code for a new account login. |
| bale_auth_verify_code | Verify SMS/Bale authentication code to save a new .bale session. |
| bale_auth_verify_password | Submit Two-Factor Authentication (2FA) cloud password if required. |
| bale_disconnect | Disconnect the active account session. |
💬 Messaging & Dialogs
| Tool Name | Description |
| :--- | :--- |
| bale_get_dialogs | Retrieve recent chats, groups, and channels with resolved titles/names, unread counts, and last messages. |
| bale_search_dialogs | Search dialogs and groups by title/name (in Persian or English) or chat ID. |
| bale_get_chat_history | Fetch recent message history from a chat, group, or channel. |
| bale_send_message | Send a text message to a user, group, or channel with optional reply support. |
| bale_edit_message | Edit an existing text message or media caption (automatic media fallback). |
| bale_edit_media_caption | Update caption of existing media (photos, videos, GIFs, docs) with metadata sanitization. |
| bale_batch_edit_messages| Batch edit multiple messages/captions in a single call with anti-flood throttling. |
| bale_delete_message | Delete a message from a chat (for self or everyone). |
| bale_forward_message | Forward an existing message to another chat or user. |
| bale_mark_chat_read | Mark all messages in a chat or group as read. |
| bale_pin_message | Pin a message in a private chat or group. |
👥 Contacts & Users
| Tool Name | Description |
| :--- | :--- |
| bale_get_contacts | Retrieve the saved contact list from the active account. |
| bale_search_user | Search for a user, bot, group, or channel by username or phone number. |
| bale_get_user_info | Get detailed profile information (name, about, username) by user ID. |
| bale_import_contacts | Import one or more contacts by phone number and name into the address book. |
| bale_block_user | Block a user by user ID. |
| bale_unblock_user | Unblock a previously blocked user by user ID. |
| bale_get_blocked_users | List all users currently blocked by the active account. |
📢 Groups & Channels
| Tool Name | Description |
| :--- | :--- |
| bale_get_group_info | Retrieve full information, settings, member count, and permissions for a group. |
| bale_get_group_members | Retrieve the list of members in a group or channel. |
| bale_create_group | Create a new group or broadcast channel with initial members. |
| bale_invite_to_group | Invite one or more users to an existing group or channel. |
| bale_get_group_invite_url| Get the permanent invitation link (URL) for a group or channel. |
| bale_leave_group | Leave a group or channel. |
⚡ Reactions & Presence
| Tool Name | Description |
| :--- | :--- |
| bale_send_reaction | Add an emoji reaction (👍, ❤️, 🔥) to a specific message. |
| bale_remove_reaction | Remove an emoji reaction from a message. |
| bale_send_typing | Send a typing indicator to a chat or group. |
🚀 Installation & Setup
1. Prerequisites
- Python 3.10 or higher
uv(recommended) or standardpip
2. Install from Repository
git clone https://github.com/aminmadaniofficial/bale-mcp-server.git
cd bale-mcp-server
uv venv
source .venv/bin/activate
uv pip install -e .
3. Log In to Your Bale Account
You can authenticate directly using the built-in CLI:
bale-mcp login --phone 989XXXXXXXXX
This requests an SMS code and saves the session securely in ./sessions/<phone>.bale.
To view existing sessions:
bale-mcp list-sessions
🔌 MCP Client Configuration
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"bale": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/bale-mcp-server",
"run",
"bale-mcp",
"run"
],
"env": {
"BALE_SESSIONS_DIR": "/absolute/path/to/bale-mcp-server/sessions"
}
}
}
}
Antigravity IDE (mcp_config.json)
{
"mcpServers": {
"bale": {
"command": "/absolute/path/to/bale-mcp-server/.venv/bin/bale-mcp",
"args": ["run"],
"env": {
"BALE_SESSIONS_DIR": "/absolute/path/to/bale-mcp-server/sessions"
}
}
}
}
🧪 Testing
Run the automated test suite:
pytest -v
📄 License
This project is licensed under the MIT License.
Related Skills
Agent-Reach
106.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
claude-mem
105.0kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
88.9kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
78.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
