@selfhost.dev/mcp-server 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +188 -20
  2. package/dist/index.js +19 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/tools/alerts.js +83 -12
  5. package/dist/tools/alerts.js.map +1 -1
  6. package/dist/tools/backups.js +184 -16
  7. package/dist/tools/backups.js.map +1 -1
  8. package/dist/tools/billing.js +5 -1
  9. package/dist/tools/billing.js.map +1 -1
  10. package/dist/tools/capacity.d.ts +2 -0
  11. package/dist/tools/capacity.js +253 -0
  12. package/dist/tools/capacity.js.map +1 -0
  13. package/dist/tools/database-users.js +33 -6
  14. package/dist/tools/database-users.js.map +1 -1
  15. package/dist/tools/deployments.js +6 -2
  16. package/dist/tools/deployments.js.map +1 -1
  17. package/dist/tools/instance-logs.d.ts +2 -0
  18. package/dist/tools/instance-logs.js +151 -0
  19. package/dist/tools/instance-logs.js.map +1 -0
  20. package/dist/tools/instances.js +51 -7
  21. package/dist/tools/instances.js.map +1 -1
  22. package/dist/tools/organizations.js +98 -8
  23. package/dist/tools/organizations.js.map +1 -1
  24. package/dist/tools/postgres-tls.d.ts +16 -0
  25. package/dist/tools/postgres-tls.js +64 -0
  26. package/dist/tools/postgres-tls.js.map +1 -0
  27. package/dist/tools/project-activities.d.ts +2 -0
  28. package/dist/tools/project-activities.js +52 -0
  29. package/dist/tools/project-activities.js.map +1 -0
  30. package/dist/tools/project-backups.d.ts +2 -0
  31. package/dist/tools/project-backups.js +159 -0
  32. package/dist/tools/project-backups.js.map +1 -0
  33. package/dist/tools/project-databases.js +26 -2
  34. package/dist/tools/project-databases.js.map +1 -1
  35. package/dist/tools/project-services.js +136 -25
  36. package/dist/tools/project-services.js.map +1 -1
  37. package/dist/tools/projects.js +116 -13
  38. package/dist/tools/projects.js.map +1 -1
  39. package/dist/tools/scaling.js +135 -2
  40. package/dist/tools/scaling.js.map +1 -1
  41. package/dist/tools/webhooks.d.ts +2 -0
  42. package/dist/tools/webhooks.js +195 -0
  43. package/dist/tools/webhooks.js.map +1 -0
  44. package/package.json +3 -2
package/README.md CHANGED
@@ -6,8 +6,8 @@ The power of your own server. The simplicity of a PaaS. Driven by AI.
6
6
 
7
7
  **One platform, two capabilities:**
8
8
 
9
- - **Projects** - your apps, shipped. Connect a GitHub repo, click deploy, and it's live: auto-detected builds (Nixpacks, Dockerfile, Docker Compose, or static), auto-deploy on every push, live streaming build logs, environment variables, custom domains, pause and resume to scale to zero, and databases right inside the project. The ease of Railway, Render, and Vercel, with a server you actually control.
10
- - **Managed Databases** - production-grade database hosting, your way. Managed PostgreSQL, MySQL, Redis, and ClickHouse on AWS, in our cloud or your own AWS account (BYOC), with TimescaleDB and pgvector a flag away on PostgreSQL. Automated backups, snapshots, replicas, and metrics across engines; PITR and parameter tuning on PostgreSQL and MySQL; connection pooling on PostgreSQL, MySQL, and ClickHouse.
9
+ - **Projects** - your apps, shipped. Connect a GitHub repo, click deploy, and it's live: auto-detected builds (Nixpacks, Dockerfile, Docker Compose, or static), auto-deploy on every push, live streaming build logs, environment variables, custom domains, pause and resume to scale to zero, and databases right inside the project. Pick which of six locations across three continents the server runs in, add one-click apps (Supabase, n8n, n8n with Postgres, Twenty CRM) next to your own code, and turn on free daily server backups. The ease of Railway, Render, and Vercel, with a server you actually control.
10
+ - **Managed Databases** - production-grade database hosting, your way. Managed PostgreSQL, MySQL, Redis, and ClickHouse on AWS, in our cloud or your own AWS account (BYOC), with TimescaleDB and pgvector a flag away on PostgreSQL. Automated backups, snapshots, replicas, and metrics across engines; PITR, client TLS and parameter tuning on PostgreSQL; parameter tuning on MySQL; connection pooling on PostgreSQL, MySQL, and ClickHouse; offsite data backups and zero-downtime cluster tier scaling on ClickHouse. Read engine logs and sample the live query workload without SSH.
11
11
 
12
12
  One account, one bill, one AI control plane. Pay only for what you run: prepaid credits from $5, no plans or tiers.
13
13
 
@@ -90,8 +90,14 @@ Connect a repo, deploy, and it's live - SelfHost takes your code from GitHub to
90
90
  | *"Create a project and deploy my GitHub repo into it"* | Provisions the project, waits until it's ready, auto-detects the build, and deploys the repo |
91
91
  | *"Deploy the main branch of my-org/api"* | Creates the deployment, triggers the build, and streams live logs until it's running |
92
92
  | *"Turn on auto-deploy so every push ships"* | Enables auto-deploy; future pushes to the branch redeploy automatically |
93
+ | *"Put my project's server in Singapore"* | Shows what each family costs there, with live stock, and provisions it where you picked. A server cannot be moved later, so this is asked up front |
93
94
  | *"Add a private Postgres database to my project"* | Provisions a Postgres database inside the project, with the credentials and visibility you choose |
