@fruition/fcp-mcp-server 1.31.0 → 1.32.0

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.
package/README.md CHANGED
@@ -40,6 +40,15 @@ MCP (Model Context Protocol) server that gives Claude Code direct access to the
40
40
  | `fcp_db_query` | Run a read-only SQL query (SELECT/SHOW/EXPLAIN/DESCRIBE) against a site's read-only DB replica |
41
41
  | `fcp_cluster_http` | GET/HEAD an in-cluster Kubernetes Service URL through FCP (devs firewalled off the cluster) |
42
42
 
43
+ ### Cluster Safe-Edit Action Tools
44
+
45
+ Structural, audited mutations (operator tier). The caller supplies ONLY a site (+ optional revision); the target deployment is resolved from the site's stack server-side — no deployment name or raw command is ever accepted. Admin-gated REST routes, `CLUSTER_GATEWAY_DISABLED` kill-switch, prod-cluster Slack alert.
46
+
47
+ | Tool | Description |
48
+ |------|-------------|
49
+ | `fcp_restart_varnish` | Restart a site's varnish deployment (rollout restart) |
50
+ | `fcp_rollback_web` | Roll back a site's web (nginx + php-fpm) deployment (rollout undo), optional `to_revision` |
51
+
43
52
  ### Tasker Job Control Tools
44
53
 
45
54
  | Tool | Description |
package/dist/index.d.ts CHANGED
@@ -505,6 +505,15 @@ export declare class FCPClient {
505
505
  cluster?: string;
506
506
  namespace?: string;
507
507
  }): Promise<any>;
508
+ restartVarnish(input: {
509
+ site?: string;
510
+ domain?: string;
511
+ }): Promise<any>;
512
+ rollbackWeb(input: {
513
+ site?: string;
514
+ domain?: string;
515
+ to_revision?: number;
516
+ }): Promise<any>;
508
517
  backupListSites(): Promise<any>;
509
518
  backupGetConfig(): Promise<any>;
510
519
  backupListEligible(): Promise<any>;
package/dist/index.js CHANGED
@@ -176,6 +176,10 @@ const TOOL_PERMISSIONS = {
176
176
  fcp_cluster_deployments: 'viewer',
177
177
  fcp_cluster_events: 'viewer',
178
178
  fcp_cluster_describe: 'viewer',
179
+ // Cluster Safe-Edit Actions (Phase 2) — operator tier (developer tier is a
180
+ // separate cross-cutting follow-up).
181
+ fcp_restart_varnish: 'operator',
182
+ fcp_rollback_web: 'operator',
179
183
  fcp_dns_current: 'viewer',
180
184
  fcp_dns_history: 'viewer',
181
185
  fcp_list_deployments: 'viewer',
@@ -1100,6 +1104,25 @@ export class FCPClient {
1100
1104
  return this.fetch(`/api/cluster/info/describe?${p.toString()}`);
1101
1105
  }
1102
1106
  // ============================================================================
1107
+ // Cluster Safe-Edit Actions (FCP Cluster Gateway, Phase 2)
1108
+ // ============================================================================
1109
+ async restartVarnish(input) {
1110
+ return this.fetch('/api/cluster/actions/restart-varnish', {
1111
+ method: 'POST',
1112
+ body: JSON.stringify({ site: input.site, domain: input.domain }),
1113
+ });
1114
+ }
1115
+ async rollbackWeb(input) {
1116
+ return this.fetch('/api/cluster/actions/rollback-web', {
1117
+ method: 'POST',
1118
+ body: JSON.stringify({
1119
+ site: input.site,
1120
+ domain: input.domain,
1121
+ to_revision: input.to_revision,
1122
+ }),
1123
+ });
1124
+ }
1125
+ // ============================================================================
1103
1126
  // Backup Management Methods
1104
1127
  // ============================================================================
1105
1128
  async backupListSites() {
@@ -3775,6 +3798,35 @@ const TOOLS = [
3775
3798
  },
3776
3799
  },
3777
3800
  // ============================================================================
3801
+ // Cluster Safe-Edit Actions (FCP Cluster Gateway, Phase 2)
3802
+ // Operator-tier, structurally-allowlisted: the caller supplies ONLY a site
3803
+ // (+ optional revision). No deployment name, kind, or raw command is ever
3804
+ // accepted — the deployment is resolved from the site's stack server-side.
3805
+ // ============================================================================
3806
+ {
3807
+ name: 'fcp_restart_varnish',
3808
+ description: "Safe-edit: restart a site's varnish deployment (rollout restart). Target the site by \"site\" (website id or domain) or \"domain\". The varnish deployment is resolved structurally from the site's stack — you do NOT (and cannot) specify a deployment name or command. Operator tier; admin-gated server-side. Honors the cluster-gateway kill-switch.",
3809
+ inputSchema: {
3810
+ type: 'object',
3811
+ properties: {
3812
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace+stack)' },
3813
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3814
+ },
3815
+ },
3816
+ },
3817
+ {
3818
+ name: 'fcp_rollback_web',
3819
+ description: "Safe-edit: roll back a site's web (nginx + php-fpm) deployment (rollout undo), optionally to a specific revision. Target the site by \"site\" (website id or domain) or \"domain\"; optional \"to_revision\" (positive integer). The web deployment is resolved structurally from the site's stack — you do NOT (and cannot) specify a deployment name or command. Operator tier; admin-gated server-side. Honors the cluster-gateway kill-switch.",
3820
+ inputSchema: {
3821
+ type: 'object',
3822
+ properties: {
3823
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace+stack)' },
3824
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3825
+ to_revision: { type: 'number', description: 'Optional revision to roll back to (positive integer)' },
3826
+ },
3827
+ },
3828
+ },
3829
+ // ============================================================================
3778
3830
  // Backup Management Tools
3779
3831
  // ============================================================================
3780
3832
  {
@@ -5783,6 +5835,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
5783
5835
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5784
5836
  }
5785
5837
  // ============================================================================
5838
+ // Cluster Safe-Edit Action Handlers (FCP Cluster Gateway, Phase 2)
5839
+ // ============================================================================
5840
+ case 'fcp_restart_varnish': {
5841
+ const result = await client.restartVarnish(args);
5842
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5843
+ }
5844
+ case 'fcp_rollback_web': {
5845
+ const result = await client.rollbackWeb(args);
5846
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5847
+ }
5848
+ // ============================================================================
5786
5849
  // Backup Management Handlers
5787
5850
  // ============================================================================
5788
5851
  case 'fcp_backup_list_sites': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fruition/fcp-mcp-server",
3
- "version": "1.31.0",
3
+ "version": "1.32.0",
4
4
  "description": "MCP Server for FCP Launch Coordination System - enables Claude Code to interact with FCP launches and track development time",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",