@fruition/fcp-mcp-server 1.31.0 → 1.33.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
@@ -84,6 +84,7 @@ const ROLE_HIERARCHY = [
84
84
  'admin',
85
85
  'billing_admin',
86
86
  'operator',
87
+ 'developer',
87
88
  'viewer',
88
89
  'none',
89
90
  ];
@@ -167,15 +168,19 @@ const TOOL_PERMISSIONS = {
167
168
  fcp_trusted_ip_list_ranges: 'viewer',
168
169
  fcp_trusted_ip_export: 'viewer',
169
170
  fcp_list_freezes: 'viewer',
170
- fcp_db_query: 'viewer',
171
- fcp_cluster_http: 'viewer',
171
+ fcp_db_query: 'developer',
172
+ fcp_cluster_http: 'developer',
172
173
  fcp_list_certificates: 'viewer',
173
- fcp_cluster_pods: 'viewer',
174
- fcp_cluster_logs: 'viewer',
175
- fcp_cluster_ingress: 'viewer',
176
- fcp_cluster_deployments: 'viewer',
177
- fcp_cluster_events: 'viewer',
178
- fcp_cluster_describe: 'viewer',
174
+ fcp_cluster_pods: 'developer',
175
+ fcp_cluster_logs: 'developer',
176
+ fcp_cluster_ingress: 'developer',
177
+ fcp_cluster_deployments: 'developer',
178
+ fcp_cluster_events: 'developer',
179
+ fcp_cluster_describe: 'developer',
180
+ // Cluster Safe-Edit Actions (Phase 2) — developer tier (least-privilege
181
+ // cluster-gateway access for firewalled devs).
182
+ fcp_restart_varnish: 'developer',
183
+ fcp_rollback_web: 'developer',
179
184
  fcp_dns_current: 'viewer',
180
185
  fcp_dns_history: 'viewer',
181
186
  fcp_list_deployments: 'viewer',
@@ -1100,6 +1105,25 @@ export class FCPClient {
1100
1105
  return this.fetch(`/api/cluster/info/describe?${p.toString()}`);
1101
1106
  }
1102
1107
  // ============================================================================
1108
+ // Cluster Safe-Edit Actions (FCP Cluster Gateway, Phase 2)
1109
+ // ============================================================================
1110
+ async restartVarnish(input) {
1111
+ return this.fetch('/api/cluster/actions/restart-varnish', {
1112
+ method: 'POST',
1113
+ body: JSON.stringify({ site: input.site, domain: input.domain }),
1114
+ });
1115
+ }
1116
+ async rollbackWeb(input) {
1117
+ return this.fetch('/api/cluster/actions/rollback-web', {
1118
+ method: 'POST',
1119
+ body: JSON.stringify({
1120
+ site: input.site,
1121
+ domain: input.domain,
1122
+ to_revision: input.to_revision,
1123
+ }),
1124
+ });
1125
+ }
1126
+ // ============================================================================
1103
1127
  // Backup Management Methods
1104
1128
  // ============================================================================
1105
1129
  async backupListSites() {
@@ -3775,6 +3799,35 @@ const TOOLS = [
3775
3799
  },
3776
3800
  },
3777
3801
  // ============================================================================
3802
+ // Cluster Safe-Edit Actions (FCP Cluster Gateway, Phase 2)
3803
+ // Operator-tier, structurally-allowlisted: the caller supplies ONLY a site
3804
+ // (+ optional revision). No deployment name, kind, or raw command is ever
3805
+ // accepted — the deployment is resolved from the site's stack server-side.
3806
+ // ============================================================================
3807
+ {
3808
+ name: 'fcp_restart_varnish',
3809
+ 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.",
3810
+ inputSchema: {
3811
+ type: 'object',
3812
+ properties: {
3813
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace+stack)' },
3814
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3815
+ },
3816
+ },
3817
+ },
3818
+ {
3819
+ name: 'fcp_rollback_web',
3820
+ 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.",
3821
+ inputSchema: {
3822
+ type: 'object',
3823
+ properties: {
3824
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace+stack)' },
3825
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3826
+ to_revision: { type: 'number', description: 'Optional revision to roll back to (positive integer)' },
3827
+ },
3828
+ },
3829
+ },
3830
+ // ============================================================================
3778
3831
  // Backup Management Tools
3779
3832
  // ============================================================================
3780
3833
  {
@@ -5783,6 +5836,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
5783
5836
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5784
5837
  }
5785
5838
  // ============================================================================
5839
+ // Cluster Safe-Edit Action Handlers (FCP Cluster Gateway, Phase 2)
5840
+ // ============================================================================
5841
+ case 'fcp_restart_varnish': {
5842
+ const result = await client.restartVarnish(args);
5843
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5844
+ }
5845
+ case 'fcp_rollback_web': {
5846
+ const result = await client.rollbackWeb(args);
5847
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5848
+ }
5849
+ // ============================================================================
5786
5850
  // Backup Management Handlers
5787
5851
  // ============================================================================
5788
5852
  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.33.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",