@fruition/fcp-mcp-server 1.30.0 → 1.31.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
@@ -33,6 +33,13 @@ MCP (Model Context Protocol) server that gives Claude Code direct access to the
33
33
  | `fcp_get_certificate` | Single certificate detail (issuer, SANs, expiry) |
34
34
  | `fcp_scan_certificates` | Trigger a cert-monitor scan run |
35
35
 
36
+ ### Cluster Gateway Tools
37
+
38
+ | Tool | Description |
39
+ |------|-------------|
40
+ | `fcp_db_query` | Run a read-only SQL query (SELECT/SHOW/EXPLAIN/DESCRIBE) against a site's read-only DB replica |
41
+ | `fcp_cluster_http` | GET/HEAD an in-cluster Kubernetes Service URL through FCP (devs firewalled off the cluster) |
42
+
36
43
  ### Tasker Job Control Tools
37
44
 
38
45
  | Tool | Description |
package/dist/index.d.ts CHANGED
@@ -416,6 +416,20 @@ export declare class FCPClient {
416
416
  enabled?: boolean;
417
417
  created_by?: string;
418
418
  }): Promise<any>;
419
+ clusterDbQuery(input: {
420
+ site?: number | string;
421
+ domain?: string;
422
+ sql: string;
423
+ limit?: number;
424
+ }): Promise<any>;
425
+ clusterHttp(input: {
426
+ cluster: string;
427
+ namespace: string;
428
+ service: string;
429
+ port: number;
430
+ path?: string;
431
+ method?: string;
432
+ }): Promise<any>;
419
433
  listCertificates(filters?: {
420
434
  status?: string;
421
435
  cluster?: string;
@@ -451,6 +465,46 @@ export declare class FCPClient {
451
465
  reason?: string;
452
466
  ttl_minutes?: number;
453
467
  }): Promise<any>;
468
+ clusterPods(input: {
469
+ site?: string;
470
+ domain?: string;
471
+ cluster?: string;
472
+ namespace?: string;
473
+ labelSelector?: string;
474
+ }): Promise<any>;
475
+ clusterLogs(input: {
476
+ pod: string;
477
+ site?: string;
478
+ domain?: string;
479
+ cluster?: string;
480
+ namespace?: string;
481
+ }): Promise<any>;
482
+ clusterIngress(input: {
483
+ site?: string;
484
+ domain?: string;
485
+ cluster?: string;
486
+ namespace?: string;
487
+ }): Promise<any>;
488
+ clusterDeployments(input: {
489
+ site?: string;
490
+ domain?: string;
491
+ cluster?: string;
492
+ namespace?: string;
493
+ }): Promise<any>;
494
+ clusterEvents(input: {
495
+ site?: string;
496
+ domain?: string;
497
+ cluster?: string;
498
+ namespace?: string;
499
+ }): Promise<any>;
500
+ clusterDescribe(input: {
501
+ kind: string;
502
+ name: string;
503
+ site?: string;
504
+ domain?: string;
505
+ cluster?: string;
506
+ namespace?: string;
507
+ }): Promise<any>;
454
508
  backupListSites(): Promise<any>;
455
509
  backupGetConfig(): Promise<any>;
456
510
  backupListEligible(): Promise<any>;
package/dist/index.js CHANGED
@@ -167,7 +167,15 @@ const TOOL_PERMISSIONS = {
167
167
  fcp_trusted_ip_list_ranges: 'viewer',
168
168
  fcp_trusted_ip_export: 'viewer',
169
169
  fcp_list_freezes: 'viewer',
170
+ fcp_db_query: 'viewer',
171
+ fcp_cluster_http: 'viewer',
170
172
  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',
171
179
  fcp_dns_current: 'viewer',
172
180
  fcp_dns_history: 'viewer',
173
181
  fcp_list_deployments: 'viewer',
@@ -920,6 +928,21 @@ export class FCPClient {
920
928
  });
921
929
  }
922
930
  // ============================================================================
931
+ // Cluster DB + HTTP Methods
932
+ // ============================================================================
933
+ async clusterDbQuery(input) {
934
+ return this.fetch('/api/cluster/db-query', {
935
+ method: 'POST',
936
+ body: JSON.stringify(input),
937
+ });
938
+ }
939
+ async clusterHttp(input) {
940
+ return this.fetch('/api/cluster/http', {
941
+ method: 'POST',
942
+ body: JSON.stringify(input),
943
+ });
944
+ }
945
+ // ============================================================================
923
946
  // Certificate Methods