94
- | *"Spin up Supabase in this project"* | Deploys the Supabase template alongside your app |
95
+ | *"Spin up Supabase in this project"* | Deploys the Supabase template alongside your app and hands you the Studio credentials once it is up |
96
+ | *"I want n8n for my automations"* | Deploys n8n (or n8n backed by Postgres, if it is more than light use) and warns you the first person to open the URL claims the owner account |
97
+ | *"Give me a CRM"* | Deploys Twenty, and tells you it takes up to 15 minutes rather than leaving you wondering if it hung |
98
+ | *"Turn on backups for this project"* | Enables daily server backups, seven kept. Free - there is no backup charge for projects |
99
+ | *"Why did my project go down last night?"* | Reads the merged feed of Hetzner server actions and platform events, so "we stopped it for billing" is distinguishable from "the machine was rebuilt" |
100
+ | *"Roll this project's server back to yesterday's backup"* | Lists the backups, tells you exactly what you lose, and rebuilds the disk once you confirm |
95
101
  | *"Set DATABASE_URL on my app and redeploy"* | Updates the env var (without wiping the others) and rolls out the change |
96
102
  | *"Point app.example.com at my deployment"* | Attaches the custom domain and returns the exact DNS records to add, then verifies them |
97
103
  | *"Show me the build logs for the last deploy"* | Streams the build and container logs for that run |
@@ -125,6 +131,16 @@ Production-grade, standalone database hosting.
125
131
  | *"Add a read-only database user for the reporting app"* | Creates a DBMS-level credential with the right grants |
126
132
  | *"Restore my prod database to 14:30 yesterday into a new instance"* | Sets up a point-in-time recovery from WAL + base backups |
127
133
  | *"How has my prod database been doing this week?"* | Summarizes CPU / memory / disk / engine metrics from the agent heartbeats |
134
+ | *"Why is my database slow right now?"* | Samples the live query workload and reads the engine log, no SSH involved |
135
+ | *"Show me the Postgres error log"* | Fetches the tail of whichever log you name, from a list of what that engine actually has |
136
+ | *"Encrypt connections to my Postgres"* | Turns on client TLS across the primary and every replica, and reminds you to move clients to sslmode=require |
137
+ | *"Back up my ClickHouse data offsite every night"* | Creates a BACKUP ALL schedule streaming to its own S3 bucket, with the retention you pick |
138
+ | *"Restore that ClickHouse backup"* | Restores it, after telling you plainly that it MERGES rather than rolling back |
139
+ | *"Let my ClickHouse cluster grow and shrink with load"* | Sets the tier floor and ceiling, quotes what the ceiling costs, and adds the up and down triggers |
140
+ | *"My cluster stopped autoscaling"* | Finds the failed scale plan blocking it - which nothing else surfaces - and retries or discards it |
141
+ | *"Make Priya an admin"* | Changes the member's role, and explains it if the hierarchy refuses |
142
+ | *"POST to my service whenever a deploy fails"* | Registers a webhook endpoint and hands you the signing secret |
143
+ | *"How long will my credit last?"* | Reports the balance, the burn rate, the runway, and any credit about to expire |
128
144
  | *"Scale my instance to r6i.2xlarge and 1TB"* | Issues a manual scale, polls the resize event, and warns if the storage cascades to cluster peers |
129
145
  | *"Grow storage automatically before the disk fills up"* | Creates a doubling storage rule up to a ceiling you approve, priced per node |
130
146
  | *"Auto-stop my staging DB at 7pm weekdays"* | Creates a scheduled scaling policy with start/stop times |
@@ -138,7 +154,7 @@ Destructive operations (delete, stop, reboot) require explicit confirmation. The
138
154
 
139
155
  ## Features
140
156
 
141
- ### 161 tools across 25 modules
157
+ ### 189 tools across 31 modules
142
158
 
143
159
  Every tool maps to a real API endpoint. No mock data, no shortcuts.
144
160
 
@@ -167,13 +183,18 @@ Multi-tenant - everything is scoped to your org.
167
183
  | `update_organization` | Change name, description, or IAM role |
168
184
  | `delete_organization` | Soft-delete org and all related resources |
169
185
  | `list_members` | See team members and their roles |
186
+ | `update_member_role` | Promote or demote an existing member (the only way to change a role after they've joined) |
170
187
  | `remove_member` | Remove a member (owner/admin only) |
171
- | `invite_to_org` | Send org invitation with role assignment |
188
+ | `invite_to_org` | Send org invitation at a role you pick, by name |
172
189
  | `list_org_invitations` | Pending invitations |
173
190
  | `cancel_invitation` | Revoke a pending invitation |
174
191
  | `get_my_invitations` | Invitations sent to you |
175
192
  | `list_activity_logs` | Audit trail of all actions in the org |
176
193
 
194
+ Five roles, highest first: **Owner** (100), **Admin** (80), **Billing** (60), **Manager** (40), **Member** (20). Both invite and role-change take the role by name, so you never have to hunt for an id.
195
+
196
+ The hierarchy is enforced and the refusals are worth knowing in advance: an owner manages everyone, but an **admin can only manage strictly below their own level** - never a peer admin, and never granting a role at or above their own. Nobody can change **their own** role (self-demotion locks you out, self-promotion is an escalation), so an owner stepping down has to be demoted by another owner, and the last owner cannot be demoted or removed at all.
197
+
177
198
  #### Cloud Credentials
178
199
  Bring your own AWS account (BYOC) or use SelfHost's managed infrastructure.
179
200
 
@@ -264,6 +285,15 @@ Neither is a separate engine - both are PostgreSQL plus a flag. Pass `timescaled
264
285
 
265
286
  Once TimescaleDB is installed, five extra metrics join the instance's `postgresql.database` alert set: `timescaledb_hypertable_count`, `timescaledb_chunk_count`, `timescaledb_compressed_chunk_count`, `timescaledb_compression_ratio`, and `timescaledb_total_size_bytes`. They're absent from heartbeats until then, so don't write rules against them on a plain Postgres instance - they'd never fire.
266
287
 
288
+ #### PostgreSQL Client TLS
289
+ Encryption in transit for client connections. **Group-wide**: one call covers the primary and every replica, and certificates are issued per group.
290
+
291
+ | Tool | Description |
292
+ |------|-------------|
293
+ | `set_postgres_tls` | Turn client TLS on or off across a Postgres instance group (turning it off asks for confirmation - it downgrades every client connection) |
294
+
295
+ Once it's on, move clients to `sslmode=require` or stricter; a client left on the default may keep connecting in the clear. And note that **a restore or a fork starts with TLS off** even when the source had it on, because the new group has no certificate yet - re-enable it explicitly rather than assuming it carried over.
296
+
267
297
  #### MySQL Configuration
268
298
  Tune MySQL server parameters on a managed instance. No preview step - read the current config, then apply overrides.
269
299
 
@@ -273,17 +303,28 @@ Tune MySQL server parameters on a managed instance. No preview step - read the c
273
303
  | `update_mysql_config` | Apply overrides for `max_connections`, `innodb_buffer_pool_size`, `tmp_table_size`, and `wait_timeout` |
274
304
 
275
305
  #### Backups & Snapshots
276
- Automated backups with DLM policies and manual EBS snapshots. **Snapshot storage is metered** (`ebs_snapshot_storage`, per GB-month against wallet credit) and every create path runs through the wallet gate, so the tools flag the cost up front and a 402 means an empty wallet or no linked payment method. A DLM policy holds `retain_rule_count` snapshots per volume, so its standing cost is roughly retention x volume size; deleting a snapshot is what stops its charge.
306
+ Two different things, and the tools keep them apart because a user asking to "restore a backup" means very different outcomes depending on which they have:
307
+
308
+ - **Disk snapshots** (`aws_backup_job`, DLM policies, `/snapshots`) - block-level EBS snapshots. Every engine. Restored by creating a new instance from a `snapshot_id`.
309
+ - **Data backups** (`clickhouse_native`) - a full `BACKUP ALL` of a ClickHouse instance's databases, streamed to a dedicated offsite S3 bucket. Restored in place with `restore_backup`, and that restore **merges** rather than rolling back.
310
+
311
+ `s3_file_backup` was a third type and is now rejected by the backend; it is no longer offered.
312
+
313
+ **Snapshot storage is metered** (`ebs_snapshot_storage`, per GB-month against wallet credit) and every create path runs through the wallet gate, so the tools flag the cost up front and a 402 means an empty wallet or no linked payment method. A DLM policy holds `retain_rule_count` snapshots per volume, so its standing cost is roughly retention x volume size; deleting a snapshot is what stops its charge.
314
+
315
+ One asymmetry worth knowing before deleting a schedule: pausing (`state: DISABLED`) always keeps existing backups, but **deleting** a ClickHouse data-backup schedule also deletes every backup that schedule took. Deleting a disk-snapshot policy does not.
277
316
 
278
317
  | Tool | Description |
279
318
  |------|-------------|
280
- | `list_backups` | List all backups (syncs with AWS) |
281
- | `create_backup` | Create S3 file backup or AWS backup job |
319
+ | `list_backups` | List all backups, both families (syncs with AWS); read `backup_type` to tell them apart |
320
+ | `create_backup` | Take a disk snapshot (`aws_backup_job`) or a ClickHouse data backup (`clickhouse_native`) now |
321
+ | `restore_backup` | Restore a ClickHouse data backup, into its own instance or another one (**merges**, does not roll back) |
282
322
  | `delete_backup` | Delete backup and AWS snapshot (with confirmation) |
283
- | `list_backup_policies` | List DLM lifecycle policies |
284
- | `create_backup_policy` | Create automated backup schedule |
285
- | `update_backup_policy` | Enable/disable or modify schedule |
286
- | `delete_backup_policy` | Remove policy (with confirmation) |
323
+ | `list_backup_policies` | List backup schedules, both kinds (`details.policy_type` distinguishes them) |
324
+ | `create_backup_policy` | Create an automated **disk-snapshot** (DLM) schedule |
325
+ | `create_data_backup_schedule` | Create a recurring ClickHouse **data-backup** schedule to offsite S3 |
326
+ | `update_backup_policy` | Pause/resume (`state`) or change the cadence/retention of either kind |
327
+ | `delete_backup_policy` | Remove a schedule (with confirmation; a data-backup schedule takes its backups with it) |
287
328
  | `list_snapshots` | List EBS snapshots in a region |
288
329
  | `get_snapshot` | Snapshot details |
289
330
  | `delete_snapshot` | Delete EBS snapshot (with confirmation) |
@@ -385,18 +426,43 @@ consumed per usage and gated by wallet balance. All endpoints scoped to the acti
385
426
  ### PaaS - Projects (app containers)
386
427
  A **project** is a per-app container: a provisioned server + Coolify install + wildcard DNS that deployments, databases, and services attach to. Creation is async (~2-5 min) - poll `get_project` until status is `active` before deploying into it.
387
428
 
388
- The project's **server size is the main cost of a project** and it is chosen at create time (`server_type`: cx23 / cx33 / cx43 / cx53). Call `list_server_types` for live prices and per-location availability first - `create_project` falls back to the smallest size (cx23) if nothing is chosen.
429
+ The project's **server size and location are the main cost of a project**, both are chosen at create time, and neither can be changed afterwards - a Hetzner server cannot be moved, and projects have no scaling path. Nineteen sizes across three families: `cx*` Cost-Optimized (`cost_optimized`, shared CPU, sold in Europe only), `cpx*` Regular (`regular_purpose`, shared CPU, in two generations that never share a location - the `cpx*2` line sells in Europe + Singapore, the `cpx*1` line is listed everywhere but in practice only carries stock in the US), `ccx*` Dedicated CPU (`general_purpose`, sold in all six). Six locations: Falkenstein and Nuremberg (Germany), Helsinki (Finland), Ashburn and Hillsboro (USA), Singapore.
430
+
431
+ **Prices differ per location for the same size**, so call `list_server_types` for live prices and per-location availability first, and name the location alongside any price. The cheapest US or APAC option is several times the cheapest European one, because no Cost-Optimized size is sold outside Europe.
432
+
433
+ Availability is a tri-state and it flaps: `offered: false` means the size is not sold in that location at all, `offered: true, available: false` means it is sold there but out of stock right now. Re-read before acting - it is normal for most of the cheap Cost-Optimized line to be out of stock across all of Europe at once, leaving `cx23` as the only cheap size that can actually be provisioned.
389
434
 
390
435
  | Tool | Description |
391
436
  |------|-------------|
392
437
  | `list_server_types` | Server sizes per location with availability and all-in hourly pricing (no auth, no rate limit) |
393
438
  | `list_projects` | List projects in the org (pid, name, status, public_ip, domain) |
394
439
  | `get_project` | Get one project; poll this for provisioning progress (active / failed) |
395
- | `create_project` | Create a project on a chosen `server_type` and start async provisioning (returns status `pending`) |
440
+ | `create_project` | Create a project on a chosen `server_type` + `location`, optionally with backups, and start async provisioning (returns status `pending`) |
396
441
  | `update_project` | Rename / re-describe a project |
397
442
  | `delete_project` | Tear down the server and everything in the project (with confirmation; blocked while provisioning or with running deployments) |
398
443
  | `get_project_metrics` | Time-series server + database + deployment metrics from the monitoring agent (start_date/end_date) |
399
444
 
445
+ `list_projects` / `get_project` carry `location`, `server_type`, `backups_enabled` and a server-computed `ready` + `readiness_detail`. **`ready` is not `status == "active"`**: a project is ready only when it is active and every service and database inside it is ready too, so an active project can legitimately still be waiting on a child.
446
+
447
+ ### PaaS - Project Backups
448
+ Native Hetzner backups of a project's whole VM - the only backup a project has, since its databases and services all live on that server. **Free**: there is no backup SKU for projects, so the platform absorbs the provider charge and the customer is billed nothing extra.
449
+
450
+ Daily, seven kept, both fixed. Hetzner assigns the window shortly *after* backups are switched on, so a just-enabled project reporting a null window is "pending", not broken.
451
+
452
+ | Tool | Description |
453
+ |------|-------------|
454
+ | `list_project_backups` | Backups + schedule, read live from Hetzner (works on a stopped project) |
455
+ | `enable_project_backups` | Turn on automatic daily backups (free) |
456
+ | `disable_project_backups` | Turn them off **and delete every existing backup** (with confirmation) |
457
+ | `restore_project_backup` | Rebuild the server's disk from a backup - a true rollback; everything written since is lost (image id + exact project name + confirmation) |
458
+
459
+ ### PaaS - Project Activity
460
+ | Tool | Description |
461
+ |------|-------------|
462
+ | `list_project_activities` | One chronological feed merging Hetzner server actions with platform events, each tagged `source`; paginated, works on a stopped project |
463
+
464
+ Reading both sources together is the point: a project that stopped answering shows the platform event and the server action side by side, which usually separates "we stopped it for billing" from "the machine was rebuilt". If Hetzner is unreachable the feed degrades to platform events and sets `meta.server_activities_available: false` - check that before concluding nothing happened.
465
+
400
466
  ### PaaS - Deployments (GitHub apps)
401
467
  A **deployment** is an app built from a GitHub repo, living inside an `active` project. Build/run history is returned inline on the deployment.
402
468
 
@@ -448,14 +514,22 @@ Postgres/Redis/MySQL/MongoDB provisioned inside a project (distinct from the man
448
514
  | Tool | Description |
449
515
  |------|-------------|
450
516
  | `list_project_databases` | List databases attached to a project |
517
+ | `get_project_database` | One database, status re-read **live** from Coolify (plus provisioning stages) |
451
518
  | `create_project_database` | Provision a Postgres/Redis/MySQL/MongoDB in a project (type-specific credentials; Postgres optionally with TimescaleDB or pgvector) |
452
519
  | `delete_project_database` | Delete a project database (exact name match + confirmation) |
453
520
 
454
- ### PaaS - Project Services (templates)
521
+ ### PaaS - Project Services (one-click apps)
522
+ Four templates, not one: `supabase`, `n8n`, `n8n-with-postgresql` (the same n8n backed by a Postgres sidecar instead of SQLite) and `twenty` (CRM).
523
+
524
+ **Only Supabase takes admin credentials.** n8n and Twenty have none - the first person to open the public URL claims the owner account through the app's own first-run screen. `create_project_service` refuses `dashboard_*` fields on those rather than sending values the backend drops, and says so.
525
+
526
+ Boot windows differ a lot: Supabase ~5 min, n8n up to 10, Twenty up to 15 (images plus migrations). Don't call Twenty stuck early.
527
+
455
528
  | Tool | Description |
456
529
  |------|-------------|
457
- | `list_project_services` | List service-template instances (e.g. Supabase) in a project |
458
- | `create_project_service` | Deploy a service template (currently `supabase`) into a project |
530
+ | `list_project_services` | List deployed templates (status, `provisioning` stages, `error_message`) - **no credentials** |
531
+ | `get_project_service` | One service **including its credentials** - the only endpoint that returns them |
532
+ | `create_project_service` | Deploy `supabase` / `n8n` / `n8n-with-postgresql` / `twenty` into a project |
459
533
  | `delete_project_service` | Delete a project service (exact name match + confirmation) |
460
534
 
461
535
  ### PaaS - Deployment Notifications
@@ -465,6 +539,49 @@ Postgres/Redis/MySQL/MongoDB provisioned inside a project (distinct from the man
465
539
  | `bind_deployment_notification_channel` | Notify an org channel (nchan_…) on deploy success/failure |
466
540
  | `unbind_deployment_notification_channel` | Stop notifying a channel for a deployment |
467
541
 
542
+ ### Database Logs & Query Stats
543
+ On-demand diagnostics for a managed database, no SSH. Postgres, MySQL and ClickHouse. **Request-then-read**: the POST creates a pending fetch, the platform agent fills it in, and you read the result with the matching list tool. Both need a positive wallet balance; a POST needs `cloud_instances:update`. Replicas are allowed deliberately.
544
+
545
+ Don't poll: a pending fetch is returned as-is instead of starting a second one, and there is a short per-source cooldown after one finishes.
546
+
547
+ | Tool | Description |
548
+ |------|-------------|
549
+ | `list_log_sources` | Log sources available on this instance (engine, replication, backup/restore, and more on ClickHouse) |
550
+ | `fetch_instance_logs` | Request a tail of one source (default 200 lines, max 2000, output capped at 1 MB) |
551
+ | `list_instance_log_fetches` | Last 20 fetches **with their output** - this is where the log text arrives |
552
+ | `capture_db_stats` | Sample the query workload over 5-60s (default 10) - counters are read twice and differenced |
553
+ | `list_db_stats` | Last 20 samples with their results |
554
+
555
+ ### Cluster Capacity Tiers
556
+ Moving a whole instance **group** up and down a ladder of machine sizes, node by node, without downtime. Not the same as `scale_instance` or a single-instance `resize_instance` rule - a single-node switchover fired at a multi-node cluster desyncs its tier state, which is why this exists. AWS and the data plane in this version.
557
+
558
+ **Two moving parts, both required.** The capacity config is the guardrails (which ladder, min/max tier, on/off); the tier *policies* are the triggers, created through `create_scaling_policy` with `scaling_action: resize_instance` + `group_id`. The config must exist and be enabled before a policy can reference it, and up and down are separate policies with enforced hysteresis.
559
+
560
+ | Tool | Description |
561
+ |------|-------------|
562
+ | `list_capacity_ladders` | The ordered machine-size ladder per engine - every tier bound is an index into this |
563
+ | `get_capacity_config` | Bounds, current tier, in-flight plan, **and `last_failed_scale_plan`** |
564
+ | `create_capacity_config` | Set a group's tier floor and ceiling (the ceiling is a spend ceiling) |
565
+ | `update_capacity_config` | Change bounds/window, or pause with `enabled: false` |
566
+ | `delete_capacity_config` | Remove the guardrails (current size unchanged; 422 while policies reference it) |
567
+ | `retry_cluster_scale_plan` | Resume a failed plan from where it stopped |
568
+ | `delete_cluster_scale_plan` | Abandon a failed plan |
569
+
570
+ **A failed scale plan blocks all further automatic scaling for its group**, and `get_capacity_config` is the only place it surfaces. If a cluster's scaling has quietly stopped working, look at `last_failed_scale_plan` first.
571
+
572
+ ### Webhook Endpoints
573
+ Org-wide outgoing HTTPS callbacks. Distinct from deployment notification bindings, which push one deployment's outcome to Slack or email; these POST typed events to a receiver you run. HTTPS only; the signing secret is generated server-side at create.
574
+
575
+ | Tool | Description |
576
+ |------|-------------|
577
+ | `list_webhook_endpoints` | The org's endpoints and what each subscribes to |
578
+ | `get_webhook_endpoint` | One endpoint's URL and event list |
579
+ | `create_webhook_endpoint` | Register an HTTPS receiver for one or more event types |
580
+ | `update_webhook_endpoint` | Change the URL or **replace** the event list |
581
+ | `delete_webhook_endpoint` | Remove an endpoint and its delivery history (with confirmation) |
582
+
583
+ Events: `instance.scaling_failed`, `deploy_run.succeeded` / `.failed` / `.aborted`, `preview_deployment.created` / `.destroyed`, `database_user.password_rotated`. That last one is the signal a credential consumer needs when a database user has `password_rotation_enabled` - the payload never carries the password, so the receiver refetches with `rotate_database_user_password`. Subscribing to it is what makes automatic rotation safe instead of breaking.
584
+
468
585
  ---
469
586
 
470
587
  ## Common Workflows
@@ -474,14 +591,51 @@ Postgres/Redis/MySQL/MongoDB provisioned inside a project (distinct from the man
474
591
  ```
475
592
  You: "Deploy my-org/web to a new project"
476
593
 
477
- Claude: Creates a project → polls until it's provisioned and active
594
+ Claude: Shows sizes and locations with live prices → you pick
595
+ → creates the project → polls until provisioned and active
478
596
  → detects the build config from the repo (build pack, port)
479
- → creates the deployment and triggers the first build
597
+ → creates the deployment; it comes back `provisioning` with no
598
+ URL yet, which is normal, so it keeps polling
480
599
  → streams the build logs until the app is live
481
600
  → hands you the deploy URL
482
601
  ```
483
602
 
484
- Then: *"add a private Postgres to it"*, *"set my env vars"*, *"point app.example.com at it"*, or *"turn on auto-deploy"* to round out the app.
603
+ The deployment's URL is null on creation. Registration happens in the background
604
+ (it used to run inline and time out on private repos), so the deploy URL appears
605
+ when the status reaches `active`, not in the create response.
606
+
607
+ Then: *"add a private Postgres to it"*, *"drop n8n next to it"*, *"set my env vars"*, *"point app.example.com at it"*, *"turn on backups"*, or *"turn on auto-deploy"* to round out the app.
608
+
609
+ ### Add a one-click app to a project
610
+
611
+ ```
612
+ You: "I want n8n in my project"
613
+
614
+ Claude: Asks whether you want it public, and whether the Postgres-backed
615
+ variant (durability and concurrency; it cannot be switched later)
616
+ → deploys it → polls until active (up to ~10 min)
617
+ → fetches the URL, and tells you the FIRST person to open it
618
+ becomes the owner, so finish setup before sharing it
619
+ ```
620
+
621
+ Supabase is the exception: it takes a dashboard username and password up front
622
+ and those become the Studio login. n8n and Twenty have no admin credentials at
623
+ all - the first visitor claims the account.
624
+
625
+ ### Diagnose a slow database
626
+
627
+ ```
628
+ You: "My prod Postgres feels slow"
629
+
630
+ Claude: Samples the live query workload (5-60s window)
631
+ → reads the engine log tail
632
+ → checks CPU / memory / disk and the replica count
633
+ → tells you what the numbers actually say
634
+ ```
635
+
636
+ Both the log fetch and the workload sample are request-then-read: the platform
637
+ agent collects them and the result is read back a moment later. Sample while the
638
+ problem is happening - a quiet window will make a struggling database look fine.
485
639
 
486
640
  ### Switch AWS Account (BYOC vs Platform-Managed)
487
641
 
@@ -519,6 +673,12 @@ Claude: Calls reauthenticate → clears stored credentials
519
673
 
520
674
  ### Restore from Backup
521
675
 
676
+ Three different things get called "restore" here and they do not do the same
677
+ thing. Whichever one you ask for, the tools state which you are getting before
678
+ touching anything.
679
+
680
+ **A disk snapshot** becomes a NEW instance - the original is untouched:
681
+
522
682
  ```
523
683
  You: "Restore my prod database from yesterday's snapshot"
524
684
 
@@ -527,6 +687,14 @@ Claude: Lists snapshots → you pick one
527
687
  → shows you the new password (save it!)
528
688
  ```
529
689
 
690
+ **A ClickHouse data backup MERGES into a running instance.** It is not a
691
+ rollback: rows written after the backup was taken survive it. You can also
692
+ restore into a different instance, which is how you clone a dataset.
693
+
694
+ **A project backup IS a rollback.** It overwrites the server's whole disk, so
695
+ Coolify, every service and every project database revert, and anything written
696
+ since is gone. It asks for the project's exact name before doing it.
697
+
530
698
  ---
531
699
 
532
700
  ## Rate Limiting
package/dist/index.js CHANGED
@@ -29,6 +29,12 @@ import { registerProxySqlTools } from "./tools/proxysql.js";
29
29
  import { registerMysqlConfigTools } from "./tools/mysql-config.js";
30
30
  import { registerChproxyTools } from "./tools/chproxy.js";
31
31
  import { registerPostgresExtensionTools } from "./tools/postgres-extensions.js";
32
+ import { registerProjectBackupTools } from "./tools/project-backups.js";
33
+ import { registerProjectActivityTools } from "./tools/project-activities.js";
34
+ import { registerPostgresTlsTools } from "./tools/postgres-tls.js";
35
+ import { registerInstanceLogTools } from "./tools/instance-logs.js";
36
+ import { registerCapacityTools } from "./tools/capacity.js";
37
+ import { registerWebhookTools } from "./tools/webhooks.js";
32
38
  const server = new McpServer({
33
39
  name: "selfhost",
34
40
  version: "0.1.0",
@@ -72,10 +78,14 @@ registerEnvVarTools(server);
72
78
  registerGithubTools(server);
73
79
  // Module 20: Project databases - Postgres/Redis/MySQL/MongoDB inside a project
74
80
  registerProjectDatabaseTools(server);
75
- // Module 21: Project services - service templates (Supabase) inside a project
81
+ // Module 21: Project services - one-click app templates (Supabase, n8n, n8n+Postgres, Twenty)
76
82
  registerProjectServiceTools(server);
77
83
  // Module 22: Deployment notifications - bind/unbind org channels to deploy outcomes
78
84
  registerDeploymentNotificationTools(server);
85
+ // Module 27: Project backups - native Hetzner whole-VM backups of a project server
86
+ registerProjectBackupTools(server);
87
+ // Module 28: Project activity feed - merged Hetzner server actions + platform events
88
+ registerProjectActivityTools(server);
79
89
  // ─── MySQL parity tools (AWS surface, /aws/v1/...) ───────────────────────────
80
90
  // Module 23: ProxySQL connection pooling (MySQL) - MySQL sibling of PgBouncer (Module 9)
81
91
  registerProxySqlTools(server);
@@ -86,6 +96,14 @@ registerMysqlConfigTools(server);
86
96
  registerChproxyTools(server);
87
97
  // Module 26: Postgres extensions - TimescaleDB + pgvector post-hoc enablement (enable-only)
88
98
  registerPostgresExtensionTools(server);
99
+ // Module 29: Postgres client TLS - group-wide encryption in transit
100
+ registerPostgresTlsTools(server);
101
+ // Module 30: Instance logs + query stats - on-demand engine diagnostics, no SSH
102
+ registerInstanceLogTools(server);
103
+ // Module 31: Cluster capacity tiers - group-wide ladder scaling + scale-plan recovery
104
+ registerCapacityTools(server);
105
+ // Module 32: Webhook endpoints - org-wide outgoing HTTPS event callbacks
106
+ registerWebhookTools(server);
89
107
  // Server utility tools
90
108
  server.tool("reauthenticate", "Clear stored credentials and sign in again (use to switch accounts or fix auth issues)", {}, async () => {
91
109
  try {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC1G,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD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AE,CAAC,EAAE,CAAC;IACxH,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,IAAI;IACjB,MAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IAC9C,MAAM,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAExC,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,kBAAkB,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,iGAAiG;IACjG,IAAI,CAAC,CAAC,MAAM,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,eAAe,EAAE,CAAC,EAAE,CAAC;QAC5D,gBAAgB,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACnC,aAAa,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;YACzB,sDAAsD;QACxD,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,MAAM,CAAC,GAAG,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -5,9 +5,78 @@ function resolveOrgId(organization_id) {
5
5
  return organization_id || session.getActiveOrgId();
6
6
  }
7
7
  const noOrgMessage = "No organization selected. Call `select_organization` first or pass an organization_id.";
8
+ /**
9
+ * The metric catalogue, mirroring the backend's `AlertRule::VALID_METRICS`
10
+ * (`CROSS_CUTTING_METRICS` merged with each adapter's `valid_metrics`). A rule
11
+ * whose metric_name is not in its metric_type's list is rejected at validation,
12
+ * so this is a hard allow-list, not a hint.
13
+ *
14
+ * Kept as data rather than prose because the previous hand-written version had
15
+ * drifted: `storage` was missing 11 of its 17 names, `clickhouse.database` was
16
+ * missing 14 of 22, and `active_replica_count` was absent from all three engines
17
+ * that report it. Rendered into the tool descriptions below so the two cannot
18
+ * disagree again.
19
+ *
20
+ * NOT LISTED, deliberately: `mongodb.database` is a valid metric_type backend-side
21
+ * but its adapter reports no metrics, so no rule on it can ever fire.
22
+ * `opensearch.database` has metrics but OpenSearch is not a customer-reachable
23
+ * engine on this surface.
24
+ */
25
+ const METRIC_CATALOGUE = {
26
+ system: [
27
+ "cpu_percent", "cpu_io_wait_percent", "memory_percent", "swap_usage_percent",
28
+ "disk_usage_percent", "load_avg_1", "load_avg_5", "load_avg_15",
29
+ ],
30
+ network: ["recv_bytes_per_sec", "sent_bytes_per_sec"],
31
+ storage: [
32
+ "disk_free_bytes", "disk_free_percent", "disk_total_bytes", "disk_used_bytes",
33
+ "disk_used_percent", "inodes_free", "inodes_total", "inodes_used", "inodes_used_percent",
34
+ "read_bytes_per_second", "read_io_per_second", "read_utilization_percent",
35
+ "read_write_bytes_per_second", "total_utilization_percent", "write_bytes_per_second",
36
+ "write_io_per_second", "write_utilization_percent",
37
+ ],
38
+ "postgresql.database": [
39
+ "blocks_read_per_second", "cache_hit_ratio", "committed_tx_per_second",
40
+ "connections_total", "max_connections", "replication_lag_seconds",
41
+ "active_replica_count", "transactions_per_second",
42
+ "timescaledb_hypertable_count", "timescaledb_chunk_count",
43
+ "timescaledb_compressed_chunk_count", "timescaledb_compression_ratio",
44
+ "timescaledb_total_size_bytes",
45
+ ],
46
+ "mysql.database": [
47
+ "connections_total", "max_connections", "connections_aborted", "threads_running",
48
+ "queries_per_second", "slow_queries_per_second", "replication_lag_seconds",
49
+ "active_replica_count", "innodb_buffer_pool_hit_ratio",
50
+ "innodb_row_lock_waits_per_second", "tmp_disk_tables_per_second",
51
+ "select_full_scans_per_second",
52
+ ],
53
+ "redis.database": [
54
+ "used_memory", "connected_clients", "evicted_keys", "expired_keys",
55
+ "keyspace_hits", "keyspace_misses", "instantaneous_ops_per_sec",
56
+ "rdb_changes_since_last_save", "rdb_last_save_time", "replication_lag_seconds",
57
+ "connected_slaves", "blocked_clients",
58
+ ],
59
+ "clickhouse.database": [
60
+ "query_count", "queries_per_second", "select_queries_per_second",
61
+ "insert_queries_per_second", "failed_queries_per_second",
62
+ "inserted_rows_per_second", "selected_rows_per_second",
63
+ "memory_usage", "background_merges_count",
64
+ "replication_delay", "replication_lag_seconds", "active_replica_count",
65
+ "disk_used_bytes", "connections_count", "connections_total",
66
+ "broken_parts_count", "mark_cache_hit_ratio", "parts_active",
67
+ "keeper_connected", "total_replicas", "active_replicas", "queue_size",
68
+ "future_parts", "is_session_expired", "lost_replicas",
69
+ "noquorum_detached_parts",
70
+ ],
71
+ };
72
+ const METRIC_TYPES = Object.keys(METRIC_CATALOGUE);
73
+ /** Rendered into create/list descriptions so the allow-list is visible, not guessed at. */
74
+ const METRIC_CATALOGUE_TEXT = METRIC_TYPES
75
+ .map((t) => `- ${t}: ${METRIC_CATALOGUE[t].join(", ")}`)
76
+ .join("\n");
8
77
  const alertRuleSchema = {
9
78
  name: z.string().min(1, "Rule name is required"),
10
- metric_type: z.enum(["system", "network", "storage", "postgresql.database", "mysql.database", "redis.database", "clickhouse.database"]).describe("Metric category"),
79
+ metric_type: z.enum(METRIC_TYPES).describe("Metric category. Must match the instance's engine - see the catalogue in the tool description."),
11
80
  metric_name: z.string().min(1, "Metric name is required (e.g. cpu_percent, memory_percent, disk_used_percent)"),
12
81
  operator: z.enum([">", "<", ">=", "<=", "=="]).describe("Comparison operator"),
13
82
  threshold: z.number().describe("Threshold value to trigger alert"),
@@ -43,17 +112,19 @@ export function registerAlertTools(server) {
43
112
  });
44
113
  server.tool("create_alert_rule", `Create an alert rule for monitoring. Set cloud_instance_pid to target a specific instance, or omit for an org-wide rule.
45
114
 
46
- Valid metric combinations:
47
- - system: cpu_percent, cpu_io_wait_percent, memory_percent, swap_usage_percent, disk_usage_percent, load_avg_1/5/15
48
- - network: recv_bytes_per_sec, sent_bytes_per_sec
49
- - storage: disk_free_bytes, disk_free_percent, disk_used_percent, inodes_used_percent, read/write_io_per_second (requires mount_point)
50
- - postgresql.database: blocks_read_per_second, cache_hit_ratio, committed_tx_per_second, connections_total, max_connections, replication_lag_seconds, transactions_per_second
51
- ...plus these when TimescaleDB is installed (they are simply absent from heartbeats otherwise, so a rule on them never fires): timescaledb_hypertable_count, timescaledb_chunk_count, timescaledb_compressed_chunk_count, timescaledb_compression_ratio, timescaledb_total_size_bytes
52
- - mysql.database: connections_total, max_connections, connections_aborted, threads_running, queries_per_second, slow_queries_per_second, replication_lag_seconds, innodb_buffer_pool_hit_ratio, innodb_row_lock_waits_per_second, tmp_disk_tables_per_second, select_full_scans_per_second
53
- - redis.database: used_memory, connected_clients, evicted_keys, expired_keys, keyspace_hits, keyspace_misses, instantaneous_ops_per_sec, rdb_changes_since_last_save, rdb_last_save_time, replication_lag_seconds, connected_slaves, blocked_clients
54
- - clickhouse.database: query_count, queries_per_second, memory_usage, inserted_rows_per_second, selected_rows_per_second, background_merges_count, replication_delay, replication_lag_seconds, disk_used_bytes, connections_count, broken_parts_count
115
+ THE METRIC ALLOW-LIST. \`metric_name\` must appear under the \`metric_type\` you pass or the rule is rejected:
116
+
117
+ ${METRIC_CATALOGUE_TEXT}
118
+
119
+ Match metric_type to the instance's ENGINE. A rule using postgresql.database metrics never fires on a ClickHouse instance - it is accepted and then silently never evaluates, which is worse than an error, so check the engine with \`get_instance\` first if you are unsure.
120
+
121
+ Metrics that exist but never arrive are the other silent failure. The five \`timescaledb_*\` names are absent from heartbeats until TimescaleDB is actually installed, and \`active_replica_count\` only means something on a replicated instance. A rule on a metric the instance does not report does not error - it just never fires. \`get_instance_metrics\` shows what an instance is really sending; if a name is missing there, a rule on it is dead.
122
+
123
+ Two engine-specific traps worth knowing:
124
+ - ClickHouse reports replication health as \`replication_delay\` (seconds behind the quorum). \`replication_lag_seconds\` also exists but \`replication_delay\` is the one the platform's own sync logic reads.
125
+ - Ratio metrics are already percentages on the 0-100 scale - \`cache_hit_ratio\`, \`innodb_buffer_pool_hit_ratio\` and \`mark_cache_hit_ratio\` alike. Set a threshold like 95, not 0.95. (\`timescaledb_compression_ratio\` is the exception: it is a multiplier, so 3.5 means 3.5x.) Redis has no ready-made ratio - compute it from \`keyspace_hits\` and \`keyspace_misses\`.
55
126
 
56
- Match metric_type to the instance's engine - a rule using postgresql.database metrics never fires on a ClickHouse instance. Note ClickHouse reports replication health as replication_delay (seconds behind the quorum), not replication_lag_seconds.`, {
127
+ \`storage\` rules REQUIRE \`mount_point\`, and it must name a real mount on the instance (\`/\`, \`/boot\`, or the engine's data volume - they are reported separately and a rule on the wrong one watches the wrong disk).`, {
57
128
  organization_id: z.string().optional().describe("Organization PID (defaults to active org)"),
58
129
  ...alertRuleSchema,
59
130
  }, async ({ organization_id, ...ruleParams }) => {
@@ -101,7 +172,7 @@ Match metric_type to the instance's engine - a rule using postgresql.database me
101
172
  organization_id: z.string().optional().describe("Organization PID (defaults to active org)"),
102
173
  rule_id: z.string().min(1, "Alert rule PID is required"),
103
174
  name: z.string().optional(),
104
- metric_type: z.enum(["system", "network", "storage", "postgresql.database", "mysql.database", "redis.database", "clickhouse.database"]).optional(),
175
+ metric_type: z.enum(METRIC_TYPES).optional(),
105
176
  metric_name: z.string().optional(),
106
177
  operator: z.enum([">", "<", ">=", "<=", "=="]).optional(),
107
178
  threshold: z.number().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../src/tools/alerts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,SAAS,YAAY,CAAC,eAAwB;IAC5C,OAAO,eAAe,IAAI,OAAO,CAAC,cAAc,EA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