Bridge Claude AI, Telegram, and TON Blockchain with seamless Model Context Protocol integration
A production-ready connector that enables Claude AI to interact with Telegram bots, TON blockchain operations, and JIRA project management through the Model Context Protocol (MCP). Built for developers who want to create powerful AI-powered Telegram bots with blockchain capabilities.
- Full Claude AI conversation capabilities
- User authentication and rate limiting
- Conversation history management with Redis
- Admin commands for bot management
- TON blockchain commands for wallet management
- Wallet management (create, import, balance checking)
- Send and receive TON transactions
- Transaction history and status tracking
- Jetton token support
- NFT information retrieval
- Smart contract deployment capabilities
ton_get_wallet_info- Get wallet informationton_get_balance- Check TON balanceton_send_transaction- Send TON tokenston_get_transaction_status- Check transaction statuston_get_transaction_history- View transaction historyton_validate_address- Validate TON addresseston_get_jetton_balance- Check Jetton token balanceston_get_nft_info- Get NFT information- Telegram messaging and conversation management tools
- Web interface for TON wallet management
- Real-time balance updates
- Transaction sending interface
- Transaction history viewer
- Claude AI chat integration
- Secure authentication via Telegram Web App
- Node.js 18+ and npm
- Redis server
- Telegram Bot Token
- Anthropic Claude API Key
- TON wallet mnemonic (for full functionality)
- TON API key (optional, for enhanced features)
The fastest way to get started:
# Quick setup (development)
./scripts/quick-start.sh
# Production deployment
./scripts/deploy.sh- Clone the repository:
git clone https://github.com/anthropics/telegram-claude-mcp.git
cd telegram-claude-mcp- Install dependencies:
npm install- Copy the environment configuration:
cp .env.example .env.local- Configure your
.envfile with your credentials:
# Telegram Bot Configuration
TELEGRAM_BOT_TOKEN=your_bot_token_from_botfather
TELEGRAM_WEBHOOK_DOMAIN=https://your-domain.com
TELEGRAM_WEBHOOK_PORT=3000
TELEGRAM_MINI_APP_URL=https://your-mini-app-domain.com
TELEGRAM_MINI_APP_SECRET=your_bot_token_here
# Claude API Configuration
ANTHROPIC_API_KEY=your_anthropic_api_key
CLAUDE_MODEL=claude-3-5-sonnet-20241022
CLAUDE_MAX_TOKENS=4096
# TON Blockchain Configuration
TON_NETWORK=testnet
TON_API_KEY=your_toncenter_api_key
TON_WALLET_MNEMONIC=your wallet mnemonic phrase here
TON_WALLET_VERSION=v4R2
TON_RPC_ENDPOINT=https://testnet.toncenter.com/api/v2/jsonRPC
TON_API_ENDPOINT=https://testnet.toncenter.com/api/v2
# Redis Configuration
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=
REDIS_DB=0
# MCP Server Configuration
MCP_SERVER_NAME=telegram-claude-mcp
MCP_SERVER_VERSION=1.0.0
MCP_SERVER_PORT=8080npm run dev- Build the TypeScript code:
npm run build- Start the server:
npm start- The quick-start script automatically sets up Claude Desktop integration
- Or manually add to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"telegram-claude-mcp": {
"command": "npm",
"args": ["start"],
"cwd": "/path/to/telegram-claude-mcp",
"env": {
"NODE_ENV": "production"
}
}
}
}- Restart Claude Desktop and the MCP tools will be available:
send_telegram_message- Send messages via Telegramton_get_balance- Check TON wallet balancejira_create_issue- Create JIRA issues- And 20+ more tools!
π See Claude Desktop Setup Guide for detailed instructions.
# Production with all services
./scripts/deploy.sh
# With monitoring stack
./scripts/deploy.sh --with-monitoring
# Manual Docker
docker-compose -f docker-compose.production.yml up -d- Heroku: One-click deploy with Redis addon
- DigitalOcean: App Platform deployment
- AWS: ECS/Fargate deployment
- VPS: Traditional server setup with PM2
π See Production Deployment Guide for complete instructions.
/start- Start interaction with the bot/help- Show available commands/new- Start a new conversation/clear- Clear conversation history/status- Check bot status/settings- View current settings
/wallet- View wallet information/balance [address]- Check TON balance/send <address> <amount> [comment]- Send TON tokens/tx <hash>- Check transaction status/history [address] [limit]- View transaction history
/stats- View bot statistics (admin only)/broadcast <message>- Broadcast message to all users (admin only)
- Create a Telegram Bot via @BotFather
- Set up the Mini App URL:
/setmenubutton
- Configure the webhook URL in your bot settings
- The mini app will be accessible through the bot's menu button
- MCP Server - Handles Model Context Protocol communication
- Telegram Bot - Manages user interactions via Telegram
- TON Service - Interfaces with TON blockchain
- Claude Service - Manages AI conversation capabilities
- Conversation Manager - Handles conversation state with Redis
- Mini App Server - Serves the web interface for Telegram Web App
User β Telegram Bot β MCP Server β Claude AI
β
TON Blockchain
β
Redis Storage
- Store sensitive keys in environment variables
- Use HTTPS for webhook and mini app domains
- Implement rate limiting for API endpoints
- Validate Telegram Web App data signatures
- Never expose private keys or mnemonics in code
- Use testnet for development and testing
Run tests:
npm test- Check bot token is correct
- Verify Redis is running
- Check logs for error messages
- Ensure wallet has sufficient balance
- Verify network settings (mainnet/testnet)
- Check TON API key validity
- Verify CORS settings
- Check Telegram Web App initialization
- Ensure HTTPS is configured
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
We welcome contributions! Please see CONTRIBUTING.md for details on:
- Setting up the development environment
- Code style and conventions
- Submitting pull requests
- Reporting issues
This project is licensed under the MIT License - see the LICENSE file for details.
- Anthropic MCP SDK - Model Context Protocol implementation
- TON Documentation - TON Blockchain documentation
- Telegram Bot API - Telegram Bot API reference
- Production Deployment Guide - Complete production setup
- Claude Desktop Setup - MCP integration
- Troubleshooting Guide - Common issues
- API Documentation - Technical reference
# Health check
node healthcheck.js
# Validate setup
./scripts/validate-all.sh
# View logs
docker-compose logs -f app- π GitHub Issues
- π¬ GitHub Discussions
- π Check logs first:
docker-compose logs -f
For security vulnerabilities, please email security@anthropic.com instead of using the issue tracker.