Content
# Claude Code Server Setup
> Complete architecture for running Claude Code on a Linux server: Telegram and VK bots as interface, MCP servers for Gmail/Codex/Telegram, and a manager with a team of 70+ specialized agents.
## What is this
A ready-to-use infrastructure that turns a server into an AI workspace:
```
Telegram / VK
│
▼
[Bot] ──────────────────────────────────────────┐
│ │
▼ ▼
[Claude Code CLI] [MCP Servers]
│ │
├── /root (normal mode) ├── Telegram → send_message/photo/doc
│ ├── Gmail → read/send/search emails
└── /root/codezone (work zone) └── Codex → code review / generation
│
▼
[Manager] ← CLAUDE.md with a catalog of 70+ agents
│
┌────────┴────────┐
▼ ▼
frontend backend
python-pro security-auditor
debugger llm-architect ...
```
## Features
### Bots (Telegram + VK)
- 💬 Communicate with Claude directly from the messenger
- 🔄 Session management — `/save`, `/resume`, named sessions
- 🤖 Custom agents — system prompt, model, directory, allowed tools
- 📁 Change working directory on the fly — `/cd`
- 🖥 Server status via SSH (CPU / RAM / Disk)
- 🔁 Reboot remote servers with one button
- 🔧 Work zone — special mode for serious tasks
### MCP Servers
| Server | Capabilities |
|--------|-----------|
| **Telegram** | `send_message`, `send_photo`, `send_document` — Claude sends you files |
| **Gmail** | read, search, send, reply to emails |
| **Codex** | code review, generation, explanation, security audit via OpenAI |
### Work Zone (`/zone`)
The manager analyzes the task and assembles a team of required agents:
```
🎯 Task: add OAuth to FastAPI
📦 Team:
• backend — server logic and routes
• security-auditor — vulnerability check in auth-flow
• api-designer — correct endpoint structure
Okay? (yes / remove X, add Y)
```
The catalog includes 70+ agents: `frontend`, `backend`, `python-pro`, `typescript-pro`, `golang-pro`, `llm-architect`, `debugger`, `penetration-tester`, `ml-engineer`, `devops`, `kubernetes`, and more.
## Repository Structure
```
claude-server-setup/
├── tgbot/
│ ├── bot.py — Telegram bot
│ ├── telegram_mcp.py — MCP: send to Telegram
│ ├── codex_mcp.py — MCP: OpenAI Codex
│ ├── codex_client.py — Codex API client
│ ├── .env.example
│ └── tgbot.service — systemd unit
├── vkbot/
│ ├── bot.py — VK bot (same functionality)
│ ├── .env.example
│ └── vkbot.service
├── gmail_mcp/
│ ├── server.py — MCP: Gmail
│ ├── auth.py — OAuth authorization
│ └── .env.example
├── codezone/
│ └── CLAUDE.md — manager with a catalog of 70+ agents
├── CLAUDE.md — instructions for Claude (MCP, infra)
├── claude-settings.json — Claude Code + MCP config
└── .gitignore
```
## Installation
### Requirements
- Linux server (Ubuntu 22.04+)
- Python 3.11+
- Claude Code CLI: `npm install -g @anthropic-ai/claude-code`
- `sshpass` for SSH: `apt install sshpass`
### 1. Clone the repository
```bash
git clone https://github.com/nurrikim845-boop/claude-server-setup.git /root/claude-setup
```
### 2. Telegram Bot
```bash
cd /root/claude-setup/tgbot
python3 -m venv venv
venv/bin/pip install python-telegram-bot python-dotenv
cp .env.example .env
nano .env # BOT_TOKEN, ALLOWED_USER_ID, SERVER*_IP/PASS
cp tgbot.service /etc/systemd/system/
systemctl enable --now tgbot
```
### 3. VK Bot
```bash
cd /root/claude-setup/vkbot
python3 -m venv venv
venv/bin/pip install vkbottle python-dotenv
cp .env.example .env
nano .env # VK_TOKEN, ALLOWED_USER_ID
cp vkbot.service /etc/systemd/system/
systemctl enable --now vkbot
```
### 4. Gmail MCP
```bash
cd /root/claude-setup/gmail_mcp
python3 -m venv venv
venv/bin/pip install google-auth google-auth-oauthlib google-api-python-client mcp fastmcp
# Download credentials.json from Google Cloud Console → OAuth 2.0 Desktop
python3 auth.py # opens browser, saves token.json
```
### 5. Claude Code Settings
```bash
cp /root/claude-setup/claude-settings.json ~/.claude/settings.json
cp /root/claude-setup/CLAUDE.md ~/CLAUDE.md
```
### 6. Work Zone
```bash
mkdir -p /root/codezone
cp /root/claude-setup/codezone/CLAUDE.md /root/codezone/CLAUDE.md
```
## Server Configuration
Add remote servers to `.env` of bots:
```env
SERVER1_NAME=my-vps
SERVER1_IP=1.2.3.4
SERVER1_PASS=ssh_password
SERVER2_NAME=backup-vps
SERVER2_IP=5.6.7.8
SERVER2_PASS=ssh_password
```
> **Note:** connection via `sshpass` — quick start for personal use. For production, SSH keys are recommended: `ssh-keygen` + `ssh-copy-id root@server`.
## Environment Variables
| Variable | Where | Description |
|-----------|-----|----------|
| `BOT_TOKEN` | `tgbot/.env` | Token from @BotFather |
| `ALLOWED_USER_ID` | `tgbot/.env` | Your Telegram ID |
| `VK_TOKEN` | `vkbot/.env` | VK community token |
| `OPENAI_API_KEY` | `~/.env` | OpenAI key for Codex |
| `SERVER{N}_IP` | `.env` | Remote server IP |
| `SERVER{N}_PASS` | `.env` | SSH password |
## Agents in Work Zone
<details>
<summary>Show all 70+ agents</summary>
**Core development:** `frontend`, `backend`, `fullstack`, `api-designer`, `graphql-architect`, `websocket-engineer`, `mobile`
**Languages:** `python-pro`, `typescript-pro`, `golang-pro`, `rust-engineer`, `java-architect`, `php-pro`, `ruby-pro`, `swift-engineer`, `kotlin-pro`
**Infrastructure:** `cloud-architect`, `devops`, `kubernetes`, `terraform`, `sre`, `security-engineer`, `azure-deploy`, `github-actions`
**Quality:** `code-reviewer`, `debugger`, `penetration-tester`, `performance-engineer`, `a11y-tester`, `security-auditor`, `webapp-testing`, `tdd`
**Data & AI:** `data-scientist`, `ml-engineer`, `mlops`, `llm-architect`, `prompt-engineer`, `postgres-pro`, `nlp-engineer`
**DX:** `refactoring-specialist`, `documentation-engineer`, `cli-developer`, `mcp-developer`, `build-engineer`
**Domains:** `blockchain`, `fintech`, `gamedev`, `iot-engineer`, `mobile-app-builder`
**Business:** `technical-writer`, `ux-researcher`, `scrum-master`
**Orchestration:** `subagent-driven-development`, `multi-agent-coordinator`, `requesting-code-review`
**Research:** `brainstorming`, `systematic-debugging`, `competitive-analyst`, `grill-with-docs`
</details>
## Based on
- [Claude Code Handbook](https://github.com/sfrangulov/claude-code-handbook-ru) — catalog of agents, skills, and MCP servers
- [Claude Code CLI](https://docs.claude.com/en/docs/claude-code/overview) — Anthropic
## License
MIT
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds