@fruition/fcp-mcp-server 1.33.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 +46 -0
- 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
|
@@ -181,6 +181,9 @@ const TOOL_PERMISSIONS = {
|
|
|
181
181
|
// cluster-gateway access for firewalled devs).
|
|
182
182
|
fcp_restart_varnish: 'developer',
|
|
183
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',
|
|
184
187
|
fcp_dns_current: 'viewer',
|
|
185
188
|
fcp_dns_history: 'viewer',
|
|
186
189
|
fcp_list_deployments: 'viewer',
|
|
@@ -1124,6 +1127,21 @@ export class FCPClient {
|
|
|
1124
1127
|
});
|
|
1125
1128
|
}
|
|
1126
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
|
+
// ============================================================================
|
|
1127
1145
|
// Backup Management Methods
|
|
1128
1146
|
// ============================================================================
|
|
1129
1147
|
async backupListSites() {
|
|
@@ -3828,6 +3846,30 @@ const TOOLS = [
|
|
|
3828
3846
|
},
|
|
3829
3847
|
},
|
|
3830
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
|
+
// ============================================================================
|
|
3831
3873
|
// Backup Management Tools
|
|
3832
3874
|
// ============================================================================
|
|
3833
3875
|
{
|
|
@@ -5846,6 +5888,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
5846
5888
|
const result = await client.rollbackWeb(args);
|
|
5847
5889
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
5848
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
|
+
}
|
|
5849
5895
|
// ============================================================================
|
|
5850
5896
|
// Backup Management Handlers
|
|
5851
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",
|