cc-connect — Local AI Agent ↔ IM Bridge

What it is

Open-source tool that bridges local AI coding agents (Claude Code, Codex, Cursor, Gemini CLI, etc.) to 12 messaging platforms (Telegram, Feishu, DingTalk, Slack, Discord, WeChat Work, Weixin, QQ, etc.). Lets you control local AI agents from your phone or any device with the IM client.

Why we use it

  • No public IP / no domain / no HTTPS cert needed — Telegram uses long-polling
  • Single binary — npm install or download from releases
  • Multi-agent, multi-platform — one cc-connect process can manage multiple agent × platform pairs
  • Web admin UIcc-connect web
  • Daemon mode — runs as Windows service / systemd / launchd
  • 40+ slash commands/mode, /model, /shell, /dir, /cron, etc.
  • Telegram topics supported — each topic = independent session

Telegram specifics

Connection type

Long polling. cc-connect polls https://api.telegram.org/bot<token>/getUpdates continuously.

Bot setup

  1. In Telegram, message @BotFather
  2. Send /newbot → set display name → set username (must end with bot)
  3. Save the bot token (e.g. 1234567890:ABCdef...)
  4. To find your own user_id: message @userinfobot

Config (TOML) minimum viable

data_dir = "D:/cc-connect-data"   # C: is 91% full on IDA PC
 
[[projects]]
name = "my-project"
admin_from = "5671991810"         # your user_id (only you can run /shell etc.)
 
[projects.agent]
type = "claudecode"
 
[projects.agent.options]
work_dir = 'H:\My Drive\Jakephone\Obsidian Vault'
mode = "bypassPermissions"
 
[[projects.platforms]]
type = "telegram"
 
[projects.platforms.options]
token = "<bot token from BotFather>"
allow_from = "5671991810"         # restrict to your user_id

Common mistakes

  • admin_from must be at project level under [[projects]], not under [projects.platforms.options]. If misplaced, it’s silently ignored.
  • Forgetting to unset CLAUDECODE before running cc-connect from inside a Claude Code session — the inner claude will refuse to start.

Install on IDA PC [IDAPC]

npm install -g cc-connect
# Binary: C:\Users\IDA\AppData\Roaming\npm\cc-connect.cmd
# Version verified 2026-06-02: v1.3.2

Run

cc-connect                                   # default config: ./config.toml or ~/.cc-connect/config.toml
cc-connect --config /path/to/config.toml     # explicit
cc-connect web                               # open web admin UI
cc-connect daemon install --config <path>    # install as Windows service

Clauke (Jakephone’s new Telegram bot)

  • Bot name: Clauke_bot
  • Bot ID: 8585919037
  • Created: 2026-06-02
  • User (Sozo): chat_id = user_id = 5671991810
  • Config: [IDAPC] C:\Users\IDA\.cc-connect\config.toml
  • Work dir: vault root → cc-connect can read/write any *.md in the vault
  • Agent: claudecode (Claude Code CLI) with MiniMax-M3

See cc-connect for full agent doc.

Security checklist

  • Bot token obtained from @BotFather
  • allow_from and admin_from restricted to Sozo’s user_id
  • data_dir on D: (not C:)
  • Config file at ~/.cc-connect/config.toml (user-only readable)
  • ⚠️ Rotate bot token — token was shared in plain text during setup; revoke via @BotFather → /mybots → Clauke → API Token → Revoke
  • Move token to env var (%TELEGRAM_BOT_TOKEN%) after rotation, reference in config as token = "${TELEGRAM_BOT_TOKEN}"