# claude-code-telegram | Richard A | Knowledge Base | Instagit

A powerful Telegram bot that provides remote access to Claude Code, enabling developers to interact with their projects from anywhere with full AI assistance and session persistence.

GitHub Stars: 933

Repository: https://github.com/richardatct/claude-code-telegram

---

## Articles

### [How YAML Configuration and Thread Management Enable Topic-Based Routing in Claude Code Telegram](/richardatct/claude-code-telegram/project-registry-thread-manager-topic-based-routing)

Discover how Claude Code Telegram uses YAML configuration and thread management for efficient topic-based routing. See how project definitions and forum topics are mapped.

- Tags: internals
- Published: 2026-02-20

### [How to Configure and Enable the FastAPI Webhook API Server in Claude Code Telegram](/richardatct/claude-code-telegram/configure-fastapi-webhook-api-server-port-settings)

Configure and enable your FastAPI webhook API server for Claude Code Telegram. Learn to set environment variables like ENABLE_API_SERVER and API_SERVER_PORT for seamless integration.

- Tags: how-to-guide
- Published: 2026-02-20

### [How Authentication, Rate-Limiting, and Security Middleware Layers Work Together in Claude-Code-Telegram](/richardatct/claude-code-telegram/middleware-interaction-authentication-rate-limiting-security)

Discover how Claude-Code-Telegram middleware layers ensure security. Learn how authentication, rate limiting, and security work together to protect your Claude API from unauthorized access and abuse.

- Tags: internals
- Published: 2026-02-20

### [How Audit Logging Tracks User Actions in Claude-Code-Telegram: Implementation Guide](/richardatct/claude-code-telegram/audit-logging-implementation-user-actions-security-events)

Implement robust audit logging in Claude-Code-Telegram. Learn how the three-layer system tracks user actions, security events, and violations using an AuditEvent dataclass, Storage backends, and AuditLogger API.

- Tags: how-to-guide
- Published: 2026-02-20

### [How MessageOrchestrator Differentiates Agentic vs Classic Bot Modes in Claude Code Telegram](/richardatct/claude-code-telegram/messageorchestrator-routing-agentic-vs-classic-modes)

Discover how MessageOrchestrator route Telegram updates between agentic and classic bot modes using the agentic_mode flag. Learn the handler differences for each mode.

- Tags: internals
- Published: 2026-02-20

### [How the OS-Level Sandbox Works in Claude Code Telegram: sandbox_enabled and sandbox_excluded_commands Explained](/richardatct/claude-code-telegram/os-level-sandbox-functionality-sandbox-enabled-excluded-commands)

Explore the OS-level sandbox in Claude Code Telegram. Understand how sandbox_enabled and sandbox_excluded_commands control command execution and system access for enhanced security.

- Tags: internals
- Published: 2026-02-20

### [Security Best Practices for Deploying the Claude Code Telegram Bot: A Complete Guide to DISABLE_SECURITY_PATTERNS and Safe Configuration](/richardatct/claude-code-telegram/security-best-practices-deployment-disable-security-patterns)

Deploy the Claude Code Telegram bot securely. Learn to avoid DISABLE_SECURITY_PATTERNS, set APPROVED_DIRECTORY, and enable authentication for safe configuration. Prevent attacks.

- Tags: best-practices
- Published: 2026-02-20

### [How to Integrate Custom Authentication Providers in Claude-Code-Telegram](/richardatct/claude-code-telegram/integrate-custom-authentication-providers-whitelist-token-auth)

Learn how to integrate custom authentication providers in Claude-Code-Telegram. Implement AuthProvider and register it with AuthenticationManager for flexible access control beyond default options.

- Tags: how-to-guide
- Published: 2026-02-20

### [How the Notification Service Handles Message Delivery with Per-Chat Rate Limiting](/richardatct/claude-code-telegram/notification-service-per-chat-rate-limiting-message-delivery)

Discover how the NotificationService handles message delivery with per-chat rate limiting using asyncio sleep and last send timestamps to enforce a 1.1-second interval between messages.

- Tags: internals
- Published: 2026-02-20

