Bale Bot
v0.3.2Private, local Bale bot for agents: read, search and answer messages, ask and wait, files.
Values you need
| Variable | What it is | |
|---|---|---|
BALE_BOT_TOKEN | required secret | Bot token from @botfather in Bale (https://ble.ir/botfather). |
BALE_ALLOWED_CHATS | optional | Comma-separated chat ids or @usernames the bot may read and message; all other chats are ignored. Recommended. |
BALE_MCP_DB | optional | Local message history file (default ~/.bale-mcp/messages.db); ':memory:' keeps nothing on disk. |
BALE_MCP_SEND_DIRS | optional | Folders bot_send_file may upload local files from (os.pathsep-separated); default is the download folder and the working directory. |
BALE_MCP_PROXY | optional | Optional HTTP proxy URL for every request; system proxy settings are ignored. |
PyPI (uvx) discovery passed
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add bale-mcp -e 'BALE_BOT_TOKEN=<BALE_BOT_TOKEN>' -- uvx bale-mcp==0.3.2Add to
claude_desktop_config.json{
"mcpServers": {
"bale-mcp": {
"args": [
"bale-mcp==0.3.2"
],
"command": "uvx",
"env": {
"BALE_BOT_TOKEN": "<BALE_BOT_TOKEN>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"bale-mcp": {
"args": [
"bale-mcp==0.3.2"
],
"command": "uvx",
"env": {
"BALE_BOT_TOKEN": "<BALE_BOT_TOKEN>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "BALE_BOT_TOKEN",
"id": "bale-bot-token",
"password": true,
"type": "promptString"
}
],
"servers": {
"bale-mcp": {
"args": [
"bale-mcp==0.3.2"
],
"command": "uvx",
"env": {
"BALE_BOT_TOKEN": "${input:bale-bot-token}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.bale-mcp]
command = "uvx"
args = ["bale-mcp==0.3.2"]
env = { "BALE_BOT_TOKEN" = "<BALE_BOT_TOKEN>" }For AI agents
- Ask the user for: BALE_BOT_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: bot_get_me, bot_get_chat, bot_get_webhook_info, bot_send_message, bot_send_file, bot_edit_message, bot_delete_message, bot_get_new_messages, ….
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json