Fastly NGWAF

by purpleax

Not rated
GitHub

About

Manage web application security through the Fastly NGWAF API using natural language.

Details

Author
purpleax
Categories
Cloud Service, Security, Infrastructure, API

Setup

Install Fastly NGWAF in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/purpleax/FastlyMCP

Follow the installation instructions in the repository README, then restart your MCP client.

A comprehensive Model Context Protocol (MCP) server that provides seamless integration with the Fastly NGWAF (Next-Gen Web Application Firewall) API. This server enables AI assistants like Claude to manage web application security through natural language interactions.

- Create, read, update, and delete security rules
- Manage IP allow/block lists
- Configure rate limiting and alerts
- Monitor security events and analytics

- Corporation and site-level management
- Context-aware operations
- Bulk operations across multiple sites

- Natural language rule creation
- Intelligent threat pattern detection
- Automated security policy suggestions

- Node.js 18+
- Fastly NGWAF account with API access
- MCP-compatible AI assistant (Claude Desktop, etc.)

git clone https://github.com/yourusername/FastlyMCP.git cd FastlyMCP

- Configure environment variables (optional)

# Create .env file FASTLY_NGWAF_EMAIL=your-email@example.com FASTLY_NGWAF_TOKEN=your-api-token FASTLY_NGWAF_DEFAULT_CORP=your-corp-name FASTLY_NGWAF_DEFAULT_SITE=your-site-name

Add this to your Claude Desktop configuration file:

Windows:%APPDATA%\Claude\claude_desktop_config.jsonmacOS:~/Library/Application Support/Claude/claude_desktop_config.json

{ "mcpServers": { "fastly-ngwaf": { "command": "node", "args": ["path/to/FastlyMCP/server.js"], "env": { "FASTLY_NGWAF_EMAIL": "your-email@example.com", "FASTLY_NGWAF_TOKEN": "your-api-token" } } } }

Natural Language:"Create a rule to block SQL injection attacks on my website"

AI Response: The assistant will automatically:
- Detect the intent (create security rule)
- Identify the threat type (SQL injection)
- Generate appropriate rule conditions
- Apply the rule to your configured site

- set_credentials- Configure API credentials
- test_connection- Validate API connectivity
- set_context- Set default corp/site context
- discover_environment- Explore available resources

- list_corp_rules/list_site_rules- List security rules
- create_corp_rule/create_site_rule- Create new rules
- delete_corp_rule/delete_site_rule- Remove rules

- list_events- View security events
- search_requests- Search request logs
- get_suspicious_ips- Identify threat sources
- expire_event- Manually unblock IPs

- manage_whitelist- Allow/block IP addresses
- manage_blacklist- Block malicious IPs
- manage_lists- Custom IP/country/string lists

- get_analytics- Security metrics and trends
- get_corp_overview- High-level attack summary
- manage_alerts- Configure monitoring alerts

- manage_cloudwaf- CloudWAF instance management
- manage_users- User access control

"An IP address 1.2.3.4 is attacking my site, block it immediately"

- AI automatically identifies the threat
- Adds IP to blacklist with appropriate duration
- Confirms blocking is active

"Set up protection against the latest OWASP top 10 vulnerabilities"

- Creates comprehensive rule sets
- Configures appropriate thresholds
- Sets up monitoring alerts

"Show me attack trends from the past month and suggest improvements"

- Analyzes historical attack data
- Identifies patterns and threat sources
- Recommends rule optimizations

"Apply the same security rules from site A to sites B, C, and D"

- Exports existing rule configurations
- Adapts rules for different sites
- Bulk applies with verification

The server exposes the complete Fastly NGWAF API through intuitive MCP tools. Each tool maps to specific API endpoints while handling authentication, context resolution, and error management automatically.

The server respects Fastly API rate limits and implements appropriate retry logic.

FastlyMCP/ ├── server.js # Main MCP server implementation ├── package.json # Dependencies and scripts ├── README.md # This documentation └── .env.example # Environment variable template
# Test API connectivity npm start # In another terminal/AI session: # test_connection()

- Verify email and API token are correct
- Ensure token has appropriate permissions
- Check Fastly account status

- Set default corporation:set_context({ corpName: "your-corp" })
- Verify corp/site names exist:discover_environment()

- Check user role has necessary permissions
- Verify site access in Fastly dashboard

Enable verbose logging by setting environment variable:

- Store API credentials securely (environment variables or secure credential managers)
- Use principle of least privilege for API tokens
- Regularly rotate API credentials
- Monitor for unauthorized API usage
- Keep dependencies updated

MIT License - see LICENSE file for details.

- Initial release with complete NGWAF API coverage
- MCP server implementation
- Rule management (CRUD operations)
- IP list management
- Analytics and monitoring
- CloudWAF support
- User management features

Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows

MCP server for the xAI Management API — API keys, ACLs, audit logs, and billing

Securely manage secrets and policies in HashiCorp Vault through an MCP interface.

Interact with LicenseSpring's License API and Management API.

Securely access secrets from Doppler's secret management platform using a Doppler API token.

A RESTful API to programmatically interact with the Opal Security platform.

An MCP server for interacting with Tenable tenants connected to a Tenable MSSP Portal

Threatlocker-mcp is a Model Context Protocol server that connects AI assistants such as Claude Desktop and Claude Code with the ThreatLocker Portal API.

A secure MCP gateway that acts as a proxy, providing authentication, tool discovery, caching, and guardrail enforcement.

A local stdio MCP server that proxies to a remote, OAuth2-protected HTTP MCP server.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.