### [How to Configure the Model Context Protocol (MCP) Using the `mcp_config_path` Setting](/richardatct/claude-code-telegram/configure-model-context-protocol-mcp-config-path)

Learn to configure the Model Context Protocol MCP with mcp_config_path. Discover how to set ENABLE_MCP and point MCP_CONFIG_PATH to a JSON file for seamless Claude SDK integration.

- Tags: how-to-guide
- Published: 2026-02-20

### [How Usage and Cost Tracking Works Per User and Per Session in Claude Code Telegram](/richardatct/claude-code-telegram/usage-cost-tracking-mechanisms-per-user-session)

Discover how Claude Code Telegram tracks usage and costs per user and session. Learn about its RateLimiter, Session model, and StorageFacade for detailed insights.

- Tags: deep-dive
- Published: 2026-02-20

### [How the ToolMonitor Validates Claude Tool Calls Against Predefined Allowlists](/richardatct/claude-code-telegram/toolmonitor-validate-claude-tool-calls-allowlists)

Learn how the ToolMonitor validates Claude tool calls using allowlists, disallowlists, and logging for robust security. Discover its three-stage validation process.

- Tags: how-to-guide
- Published: 2026-02-20

### [How to Configure Project Threads Mode for Effective Telegram Topic Routing](/richardatct/claude-code-telegram/configure-project-threads-mode-topic-routing)

Learn to configure project threads mode for effective Telegram topic routing. Set ENABLE_PROJECT_THREADS true and define PROJECT_THREADS_MODE for seamless chat organization. Explore the repository at RichardAtCT/claude-code-tel...

- Tags: how-to-guide
- Published: 2026-02-20

### [Event Bus Architecture in Claude-Code-Telegram: Decoupled Message Routing Explained](/richardatct/claude-code-telegram/event-bus-architecture-decoupled-message-routing)

Discover the event bus architecture in Claude-Code-Telegram. Learn how this typed, asynchronous system decouples producers and consumers with publish-subscribe for efficient message routing.

- Tags: architecture
- Published: 2026-02-20

### [How to Set Up and Authenticate GitHub Webhooks Using HMAC-SHA256 in Claude-Code-Telegram](/richardatct/claude-code-telegram/github-webhooks-hmac-sha256-authentication-api-server)

Securely authenticate GitHub webhooks using HMAC-SHA256. Learn to set up your `GITHUB_WEBHOOK_SECRET` and verify the `X-Hub-Signature-256` header in your FastAPI server.

- Tags: how-to-guide
- Published: 2026-02-19

### [Token Bucket Algorithm for Rate Limiting in Claude-Code-Telegram](/richardatct/claude-code-telegram/token-bucket-algorithm-rate-limiting-explained)

Learn how the token bucket algorithm, implemented in Python, effectively rate limits requests to the Claude Code Telegram bot balancing bursts and steady traffic.

- Tags: deep-dive
- Published: 2026-02-19

### [How the SecurityValidator Class Prevents Directory Traversal Attacks in Python](/richardatct/claude-code-telegram/securityvalidator-prevent-directory-traversal-attacks)

Discover how the SecurityValidator class prevents directory traversal attacks in Python. Learn its three-layer system for secure file handling and protect your applications.

- Tags: how-to-guide
- Published: 2026-02-19

### [Session Persistence Across User and Project Directories: Implementation Strategy in Claude Code Telegram](/richardatct/claude-code-telegram/session-persistence-implementation-user-project-directories)

Discover the session persistence strategy in Claude Code Telegram. Learn how a layered architecture with in-memory cache and SQLite ensures durable, isolated conversations bound to user ID and project path.

- Tags: internals
- Published: 2026-02-19

### [How Dual Claude Integration Works in claude-code-telegram: SDK Primary with CLI Fallback](/richardatct/claude-code-telegram/how-does-dual-claude-integration-work-sdk-cli-fallback)

Discover how claude-code-telegram's dual Claude integration uses SDK primary with CLI fallback. Learn how fallback is triggered automatically for seamless operation.

- Tags: internals
- Published: 2026-02-19

