Firewalla MCP Server
Enables interaction with Firewalla network security devices for network monitoring, device management, traffic analysis, and security rule configuration through MCP tools.
README
MCP Servers
A collection of Model Context Protocol (MCP) servers for network security and monitoring.
Servers
Firewalla MCP Server
A comprehensive MCP server for interacting with Firewalla network security devices. Provides network monitoring, device management, and security rule configuration through MCP tools.
Features
- Network Monitoring: Query network flows, analyze traffic patterns, detect security events
- Device Management: List, search, and get details for all network devices
- Security Rules: Allow/block/deny categories, apps, or specific targets per device
- Traffic Analysis: Top talkers, blocked traffic, protocol distribution, country stats
- Trend Data: 24h/7d/30d traffic trends with peak detection
Installation
cd firewalla
npm install
npm run build
Configuration
Option 1: Environment Variables (Recommended)
export FIREWALLA_URL="https://my.firewalla.com"
export FIREWALLA_TOKEN="your-bearer-token"
export FIREWALLA_ID="your-firewalla-device-id"
export LOG_LEVEL="info" # debug, info, warn, error
Option 2: Runtime Configuration
Use the configure_firewalla MCP tool after connecting.
Usage
# Start the server
npm run start
# Development mode (build + run)
npm run dev
Available MCP Tools
| Tool | Description |
|---|---|
configure_firewalla |
Set API credentials (or use env vars) |
get_config_status |
Check configuration status and source |
query_network_flows |
Query network flows with time filters |
list_devices |
List all network devices |
get_device_details |
Get device info by MAC address |
analyze_network_traffic |
Traffic analysis (summary, top talkers, blocked, security) |
get_device_traffic |
Per-device traffic analysis |
get_network_overview |
Comprehensive network overview |
get_cloud_rules |
Active cloud security rules |
get_traffic_trends |
Traffic trends (24h/7d/30d) |
get_firewalla_status |
Firewalla device status |
search_devices |
Search devices by name/IP/MAC |
update_device_rules |
Modify device security rules |
Development
Commands
npm run build # Compile TypeScript
npm run start # Run the server
npm run dev # Build and run
npm test # Run tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage
Testing
The project uses Vitest for testing with 32 tests covering:
- API client functionality
- Error recovery and retry logic
- Environment variable configuration
- Structured logging
- Custom error classes
Architecture
firewalla/
├── server.ts # Main server implementation
├── server.test.ts # Test suite
├── vitest.config.ts # Test configuration
├── package.json # Dependencies
└── api_samples/ # Reference API responses
Key Components
- Logger: Structured JSON logging to stderr with configurable levels
- FirewallaAPI: HTTP client with retry logic and exponential backoff
- FirewallaMCPServer: MCP server with 13 tools for Firewalla interaction
- Error Classes:
FirewallaAPIError,FirewallaAuthError,FirewallaNetworkError,FirewallaRateLimitError
Error Recovery
The API client includes robust error handling:
- Automatic retry on 5xx errors and network failures
- Exponential backoff with jitter
- Rate limit handling with Retry-After support
- Request timeouts (30s default)
- Configurable retry settings
Logging
Structured JSON logs to stderr (stdout reserved for MCP):
{"service":"firewalla-mcp","timestamp":"...","level":"info","message":"Server started","context":{"transport":"stdio"}}
License
MIT
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.
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.
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.
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.