Claude that works after you close the terminal.
Claude Code + Telegram = Your 24/7 AI development partner
uv tool install mrstack # 1. Install
mrstack init # 2. Setup (enter Telegram token + User ID)
mrstack start # 3. Go! (test run, needs terminal open)
mrstack daemon # 4. Register daemon → runs 24/7, even after closing terminalSend any message to your bot on Telegram. If it replies, you're done.
No
uv? Usepip install mrstackinstead.mrstack initautomatically checks and installs dependencies (including claude-code-telegram).
All CLI commands
mrstack init # Setup wizard
mrstack start # Start bot
mrstack start --bg # Start in background
mrstack stop # Stop bot
mrstack daemon # Register as system daemon (auto-start on reboot)
mrstack daemon -u # Unregister daemon
mrstack status # Show status
mrstack logs -f # Follow logs
mrstack config # Edit settings
mrstack jarvis on/off # Toggle Jarvis mode
mrstack patch # Re-install modules
mrstack update # Update to latest version
mrstack version # Show version info
An always-on Telegram AI partner built on Claude Code.
It works 24/7 — even when your terminal is closed, your MacBook lid is shut, or you're away. If Claude Code is chained to the terminal, Mr.Stack is Claude in your pocket.
A typical AI assistant is a call center — it answers only when asked. Mr.Stack is a senior colleague sitting next to you, looking at the same screen.
Give Claude instructions with a single Telegram message.
- Write / edit / debug / refactor code
- Process files, photos, and voice messages
- Voice in, voice out (Whisper + TTS)
- Auto-analyze clipboard content (error → root cause, URL → summary, code → review)
The easiest way to use Mr.Stack. Drop any link, doc, or file into Telegram and say "learn this".
[You] https://docs.example.com/api-guide
Learn this
[Mr.Stack] Analyzed the API guide:
- Auth: Bearer token
- Rate limit: 100req/min
- 12 main endpoints
Saved to memory. Ask me anything about this API later.
PDFs, web pages, code files, images — send anything and it reads and remembers. Later, ask "what was the auth method in that API doc?" and it answers instantly.
Most AIs reset when you close the window. Mr.Stack remembers.
- Every 3 hours, conversations are analyzed and meaningful info is saved permanently
- Project progress, tech decisions, people, preferences — auto-updated
- "Continue what I was working on yesterday" → picks up exactly where you left off
- 1 year of use = ~10-15MB total storage (less than a single photo)
~/claude-telegram/memory/
people/ → People info (overwrite)
projects/ → Project progress (overwrite)
decisions/ → Decisions and reasoning (append)
preferences/ → Your preferences (overwrite)
daily/ → Daily summaries (1/day)
knowledge/ → Learned knowledge (overwrite)
patterns/ → Work pattern data
Scans your Mac every 5 minutes and reaches out when something needs attention.
| Situation | Mr.Stack's Response |
|---|---|
| Battery below 20% | "Battery at 12% — save your work" |
| Returned from away | "Welcome back. You were on feature/auth branch" |
| 3+ hours of continuous coding | "Take a break" |
| Same file for 30 min, no commits | "Are you stuck?" |
| Deep work mode (2+ hours focused) | Only critical alerts pass through |
Jarvis works best on macOS. On Linux, CPU/battery/Git monitoring works normally; active app and Chrome tab detection are macOS-only.
Analyzes your work habits and sends data-driven coaching every night:
[Daily Coach] 2026-02-28
Productivity: 8/10 (+1 from yesterday)
What went well:
2-hour morning focus block → 4 commits
Areas to improve:
7 context switches between 2-4pm — least efficient window
→ Try a single-task block during this time tomorrow
Set once, runs daily:
| Job | Schedule |
|---|---|
| Morning briefing (calendar + tasks + news) | Weekdays 08:00 |
| Evening summary + coaching report | Daily 21:00 |
| Weekly review | Fridays 18:00 |
| Calendar reminder | Weekdays 09/12/15/18 |
| Conversation → memory auto-update | Every 3 hours |
| GitHub notification check | Every 2 hours |
Model routing: Haiku for simple lookups, Sonnet for analysis, Opus for deep reviews. Costs auto-optimized.
| State | Tone | Example |
|---|---|---|
| Coding | Concise | "auth.py:42 — missing null check" |
| Deep work | Silent | Urgent only |
| Returning | Summary | "Welcome back. PR #23 awaiting review" |
| After 10pm | Concerned | "You've done enough today" |
Connect external services via MCP. Core features work without them.
| Service | Capability |
|---|---|
| Google Calendar | Events, reminders |
| Notion | Auto work log |
| GitHub | PR/issue/notification monitoring |
| Playwright | Web automation |
| Typical AI Bot | Mr.Stack | |
|---|---|---|
| Interaction | Responds when asked | Proactive alerts |
| Security | API keys sent externally | Runs only on your machine |
| Availability | Tied to terminal | 24/7 background daemon |
| Memory | Resets on close | Persistent memory |
| Learning | None | Pattern analysis + routine prediction |
| Coaching | None | Daily data-driven coaching |
| Data | Cloud | 100% local |
| Need | Where |
|---|---|
| Claude Code | claude.ai/download — Max plan recommended |
| Telegram account | telegram.org |
- Search @BotFather in Telegram → send
/newbot - Enter bot name (e.g.,
My Stack Bot) - Enter bot username (e.g.,
my_stack_bot) - Save the token (
1234567890:ABCdef...)
- Send any message to @userinfobot
- Save the numeric ID
uv tool install mrstack # Install
mrstack init # Enter token + User ID, auto-configure
mrstack start # Start!mrstack init automatically handles:
- Claude Code installation check
- claude-code-telegram install (if missing)
.envconfiguration file creation- Memory directory setup
- Jarvis mode configuration (macOS)
mrstack daemon # Register system daemon → auto-starts on reboot- Send
/mybotsto @BotFather → select your bot → Edit Botpic - Send
assets/bot-profile.png
Advanced: Install from source
git clone https://github.com/thestack-ai/mrstack.git
cd mrstack
pip install -e .
mrstack initFor development contributions or customization.
Advanced: Install with Claude Code
In Claude Code terminal:
Look at github.com/thestack-ai/mrstack and install Mr.Stack for me.
Claude reads the README and guides you through setup.
Optional: External service integrations
Google Calendar
// mcp-config.json
{
"mcpServers": {
"google-calendar": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-google-calendar"],
"env": {
"GOOGLE_CLIENT_ID": "your-id",
"GOOGLE_CLIENT_SECRET": "your-secret"
}
}
}
}Notion
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-notion"],
"env": { "NOTION_API_KEY": "ntn_..." }
}
}
}GitHub — Just run gh auth login.
Playwright — npx playwright install chromium
| Command | Description |
|---|---|
/new |
Start new conversation |
/status |
Session & cost overview |
/repo |
Switch project |
/jarvis |
Pause/resume Jarvis |
/coach |
Daily coaching report |
/jobs |
List scheduled jobs |
/voice |
Toggle voice responses |
/clipboard |
Clipboard auto-analysis |
/help |
Full command reference |
| Platform | Support Level |
|---|---|
| macOS (Ventura / Sonoma / Sequoia) | 100% — all features + daemon for 24/7 background |
| Linux | 95% — daemon supported. Jarvis active app/Chrome tab detection unavailable |
| Windows | Coming soon |
| Requirement | Version |
|---|---|
| Python | 3.11+ |
| claude-code-telegram | v1.3.0+ |
| Claude Code | Max plan recommended |
- 100% local — all data stored on your machine only. No external server transmission
- User auth — only Telegram IDs in
ALLOWED_USERSare permitted - Sandbox — Claude's file access restricted to
APPROVED_DIRECTORY - Quality gate — dangerous commands (
rm -rf,sudo,curl | sh) blocked - Only Claude API calls go through Anthropic servers (same as Claude Code itself)
Does it work with free Claude Code?
It works but hits rate limits quickly. Max plan strongly recommended. Mr.Stack itself is free (open source) with zero server costs.
Do I need an Anthropic API key?
No. It uses Claude Code's built-in authentication.
Does it really work with the lid closed?
Yes. mrstack daemon registers a system daemon:
- Auto-starts on boot, auto-restarts on crash
- Runs in background with lid closed (when connected to power)
- Accessible via Telegram from anywhere
Does it use a lot of tokens?
About 15-20 extra API calls per day. Negligible on Max plan. 5-min polling, pattern logging, and state classification use zero tokens (local only).
Is my data sent externally?
Absolutely not. All data in local files (SQLite, JSONL, Markdown).
| Layer | Technology |
|---|---|
| Runtime | Python 3.11 + asyncio |
| AI Engine | Claude Code SDK (Opus / Sonnet / Haiku) |
| Interface | Telegram Bot API |
| Process Mgmt | macOS LaunchAgent / Linux systemd |
| Storage | SQLite + JSONL + Markdown |
| Integrations | MCP (Google Calendar, Notion, Playwright) |
- Threads @thestack_ai — Updates and dev stories
- GitHub Issues — Bug reports, feature requests
- PyPI — Package
- claude-code-telegram — Base framework
MIT