924
947
  // ============================================================================
925
948
  async listCertificates(filters) {
@@ -993,6 +1016,90 @@ export class FCPClient {
993
1016
  return this.fetch(path, { method: 'POST', body: JSON.stringify(body) });
994
1017
  }
995
1018
  // ============================================================================
1019
+ // Cluster Info (read-only) Methods
1020
+ // ============================================================================
1021
+ async clusterPods(input) {
1022
+ const p = new URLSearchParams();
1023
+ if (input.site)
1024
+ p.append('site', input.site);
1025
+ if (input.domain)
1026
+ p.append('domain', input.domain);
1027
+ if (input.cluster)
1028
+ p.append('cluster', input.cluster);
1029
+ if (input.namespace)
1030
+ p.append('namespace', input.namespace);
1031
+ if (input.labelSelector)
1032
+ p.append('labelSelector', input.labelSelector);
1033
+ const qs = p.toString();
1034
+ return this.fetch(`/api/cluster/info/pods${qs ? `?${qs}` : ''}`);
1035
+ }
1036
+ async clusterLogs(input) {
1037
+ const p = new URLSearchParams();
1038
+ p.append('pod', input.pod);
1039
+ if (input.site)
1040
+ p.append('site', input.site);
1041
+ if (input.domain)
1042
+ p.append('domain', input.domain);
1043
+ if (input.cluster)
1044
+ p.append('cluster', input.cluster);
1045
+ if (input.namespace)
1046
+ p.append('namespace', input.namespace);
1047
+ return this.fetch(`/api/cluster/info/logs?${p.toString()}`);
1048
+ }
1049
+ async clusterIngress(input) {
1050
+ const p = new URLSearchParams();
1051
+ if (input.site)
1052
+ p.append('site', input.site);
1053
+ if (input.domain)
1054
+ p.append('domain', input.domain);
1055
+ if (input.cluster)
1056
+ p.append('cluster', input.cluster);
1057
+ if (input.namespace)
1058
+ p.append('namespace', input.namespace);
1059
+ const qs = p.toString();
1060
+ return this.fetch(`/api/cluster/info/ingress${qs ? `?${qs}` : ''}`);
1061
+ }
1062
+ async clusterDeployments(input) {
1063
+ const p = new URLSearchParams();
1064
+ if (input.site)
1065
+ p.append('site', input.site);
1066
+ if (input.domain)
1067
+ p.append('domain', input.domain);
1068
+ if (input.cluster)
1069
+ p.append('cluster', input.cluster);
1070
+ if (input.namespace)
1071
+ p.append('namespace', input.namespace);
1072
+ const qs = p.toString();
1073
+ return this.fetch(`/api/cluster/info/deployments${qs ? `?${qs}` : ''}`);
1074
+ }
1075
+ async clusterEvents(input) {
1076
+ const p = new URLSearchParams();
1077
+ if (input.site)
1078
+ p.append('site', input.site);
1079
+ if (input.domain)
1080
+ p.append('domain', input.domain);
1081
+ if (input.cluster)
1082
+ p.append('cluster', input.cluster);
1083
+ if (input.namespace)
1084
+ p.append('namespace', input.namespace);
1085
+ const qs = p.toString();
1086
+ return this.fetch(`/api/cluster/info/events${qs ? `?${qs}` : ''}`);
1087
+ }
1088
+ async clusterDescribe(input) {
1089
+ const p = new URLSearchParams();
1090
+ p.append('kind', input.kind);
1091
+ p.append('name', input.name);
1092
+ if (input.site)
1093
+ p.append('site', input.site);
1094
+ if (input.domain)
1095
+ p.append('domain', input.domain);
1096
+ if (input.cluster)
1097
+ p.append('cluster', input.cluster);
1098
+ if (input.namespace)
1099
+ p.append('namespace', input.namespace);
1100
+ return this.fetch(`/api/cluster/info/describe?${p.toString()}`);
1101
+ }
1102
+ // ============================================================================
996
1103
  // Backup Management Methods
997
1104
  // ============================================================================
998
1105
  async backupListSites() {
@@ -3450,6 +3557,39 @@ const TOOLS = [
3450
3557
  },
3451
3558
  },
3452
3559
  // ============================================================================
3560
+ // Cluster DB + HTTP Tools
3561
+ // ============================================================================
3562
+ {
3563
+ name: 'fcp_db_query',
3564
+ description: 'Run a READ-ONLY SQL query against a site\'s read-only DB replica. Provide either site (numeric id) or domain, plus a single SELECT/SHOW/EXPLAIN/DESCRIBE statement. Writes/DDL/multi-statement are rejected. Rows are capped (default 200). Use to inspect site data without cluster access.',
3565
+ inputSchema: {
3566
+ type: 'object',
3567
+ properties: {
3568
+ site: { type: 'number', description: 'Site id (provide site OR domain)' },
3569
+ domain: { type: 'string', description: 'Site domain (provide site OR domain)' },
3570
+ sql: { type: 'string', description: 'Single read-only statement (SELECT/SHOW/EXPLAIN/DESCRIBE)' },
3571
+ limit: { type: 'number', description: 'Max rows to return (default 200, max 1000)' },
3572
+ },
3573
+ required: ['sql'],
3574
+ },
3575
+ },
3576
+ {
3577
+ name: 'fcp_cluster_http',
3578
+ description: 'Fetch an in-cluster Kubernetes Service URL through FCP (devs are firewalled off the cluster). Builds http://<service>.<namespace>:<port>/<path>. Only GET/HEAD allowed; response body is size-capped. Use to hit health/metrics/internal endpoints.',
3579
+ inputSchema: {
3580
+ type: 'object',
3581
+ properties: {
3582
+ cluster: { type: 'string', description: 'Target cluster name (recorded for audit)' },
3583
+ namespace: { type: 'string', description: 'Kubernetes namespace' },
3584
+ service: { type: 'string', description: 'Kubernetes Service name' },
3585
+ port: { type: 'number', description: 'Service port' },
3586
+ path: { type: 'string', description: 'Request path (default /)' },
3587
+ method: { type: 'string', enum: ['GET', 'HEAD'], description: 'HTTP method (default GET)' },
3588
+ },
3589
+ required: ['cluster', 'namespace', 'service', 'port'],
3590
+ },
3591
+ },
3592
+ // ============================================================================
3453
3593
  // Certificate Tools
3454
3594
  // ============================================================================
3455
3595
  {
@@ -3548,6 +3688,93 @@ const TOOLS = [
3548
3688
  },
3549
3689
  },
3550
3690
  // ============================================================================
3691
+ // Cluster Info (read-only) Tools
3692
+ // ============================================================================
3693
+ {
3694
+ name: 'fcp_cluster_pods',
3695
+ description: 'List pods in a namespace (read-only cluster gateway for firewalled devs). Target a namespace by EITHER a site (\"site\"/\"domain\") OR an explicit \"cluster\"+\"namespace\" pair. Optional labelSelector.',
3696
+ inputSchema: {
3697
+ type: 'object',
3698
+ properties: {
3699
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace)' },
3700
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3701
+ cluster: { type: 'string', description: 'Explicit cluster name (with namespace)' },
3702
+ namespace: { type: 'string', description: 'Explicit namespace (with cluster)' },
3703
+ labelSelector: { type: 'string', description: 'Optional label selector (e.g. app=web)' },
3704
+ },
3705
+ },
3706
+ },
3707
+ {
3708
+ name: 'fcp_cluster_logs',
3709
+ description: 'Tail logs (last 1000 lines) for a pod (read-only cluster gateway). Requires pod. Target a namespace by EITHER a site (\"site\"/\"domain\") OR an explicit \"cluster\"+\"namespace\" pair.',
3710
+ inputSchema: {
3711
+ type: 'object',
3712
+ properties: {
3713
+ pod: { type: 'string', description: 'Pod name to read logs from' },
3714
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace)' },
3715
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3716
+ cluster: { type: 'string', description: 'Explicit cluster name (with namespace)' },
3717
+ namespace: { type: 'string', description: 'Explicit namespace (with cluster)' },
3718
+ },
3719
+ required: ['pod'],
3720
+ },
3721
+ },
3722
+ {
3723
+ name: 'fcp_cluster_ingress',
3724
+ description: 'List ingresses in a namespace (read-only cluster gateway). Target a namespace by EITHER a site (\"site\"/\"domain\") OR an explicit \"cluster\"+\"namespace\" pair.',
3725
+ inputSchema: {
3726
+ type: 'object',
3727
+ properties: {
3728
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace)' },
3729
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3730
+ cluster: { type: 'string', description: 'Explicit cluster name (with namespace)' },
3731
+ namespace: { type: 'string', description: 'Explicit namespace (with cluster)' },
3732
+ },
3733
+ },
3734
+ },
3735
+ {
3736
+ name: 'fcp_cluster_deployments',
3737
+ description: 'List deployments in a namespace (read-only cluster gateway). Target a namespace by EITHER a site (\"site\"/\"domain\") OR an explicit \"cluster\"+\"namespace\" pair.',
3738
+ inputSchema: {
3739
+ type: 'object',
3740
+ properties: {
3741
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace)' },
3742
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3743
+ cluster: { type: 'string', description: 'Explicit cluster name (with namespace)' },
3744
+ namespace: { type: 'string', description: 'Explicit namespace (with cluster)' },
3745
+ },
3746
+ },
3747
+ },
3748
+ {
3749
+ name: 'fcp_cluster_events',
3750
+ description: 'List namespace events sorted by lastTimestamp (read-only cluster gateway). Target a namespace by EITHER a site (\"site\"/\"domain\") OR an explicit \"cluster\"+\"namespace\" pair.',
3751
+ inputSchema: {
3752
+ type: 'object',
3753
+ properties: {
3754
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace)' },
3755
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3756
+ cluster: { type: 'string', description: 'Explicit cluster name (with namespace)' },
3757
+ namespace: { type: 'string', description: 'Explicit namespace (with cluster)' },
3758
+ },
3759
+ },
3760
+ },
3761
+ {
3762
+ name: 'fcp_cluster_describe',
3763
+ description: 'kubectl describe <kind> <name> in a namespace (read-only cluster gateway). Requires kind + name. Target a namespace by EITHER a site (\"site\"/\"domain\") OR an explicit \"cluster\"+\"namespace\" pair.',
3764
+ inputSchema: {
3765
+ type: 'object',
3766
+ properties: {
3767
+ kind: { type: 'string', description: 'Resource kind (e.g. pod, deployment, ingress)' },
3768
+ name: { type: 'string', description: 'Resource name to describe' },
3769
+ site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace)' },
3770
+ domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
3771
+ cluster: { type: 'string', description: 'Explicit cluster name (with namespace)' },
3772
+ namespace: { type: 'string', description: 'Explicit namespace (with cluster)' },
3773
+ },
3774
+ required: ['kind', 'name'],
3775
+ },
3776
+ },
3777
+ // ============================================================================
3551
3778
  // Backup Management Tools
