https://github.com/adityaarsharma/perch
Perch โ Telegram bot + Claude Code plugin for RunCloud server management. Servers under one wing. Always free.
https://github.com/adityaarsharma/perch
claude claude-code claude-desktop devops linux-server mcp mcp-server model-context-protocol nginx runcloud runcloud-api self-healing server-automation server-health server-management server-monitoring ssh telegram-bot typescript wordpress
Last synced: 1 day ago
JSON representation
Perch โ Telegram bot + Claude Code plugin for RunCloud server management. Servers under one wing. Always free.
- Host: GitHub
- URL: https://github.com/adityaarsharma/perch
- Owner: adityaarsharma
- Created: 2026-03-22T10:47:54.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-05-04T11:35:01.000Z (about 2 months ago)
- Last Synced: 2026-05-04T13:31:55.669Z (about 2 months ago)
- Topics: claude, claude-code, claude-desktop, devops, linux-server, mcp, mcp-server, model-context-protocol, nginx, runcloud, runcloud-api, self-healing, server-automation, server-health, server-management, server-monitoring, ssh, telegram-bot, typescript, wordpress
- Language: JavaScript
- Homepage:
- Size: 578 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ชถ Perch
### The intelligence layer for your servers.
**An AI-native, self-hosted, self-learning brain that watches every server you run, diagnoses what breaks in plain English, and lives wherever you want โ Claude Code, Telegram, Slack, your terminal, anywhere that speaks HTTP.**
[](LICENSE)
[]()
[]()
[](https://runcloud.io)
[](https://modelcontextprotocol.io)
[](https://wordpress.org)
[Install](#install-in-5-minutes) ยท [Why Perch](#why-this-exists) ยท [Comparison](#the-real-hosting-market) ยท [Commands](#the-perch-experience) ยท [Architecture](#whats-inside)
---
## The 30-Second Pitch
- **AI-native, not retrofitted.** Built around Claude Code from day one. Your AI talks to your servers via 150+ MCP tools.
- **Self-hosted intelligence.** Every server, every webapp, every problem, every fix โ saved in a local SQLite brain on your hardware. Nobody else owns your operational history.
- **Plain-English diagnosis.** Not "ERROR 500." Try: *"Plugin X just got updated and now conflicts with Theme Y. I deactivated X and the site is back up."*
- **Connectors, not lock-in.** Telegram. Slack. Webhooks. Email. CLI. Anything that talks HTTP. Pick one or use them all.
- **Free forever, no per-server tax.** Run it on 1 VPS or 100. Same price: zero. No "Pro tier," no license keys, no rug-pull.
---
## Why This Exists
In April 2026, you have four ways to host a serious website. All of them are bad:
### The Real Hosting Market
| Option | Real cost / site | What's broken |
|--------|------------------|---------------|
| **GoDaddy / Bluehost** | $7.99โ$25/mo | Oversold shared servers. Support reads scripts. Up-charges for SSL, backups, speed. Stuck in 2010. |
| **Cloudways** | $14โ$30/mo | [220% markup over raw DigitalOcean/Vultr](https://onlinemediamasters.com/cloudways-review/). No root access. Locked to 5 cloud providers. Bills jump when scaling RAM you don't need. |
| **Kinsta** | $35โ$115/mo | Beautiful UX. Container isolation. But $35/site adds up fast โ and [no email hosting included](https://divicake.com/blog/kinsta-performance-and-pricing/). Vendor lock-in. |
| **SiteGround** | $2.99โ$15/mo | Cheap to start, oversells, slows you down at scale. Renewal pricing 3x intro. |
| **Raw VPS** (Hetzner / DigitalOcean / Linode) | $4โ$10/mo | Total power. Zero guardrails. One typo = client site gone. You're the sysadmin now. |
| **RunCloud + your VPS** | $8โ$15/mo + $4 VPS | The smart pick. GUI on top of any cloud. Root access. Auto-backups. But it *manages* โ it doesn't *watch*, *diagnose*, or *heal*. |
**Most people pick GoDaddy because they don't know better.** The smart ones pick Cloudways for ease โ and pay 3x what they should. The rest go raw VPS and become accidental sysadmins.
[**RunCloud**](https://runcloud.io) is genuinely the smartest piece of infrastructure no one's heard of:
- **Provider freedom** โ works with any cloud (Hetzner, DigitalOcean, AWS, Vultr, Linode, your own metal). Cloudways locks you to 5.
- **You keep root.** Cloudways doesn't give you root. RunCloud does.
- **Stop paying anytime.** Your VPS keeps running with all your sites. Cloudways = pay or lose everything.
- **Stack flexibility.** Pure NGINX or hybrid Apache+NGINX. Your call. Cloudways = take what they give you.
- **Real isolation.** Each web app runs as its own system user. Mistakes stay scoped.
- **$8/mo flat for the panel.** No per-site tax.
So: **Hetzner CX21 ($5/mo) + RunCloud ($8/mo) = $13/mo total.** You get the equivalent of Kinsta ($35โ$115) with WordPress + Laravel + Node + n8n + anything else on the same box. Your data on your hardware.
The catch? RunCloud is a **management panel**. It does not watch. It does not diagnose. It does not heal. It does not learn.
**That's where Perch lives.**
---
## What No One Else Is Doing
| | GoDaddy / Bluehost | Cloudways | Kinsta | SiteGround | RunCloud (alone) | **RunCloud + Perch** |
|---|:---:|:---:|:---:|:---:|:---:|:---:|
| Provider freedom | โ | Limited | โ | โ | โ
| โ
|
| Root access | โ | โ | โ | โ | โ
| โ
|
| Run any stack (WP+Node+n8n) | โ | โ | โ | โ | โ
| โ
|
| **AI-native (Claude Code)** | โ | โ | โ | โ | โ | โ
|
| **Self-learning brain** | โ | โ | โ | โ | โ | โ
|
| **Plain-English diagnosis** | โ | โ | โ | โ | โ | โ
|
| **WordPress deep-audit (DB, plugins, CVE, perf)** | Partial | Partial | โ
| Partial | โ | โ
|
| **Auto-fix safe issues** | Limited | Limited | โ
| Limited | โ | โ
|
| **Multi-channel alerts (Telegram/Slack/HTTP)** | โ | Email only | Email only | Email only | Email only | โ
|
| Cost (1 site) | $7.99 | $14 | $35 | $2.99 | $13 | **$13** |
| Cost (10 sites) | $80+ | $140+ | $350+ | Plan upgrade | $13 | **$13** |
| Cost (50 sites) | Unrealistic | $700+ | $1,750+ | Unrealistic | $25 | **$25** |
| Lock-in | High | High | High | Medium | None | None |
| Owns your data | They do | They do | They do | They do | You | **You** |
**The thing nobody is shipping:** an open-source, AI-native intelligence layer that runs on your own server, learns your stack over time, talks to you in any channel you want, and never sends you a renewal email. That's Perch.
---
## The Perch Experience
### From Claude Code
```
You: /perch wp audit mysite.com
Perch: ๐ Running full audit on mysite.com...
Database: 8.4MB autoload (urgent โ should be <1MB)
Top offender: elementor_data 2.1MB
47 expired transients (1.8MB recoverable)
Plugins: 34 active, 6 need updates, 2 vulnerable
๐ด Contact Form 7 v5.7 โ CVE-2024-XXXX (CVSS 8.1)
Security: 71/100 (Grade C)
Admin username is "admin" โ change it
xmlrpc.php is publicly accessible
Backup: Last run 14h ago, 2.1GB to S3 โ
But: DB backup missing for 3 days (mysqldump connection error)
Want me to fix the safe stuff? (transients, sessions, CF7 update, DB backup creds)
```
### From Telegram
```
๐ชถ nginx had a moment on production-1
I checked โ config snippet added via RunCloud has a typo on line 47.
I've restarted nginx-rc and the site is back up (took 8 seconds).
Want me to fix that snippet so this doesn't happen again?
[โ
Yes, fix it] [๐ Show me] [๐ Not now]
```
### From your shell
```bash
$ perch status
production-1 โ
RAM 42% Disk 67% Load 0.21
staging-1 โ ๏ธ RAM 91% Disk 78% Load 0.84 โ memory pressure
dev โ
RAM 33% Disk 12% Load 0.05
$ perch wp errors mysite.com
Likely cause: Plugin "my-plugin" updated 2h ago, now conflicts with theme.
Suggested fix: wp plugin deactivate my-plugin --path=/home/user/public_html
Fixable by Perch: yes
$ perch fix mysite.com
[asks for confirmation, runs the fix, reports back]
```
Same intelligence. Three different surfaces. **Connectors are interchangeable.** Use what fits your day.
---
## Architecture
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CONNECTORS (your choice) โ
โ Claude Code MCP ยท Telegram ยท Slack ยท HTTP API ยท CLI ยท webhook โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โฒ
โ same intelligence, multiple surfaces
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PERCH CORE โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Brain โ โ Gateway โ โ SSH + RunCloud โ โ
โ โ SQLite KB โ โ Alerts โ โ API clients โ โ
โ โ Self-learn โ โ Friendly โ โ Safe execution โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ INTELLIGENCE MODULES โ โ
โ โ WordPress ยท Watcher ยท Diagnostician ยท Healer โ โ
โ โ (DB ยท Plugins ยท Security ยท Backup ยท Images ยท โ โ
โ โ Performance ยท Errors ยท White Screen Diagnosis) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โฒ
โ SSH + RunCloud API v3
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YOUR INFRASTRUCTURE (you own everything) โ
โ Hetzner ยท DigitalOcean ยท AWS ยท Vultr ยท Linode ยท bare metal โ
โ WordPress ยท Laravel ยท Node ยท n8n ยท Python ยท static ยท anything โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
The brain is the moat. Every audit, every fix, every problem gets logged to a SQLite database on **your** server. Over weeks, Perch learns your stack โ what's normal for *your* memory baseline, which plugins are problem children on *your* PHP version, what fixes actually worked when *your* nginx crashed at 2am.
Nobody else has this data. Not RunCloud. Not Cloudways. Not Aditya. **You.**
---
## Install in 5 Minutes
### Path A โ As a Claude Code MCP (recommended)
Get every `/perch_*` tool inside your Claude Code sessions.
```bash
git clone https://github.com/adityaarsharma/perch
cd perch
npm install && npm run build
```
Add to `~/.claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"perch": {
"command": "node",
"args": ["/absolute/path/to/perch/dist/index.js"],
"env": {
"RUNCLOUD_API_KEY": "your-runcloud-api-key"
}
}
}
}
```
Restart Claude Code. Type `/perch_brain` to verify. Done.
### Path B โ Connectors (Telegram / Slack / HTTP)
Run on the server you want to watch. Provides 24/7 alerts when you're away from Claude Code.
```bash
ssh root@your-server
git clone https://github.com/adityaarsharma/perch /opt/perch
cd /opt/perch/telegram-bot
cp config.example.env .env
# Edit .env with your bot token, chat ID, fix-server token
./setup.sh
```
The setup wizard walks you through it. Telegram bot ready in under 5 minutes. (Slack guide: [docs/slack.md](docs/slack.md). Webhook + custom connector: [docs/install.md](docs/install.md).)
### Path C โ Both (the agency setup)
Claude Code for deep work. Connector for 4am pages. Same brain, same data, same intelligence, two surfaces.
**Full install guide with screenshots and troubleshooting โ [docs/install.md](docs/install.md)**
---
## What's Inside
> **HTTP API tool catalog:** every tool exposed by `perch-api` over HTTP is documented in [`docs/api-tools.md`](./docs/api-tools.md) โ 55 tools (brain ยท conversation ยท read-only diagnostics ยท WordPress audit ยท WordPress mutating ยท vault ยท SSH primitives), with required args, mutating-vs-not flags, and which scripts they shell out to.
```
perch/
โโโ src/
โ โโโ index.ts โ MCP server (150+ tools โ RunCloud + Perch)
โ โโโ core/
โ โ โโโ brain.ts โ SQLite knowledge base (your data, your server)
โ โ โโโ gateway.ts โ Alert formatter (friendly tone, multi-channel)
โ โ โโโ ssh-enhanced.ts โ SSH with password + private key + WP-CLI helper
โ โโโ modules/
โ โโโ wordpress/ โ The WordPress Audit Modules
โ โโโ db.ts โ Autoload audit, transient cleanup, orphan detection
โ โโโ plugins.ts โ Plugin audit + Wordfence Intelligence CVE scan
โ โโโ security.ts โ 12-check hardening, scored 0โ100
โ โโโ backup.ts โ Backup health, last run age, destination check
โ โโโ images.ts โ CLI image optimization (jpegoptim/optipng/cwebp)
โ โโโ perf.ts โ Performance snapshot (cache, cron, PHP, TTFB)
โ โโโ errors.ts โ Error diagnosis + white screen root cause
โ
โโโ telegram-bot/ โ Telegram connector (one of many)
โ โโโ bot.py โ Polling bot with inline keyboards
โ โโโ fix-server.py โ Local HTTP API (127.0.0.1 only)
โ โโโ monitor.sh โ Cron-based health alerting
โ โโโ setup.sh โ Interactive setup wizard
โ โโโ scripts/ โ Shell scripts for each fix action
โ
โโโ docs/
โ โโโ runcloud.md โ Full RunCloud server reference (nginx-rc, paths, gotchas)
โ โโโ install.md โ Setup guides โ MCP, connectors, both
โ โโโ telegram.md โ Telegram connector deep-dive
โ โโโ slack.md โ Slack connector setup
โ โโโ safety.md โ What Perch will and won't do (read this)
โ
โโโ README.md โ You are here
```
---
## WordPress Audit Modules โ what Perch sees on your sites
No plugin needed on the WordPress side. Everything runs via SSH and WP-CLI. RunCloud-aware (knows about `nginx-rc`, `/etc/nginx-rc/`, per-app users at `/home/{user}/webapps/`).
| Module | Catches |
|--------|---------|
| **Database** | Autoload bloat (Elementor, expired transients, orphaned WC sessions, postmeta orphans, table fragmentation, slow queries) |
| **Plugins** | Vulnerable plugins via Wordfence Intelligence (free, no API key), abandoned plugins (no updates 2+ years), hidden inactive plugins still on disk |
| **Security** | Admin username = "admin", xmlrpc.php exposed, wp-config permissions, file editor enabled, debug.log publicly accessible, missing rate limits, WP version exposed in headers, core checksum mismatches |
| **Backup** | Last run age, missing DB dumps, truncated backup files, S3/destination unreachable, mismatched retention |
| **Images** | Lossless JPEG/PNG compression (jpegoptim, optipng, pngquant), WebP generation alongside originals, savings estimate before run, scheduled or on-demand |
| **Performance** | PHP version EOL, object cache (Redis/Memcached) connected?, page cache type, WP cron health and backlog, TTFB from server, plugin count thresholds |
| **Errors** | Parses PHP error logs, classifies by type, identifies offending plugin/theme, detects plugin conflicts, white screen root cause, suggests one-line WP-CLI fix |
When something breaks, you get this:
```
๐ด White screen on mysite.com
Fatal error: Cannot redeclare 'my_custom_helper'
Conflict between:
wp-content/plugins/my-plugin/includes/helpers.php:23
wp-content/themes/mytheme/functions.php:89
my-plugin was updated 2 hours ago โ likely introduced this.
[๐ Deactivate my-plugin] [๐ Full Error Log] [โฉ๏ธ Roll Back Plugin]
```
Not a stack trace. Not "Internal Server Error." A **diagnosis**.
---
## Automation Rules
Every Perch install ships with **14 built-in monitoring rules** that run via cron every 5 minutes. No n8n. No Zapier. No SaaS. The whole engine is a self-contained shell script (`telegram-bot/monitor.sh`) โ about 400 lines, runs in under 2 seconds.
| # | Rule | Default trigger | Auto-action |
|---|---|---|---|
| 1 | nginx / nginx-rc down | service inactive | Telegram alert + restart button |
| 2 | PHP-FPM down (any version) | any `php*-fpm-rc` inactive | Restart button |
| 3 | MySQL / MariaDB down | service inactive | Restart button + OOM context |
| 4 | Disk usage tiered | 80% / 90% / 95% | Tiered alerts + cleanup button |
| 5 | RAM usage tiered | 85% / 93% | Top consumers + smart fix |
| 6 | CPU sustained load | 100% / 200% of cores | Top processes |
| 7 | Orphan processes (PPID=1) | >10 orphans | Smart fix |
| 8 | Failed systemd services | any in `systemctl --failed` | Smart fix |
| 9 | SSL expiry per site | 30d / 7d remaining | Renew SSL button |
| 10 | Site HTTP availability | 5xx or unreachable | Diagnose + fix buttons |
| 11 | Custom port checks | any configured port closed | Smart fix |
| 12 | fail2ban ban-rate spike | >50 bans/hour | Acknowledge |
| 13 | Backup age | >36h since last backup | Acknowledge |
| 14 | Daily heartbeat | 09:00 local time | "All systems good ๐ชถ" |
Every threshold is overridable in `~/.perch/.env`. Every alert is friendly, contextual, and ships with one-tap action buttons. Cooldown logic prevents alert spam (default: 30 min between identical alerts).
`bash scripts/setup.sh` installs the cron line and prompts you for thresholds. Full reference: [docs/automation.md](docs/automation.md).
---
## Connectors
Connectors are how Perch talks to you. Pick one. Pick all. Add your own โ the gateway is just a function that takes a structured alert and returns a payload.
| Connector | Status | Best for |
|-----------|--------|----------|
| **Claude Code MCP** | โ
First-class | Deep work โ auditing, planning, debugging |
| **Telegram bot** | โ
Ready | 24/7 alerts on your phone, inline-button fixes |
| **Slack webhook** | โ
Alerts work | Team channels, daily digests |
| **Slack bot** (slash commands + buttons) | ๐ Q2 2026 | Full Slack parity with Telegram |
| **HTTP webhook** | โ
Ready | Plug into anything (n8n, Zapier, Make, custom) |
| **Email** | ๐ Coming | Stakeholders who don't live in chat |
| **Discord** | ๐ Community PR welcome | Indie devs / community servers |
| **Custom** | โ
Build your own | Implement `formatAlert(opts)` โ done |
Telegram and Slack are working today. Slack inline buttons + slash commands ship Q2 2026. Other connectors are 50โ200 lines each โ PRs welcome.
---
## Safety
Perch is paranoid by default. Read this before installing on a production box: **[docs/safety.md](docs/safety.md)**
**The four promises:**
1. **Never destructive without confirmation.** Plugin deactivation, file deletion, config changes โ all require an explicit confirm tap.
2. **Credentials never leak.** Passwords / SSH keys / API tokens are encrypted at rest with AES-256-GCM. Redacted from every log, every alert, every error message.
3. **Always reversible.** Last 10 confirmed actions logged. `/perch undo` reverts the most recent. DB content modifications never auto-run.
4. **Always honest.** When Perch fixes something, you get a complete report of what changed before, after, and why.
**Auto-fix whitelist** (no confirm needed): restart crashed services, kill orphan processes, truncate logs >50MB, renew SSL <7d, clear expired transients, clear `/tmp` PHP sessions older than 24h.
**Confirm-required**: anything that modifies content, deactivates plugins, edits configs, stops services, reboots.
**Never auto, ever**: backup restoration, DB content `DELETE`/`UPDATE` on user data, file system `rm` outside `/tmp`, user account changes, Hetzner-level shutdown.
---
## Why Free Forever
Three reasons, all of them honest:
1. **The brain belongs to you.** A free tool that lives on your server can't be paywalled, ad-funded, or rug-pulled. The data is yours. The code is yours. The whole stack is yours.
2. **Per-server tax is the wrong business model.** Cloudways charges 220% over the underlying VPS. Kinsta charges $35/site. Charging you per server you already own is rent-seeking. Perch refuses to play that game.
3. **Free tools build trust.** Aditya runs other paid products ([Pickle](https://github.com/adityaarsharma/pickle), [RankReady](https://github.com/adityaarsharma/rankready), [Jyotisha](https://adityaarsharma.com/astrology)). The ones who try Perch and find it solid become the audience for those. That's the funnel โ built on usefulness, not a paywall.
No "Pro tier." No license keys. No telemetry by default. No SaaS dependency. **Forever.**
---
## Roadmap
**Now (April 2026)** โ Sprint 1 shipped
- โ
MCP server with 150+ tools
- โ
WordPress Audit Modules (7 deep modules)
- โ
SQLite self-learning brain
- โ
Telegram bot with inline buttons + fix-server
- โ
Slack alert delivery via webhook
- โ
RunCloud-aware paths (`nginx-rc`, `/etc/nginx-rc/`, per-app users)
**Next 60 days**
- ๐ Credential vault (AES-256-GCM encryption)
- ๐ Undo system (`/perch undo`)
- ๐ Slack bot (slash commands + buttons, full Telegram parity)
- ๐ Multi-server dashboard (Telegram-first agency view)
- ๐ Uptime Kuma webhook integration
- ๐ Self-update flow (`/perch update`)
**Q3 2026**
- ๐ Laravel module (queue health, schedule runner, artisan automation)
- ๐ Node.js module (PM2 deep monitoring, memory leak detection)
- ๐ n8n module (workflow health, execution audit)
- ๐ Pattern recognition v2 (Perch correlates issues across servers โ "this is the 3rd time this month, here's the permanent fix")
**2027**
- Cross-server federated learning (opt-in, anonymized) โ Perch learns from the network without anyone giving up their data
---
## Built by Aditya
Aditya Sharma โ solo builder, open-source. Marketing & growth lead at [POSIMYTH Innovation](https://posimyth.com). Runs his own infrastructure. Built Perch because he was tired of the choice between $200/mo Kinsta and 4am SSH panic.
[Website](https://adityaarsharma.com) ยท [Twitter/X](https://x.com/adityaarsharma) ยท [Pickle](https://github.com/adityaarsharma/pickle) ยท [RankReady](https://github.com/adityaarsharma/rankready)
Not affiliated with RunCloud. Perch works **with** RunCloud โ RunCloud is the safety layer (GUI + isolation + backups), Perch is the intelligence layer on top. Both are needed. Together they replace $35โ$115/month managed hosting at $13/month.
---
**Stop renting your server's intelligence. Start owning it.**
[Install Perch](#install-in-5-minutes) ยท [Read the docs](docs/) ยท [Star on GitHub](https://github.com/adityaarsharma/perch) ยท [File an issue](https://github.com/adityaarsharma/perch/issues)