@fruition/fcp-mcp-server 1.32.0 → 1.34.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/dist/index.d.ts +7 -0
- package/dist/index.js +59 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -514,6 +514,13 @@ export declare class FCPClient {
|
|
|
514
514
|
domain?: string;
|
|
515
515
|
to_revision?: number;
|
|
516
516
|
}): Promise<any>;
|
|
517
|
+
tunnelGrant(input: {
|
|
518
|
+
site?: string;
|
|
519
|
+
domain?: string;
|
|
520
|
+
service: string;
|
|
521
|
+
port?: number;
|
|
522
|
+
ttl_seconds?: number;
|
|
523
|
+
}): Promise<any>;
|
|
517
524
|
backupListSites(): Promise<any>;
|
|
518
525
|
backupGetConfig(): Promise<any>;
|
|
519
526
|
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,19 +168,22 @@ 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: '
|
|
171
|
-
fcp_cluster_http: '
|
|
171
|
+
fcp_db_query: 'developer',
|
|
172
|
+
fcp_cluster_http: 'developer',
|
|
172
173
|
fcp_list_certificates: 'viewer',
|
|
173
|
-
fcp_cluster_pods: '
|
|
174
|
-
fcp_cluster_logs: '
|
|
175
|
-
fcp_cluster_ingress: '
|
|
176
|
-
fcp_cluster_deployments: '
|
|
177
|
-
fcp_cluster_events: '
|
|
178
|
-
fcp_cluster_describe: '
|
|
179
|
-
// Cluster Safe-Edit Actions (Phase 2) —
|
|
180
|
-
//
|
|
181
|
-
fcp_restart_varnish: '
|
|
182
|
-
fcp_rollback_web: '
|
|
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',
|
|
184
|
+
// Cluster Tunnel Grant (Phase 3a) — developer tier (mints a scoped
|
|
185
|
+
// short-lived JWT for the firewalled fcp-tunnel CLI; relay not yet built).
|
|
186
|
+
fcp_tunnel_grant: 'developer',
|
|
183
187
|
fcp_dns_current: 'viewer',
|
|
184
188
|
fcp_dns_history: 'viewer',
|
|
185
189
|
fcp_list_deployments: 'viewer',
|
|
@@ -1123,6 +1127,21 @@ export class FCPClient {
|
|
|
1123
1127
|
});
|
|
1124
1128
|
}
|
|
1125
1129
|
// ============================================================================
|
|
1130
|
+
// Cluster Tunnel Grant (FCP Cluster Gateway, Phase 3a)
|
|
1131
|
+
// ============================================================================
|
|
1132
|
+
async tunnelGrant(input) {
|
|
1133
|
+
return this.fetch('/api/cluster/tunnel/grant', {
|
|
1134
|
+
method: 'POST',
|
|
1135
|
+
body: JSON.stringify({
|
|
1136
|
+
site: input.site,
|
|
1137
|
+
domain: input.domain,
|
|
1138
|
+
service: input.service,
|
|
1139
|
+
port: input.port,
|
|
1140
|
+
ttl_seconds: input.ttl_seconds,
|
|
1141
|
+
}),
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
// ============================================================================
|
|
1126
1145
|
// Backup Management Methods
|
|
1127
1146
|
// ============================================================================
|
|
1128
1147
|
async backupListSites() {
|
|
@@ -3827,6 +3846,30 @@ const TOOLS = [
|
|
|
3827
3846
|
},
|
|
3828
3847
|
},
|
|
3829
3848
|
// ============================================================================
|
|
3849
|
+
// Cluster Tunnel Grant Tool (FCP Cluster Gateway, Phase 3a)
|
|
3850
|
+
// Developer-tier. Mints a short-lived, scoped JWT for the (separately-built,
|
|
3851
|
+
// not-yet-published) fcp-tunnel CLI to tunnel into ONE in-cluster Service:port.
|
|
3852
|
+
// ============================================================================
|
|
3853
|
+
{
|
|
3854
|
+
name: 'fcp_tunnel_grant',
|
|
3855
|
+
description: "Mint a short-lived, scoped tunnel token for a site's in-cluster service. Target the site by \"site\" (website id or domain) or \"domain\"; pick a logical \"service\" kind (web | varnish | php-fpm | db). The real Service:port (or read-only DB replica for db) is resolved server-side — you do NOT specify a deployment, host, or port. Returns a signed JWT (max 4h TTL), its expiry, and the exact fcp-tunnel command to run. NOTE: the fcp-tunnel CLI + the relay (tunnel-service) are NOT shipped yet; this only mints the token. Developer tier; cluster-gateway gated server-side. Honors the kill-switch.",
|
|
3856
|
+
inputSchema: {
|
|
3857
|
+
type: 'object',
|
|
3858
|
+
properties: {
|
|
3859
|
+
site: { type: 'string', description: 'Website id or domain (resolves cluster+namespace)' },
|
|
3860
|
+
domain: { type: 'string', description: 'Alias for site: a domain to resolve' },
|
|
3861
|
+
service: {
|
|
3862
|
+
type: 'string',
|
|
3863
|
+
enum: ['web', 'varnish', 'php-fpm', 'db'],
|
|
3864
|
+
description: 'Logical service kind to tunnel to (db tunnels to the read-only replica)',
|
|
3865
|
+
},
|
|
3866
|
+
port: { type: 'number', description: 'Reserved; the port is always resolved server-side' },
|
|
3867
|
+
ttl_seconds: { type: 'number', description: 'Requested token lifetime in seconds (capped at 4h)' },
|
|
3868
|
+
},
|
|
3869
|
+
required: ['service'],
|
|
3870
|
+
},
|
|
3871
|
+
},
|
|
3872
|
+
// ============================================================================
|
|
3830
3873
|
// Backup Management Tools
|
|
3831
3874
|
// ============================================================================
|
|
3832
3875
|
{
|
|
@@ -5845,6 +5888,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
5845
5888
|
const result = await client.rollbackWeb(args);
|
|
5846
5889
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
5847
5890
|
}
|
|
5891
|
+
case 'fcp_tunnel_grant': {
|
|
5892
|
+
const result = await client.tunnelGrant(args);
|
|
5893
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
5894
|
+
}
|
|
5848
5895
|
// ============================================================================
|
|
5849
5896
|
// Backup Management Handlers
|
|
5850
5897
|
// ============================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fruition/fcp-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.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",
|