
Fastly NGWAF MCP Server
Provides seamless integration with Fastly's Next-Gen Web Application Firewall API, enabling AI assistants to manage web application security through natural language interactions.
Tools
set_credentials
Set Fastly NGWAF API credentials (email and access token)
test_connection
Test the API connection and validate credentials
set_context
Set the default corporation and site context for subsequent operations
get_context
Get the current context (corp and site names)
discover_environment
Discover available corporations and sites for the authenticated user
list_corps
List all corporations accessible to the authenticated user
get_corp_overview
Get attack overview for a corporation
list_sites
List sites in a corporation
get_site
Get details of a specific site
create_site
Create a new site in a corporation
update_site
Update site configuration
delete_site
Delete a site
list_corp_rules
List rules at corporation level
list_site_rules
List rules for a specific site
create_corp_rule
Create a corporation-level rule
create_site_rule
Create a site-level rule
delete_corp_rule
Delete a corporation-level rule
delete_site_rule
Delete a site-level rule
search_requests
Search requests with advanced filtering
list_events
List security events (attacks, blocks, etc.)
expire_event
Manually expire an event (unblock IP)
get_suspicious_ips
Get list of suspicious IP addresses
manage_whitelist
Manage IP whitelist (allowlist)
manage_blacklist
Manage IP blacklist (blocklist)
manage_lists
Manage custom lists (IP, country, string, etc.)
manage_alerts
Manage alerts for monitoring attack patterns
get_analytics
Get analytics data (top attacks, timeseries, etc.)
manage_cloudwaf
Manage CloudWAF instances
manage_users
Manage corporation users
README
Fastly NGWAF MCP Server
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.
Features
🛡️ Complete WAF Management
- Create, read, update, and delete security rules
- Manage IP allow/block lists
- Configure rate limiting and alerts
- Monitor security events and analytics
🏢 Multi-tenancy Support
- Corporation and site-level management
- Context-aware operations
- Bulk operations across multiple sites
🤖 AI-Friendly Interface
- Natural language rule creation
- Intelligent threat pattern detection
- Automated security policy suggestions
Installation
Prerequisites
- Node.js 18+
- Fastly NGWAF account with API access
- MCP-compatible AI assistant (Claude Desktop, etc.)
Setup
- Clone the repository
git clone https://github.com/yourusername/FastlyMCP.git
cd FastlyMCP
- Install dependencies
npm install
- 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
- Start the server
npm start
Configuration
Claude Desktop Integration
Add this to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/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"
}
}
}
}
AI-Powered Interactions
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
Available Tools
Authentication & Setup
set_credentials
- Configure API credentialstest_connection
- Validate API connectivityset_context
- Set default corp/site contextdiscover_environment
- Explore available resources
Rule Management
list_corp_rules
/list_site_rules
- List security rulescreate_corp_rule
/create_site_rule
- Create new rulesdelete_corp_rule
/delete_site_rule
- Remove rules
Security Monitoring
list_events
- View security eventssearch_requests
- Search request logsget_suspicious_ips
- Identify threat sourcesexpire_event
- Manually unblock IPs
IP List Management
manage_whitelist
- Allow/block IP addressesmanage_blacklist
- Block malicious IPsmanage_lists
- Custom IP/country/string lists
Analytics & Reporting
get_analytics
- Security metrics and trendsget_corp_overview
- High-level attack summarymanage_alerts
- Configure monitoring alerts
Advanced Features
manage_cloudwaf
- CloudWAF instance managementmanage_users
- User access control
Common Use Cases
🚨 Incident Response
"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
🛡️ Proactive Security
"Set up protection against the latest OWASP top 10 vulnerabilities"
- Creates comprehensive rule sets
- Configures appropriate thresholds
- Sets up monitoring alerts
📊 Security Analytics
"Show me attack trends from the past month and suggest improvements"
- Analyzes historical attack data
- Identifies patterns and threat sources
- Recommends rule optimizations
🔧 Bulk Management
"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
API Reference
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.
Rate Limiting
The server respects Fastly API rate limits and implements appropriate retry logic.
Development
Project Structure
FastlyMCP/
├── server.js # Main MCP server implementation
├── package.json # Dependencies and scripts
├── README.md # This documentation
└── .env.example # Environment variable template
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Testing
# Test API connectivity
npm start
# In another terminal/AI session:
# test_connection()
Troubleshooting
Common Issues
Authentication Failed
- Verify email and API token are correct
- Ensure token has appropriate permissions
- Check Fastly account status
Context Errors
- Set default corporation:
set_context({ corpName: "your-corp" })
- Verify corp/site names exist:
discover_environment()
Permission Denied
- Check user role has necessary permissions
- Verify site access in Fastly dashboard
Debug Mode
Enable verbose logging by setting environment variable:
DEBUG=fastly-ngwaf npm start
Security Considerations
- 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
License
MIT License - see LICENSE file for details.
Support
Changelog
v1.0.0
- 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.