Installation
Prerequisites
- Bun runtime
- A Telegram Bot Token from BotFather
- Claude Code CLI installed globally
Clone the project
git clone https://github.com/reysamysam/tg-claude-bridge.gitcd tg-claude-bridgeInstall dependencies
# Install root dependenciesbun install
# Build the MCP server (required before root build)cd mcp-server && bun install && bun run build && cd ..
# Type-check everythingbun run buildCreate your bot
- Open Telegram and chat with BotFather.
- Send
/newbotand follow the prompts to get your bot token. - Optionally set a bot username via
/setnameand description via/setdescription.
Configure environment
Create a .env file in the project root:
TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyzWHITELIST=111222333,444555666TELEGRAM_BOT_TOKEN— your bot token from BotFather (required)WHITELIST— comma-separated Telegram user IDs who are allowed to use the bot (required)
See Environment Variables for all available options.
Run the bot
# Development (hot reload with bun)bun --watch src/index.ts
# Productionbun startThe bot will log the sessions directory and start long-polling. Send /start to your bot to begin.
Updating
git pullcd mcp-server && bun install && bun run build && cd ..bun run buildbun startUninstalling
# Stop the botpkill -f "bun.*index.ts"
# Remove sessions and workspace datarm -rf ./sessions
# Remove dependenciesrm -rf node_modules mcp-server/node_modules