3552
3779
  // ============================================================================
3553
3780
  {
@@ -5470,6 +5697,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
5470
5697
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5471
5698
  }
5472
5699
  // ============================================================================
5700
+ // Cluster DB + HTTP Handlers
5701
+ // ============================================================================
5702
+ case 'fcp_db_query': {
5703
+ const result = await client.clusterDbQuery(args);
5704
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5705
+ }
5706
+ case 'fcp_cluster_http': {
5707
+ const result = await client.clusterHttp(args);
5708
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5709
+ }
5710
+ // ============================================================================
5473
5711
  // Certificate Handlers
5474
5712
  // ============================================================================
5475
5713
  case 'fcp_list_certificates': {
@@ -5518,6 +5756,33 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
5518
5756
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5519
5757
  }
5520
5758
  // ============================================================================
5759
+ // Cluster Info (read-only) Handlers
5760
+ // ============================================================================
5761
+ case 'fcp_cluster_pods': {
5762
+ const result = await client.clusterPods(args);
5763
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5764
+ }
5765
+ case 'fcp_cluster_logs': {
5766
+ const result = await client.clusterLogs(args);
5767
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5768
+ }
5769
+ case 'fcp_cluster_ingress': {
5770
+ const result = await client.clusterIngress(args);
5771
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5772
+ }
5773
+ case 'fcp_cluster_deployments': {
5774
+ const result = await client.clusterDeployments(args);
5775
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5776
+ }
5777
+ case 'fcp_cluster_events': {
5778
+ const result = await client.clusterEvents(args);
5779
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5780
+ }
5781
+ case 'fcp_cluster_describe': {
5782
+ const result = await client.clusterDescribe(args);
5783
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5784
+ }
5785
+ // ============================================================================
5521
5786
  // Backup Management Handlers
5522
5787
  // ============================================================================
5523
5788
  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.30.0",
3
+ "version": "1.31.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",