Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

manage_cloudwaf

Manage Fastly CloudWAF instances to protect web applications by listing, creating, updating, or deleting deployments with configuration options for domains, regions, and security settings.

Instructions

Manage CloudWAF instances

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpNameNoCorporation name (uses context default if not provided)
actionYesAction to perform
deploymentIdNoDeployment ID (for get/update/delete)
nameNoInstance name
descriptionNoInstance description
regionNoAWS region
tlsMinVersionNoMinimum TLS version
siteNameNoSite name for configuration
domainsNoDomains to protect
originNoOrigin server URL

Implementation Reference

  • Primary execution handler for the 'manage_cloudwaf' tool. Dispatches to appropriate CloudWAF client methods based on the 'action' parameter (list, create, get, update, delete).
    case 'manage_cloudwaf': const { corpName: corpForCloudWAF } = resolveContext(typedArgs); if (typedArgs.action === 'list') { result = await client.listCloudWAFInstances(corpForCloudWAF); } else if (typedArgs.action === 'create') { const instanceData = { name: typedArgs.name, description: typedArgs.description, region: typedArgs.region, tlsMinVersion: typedArgs.tlsMinVersion, workspaceConfigs: [{ siteName: typedArgs.siteName, instanceLocation: "direct", listenerProtocols: ["https"], routes: [{ domains: typedArgs.domains, origin: typedArgs.origin, passHostHeader: false, connectionPooling: true, trustProxyHeaders: false, }], }], }; result = await client.createCloudWAFInstance(corpForCloudWAF, instanceData); } else if (typedArgs.action === 'get') { result = await client.getCloudWAFInstance(corpForCloudWAF, typedArgs.deploymentId); } else if (typedArgs.action === 'update') { const instanceData = { name: typedArgs.name, description: typedArgs.description, region: typedArgs.region, tlsMinVersion: typedArgs.tlsMinVersion, }; result = await client.updateCloudWAFInstance(corpForCloudWAF, typedArgs.deploymentId, instanceData); } else if (typedArgs.action === 'delete') { result = await client.deleteCloudWAFInstance(corpForCloudWAF, typedArgs.deploymentId); } break;
  • server.js:777-796 (registration)
    Registration of the 'manage_cloudwaf' tool in the tools list, including name, description, and input schema. This is returned by the ListToolsRequestSchema handler.
    { name: 'manage_cloudwaf', description: 'Manage CloudWAF instances', inputSchema: { type: 'object', properties: { corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' }, action: { type: 'string', enum: ['list', 'create', 'get', 'update', 'delete'], description: 'Action to perform' }, deploymentId: { type: 'string', description: 'Deployment ID (for get/update/delete)' }, name: { type: 'string', description: 'Instance name' }, description: { type: 'string', description: 'Instance description' }, region: { type: 'string', description: 'AWS region' }, tlsMinVersion: { type: 'string', enum: ['1.0', '1.2'], description: 'Minimum TLS version' }, siteName: { type: 'string', description: 'Site name for configuration' }, domains: { type: 'array', items: { type: 'string' }, description: 'Domains to protect' }, origin: { type: 'string', description: 'Origin server URL' }, }, required: ['action'], }, },
  • Input schema definition for the 'manage_cloudwaf' tool, specifying parameters and validation rules.
    inputSchema: { type: 'object', properties: { corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' }, action: { type: 'string', enum: ['list', 'create', 'get', 'update', 'delete'], description: 'Action to perform' }, deploymentId: { type: 'string', description: 'Deployment ID (for get/update/delete)' }, name: { type: 'string', description: 'Instance name' }, description: { type: 'string', description: 'Instance description' }, region: { type: 'string', description: 'AWS region' }, tlsMinVersion: { type: 'string', enum: ['1.0', '1.2'], description: 'Minimum TLS version' }, siteName: { type: 'string', description: 'Site name for configuration' }, domains: { type: 'array', items: { type: 'string' }, description: 'Domains to protect' }, origin: { type: 'string', description: 'Origin server URL' }, }, required: ['action'],
  • Supporting methods in the FastlyNGWAFClient class that implement the core API interactions for managing CloudWAF instances (list, create, get, update, delete).
    // CloudWAF Management async listCloudWAFInstances(corpName) { const response = await this.api.get(`/corps/${corpName}/cloudwafInstances`); return response.data; } async createCloudWAFInstance(corpName, instanceData) { const response = await this.api.post(`/corps/${corpName}/cloudwafInstances`, instanceData); return response.data; } async getCloudWAFInstance(corpName, deploymentId) { const response = await this.api.get(`/corps/${corpName}/cloudwafInstances/${deploymentId}`); return response.data; } async updateCloudWAFInstance(corpName, deploymentId, instanceData) { const response = await this.api.put(`/corps/${corpName}/cloudwafInstances/${deploymentId}`, instanceData); return response.data; } async deleteCloudWAFInstance(corpName, deploymentId) { await this.api.delete(`/corps/${corpName}/cloudwafInstances/${deploymentId}`); return { success: true }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/purpleax/FastlyMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server