Skip to main content
Glama
MadLlama25

Firewalla MCP Server

by MadLlama25

Firewalla MCP Server

A production-ready Model Context Protocol (MCP) server for Firewalla network management, designed to work seamlessly with Claude Desktop and other MCP-compatible clients.

โœจ Features

  • ๐Ÿ”’ Enterprise Security - Firewalla API keys never exposed to clients

  • ๐Ÿš€ Multi-Transport Support - stdio, SSE, and HTTP transports

  • ๐Ÿ“Š Comprehensive Monitoring - Device, network, and security analytics

  • ๐Ÿ›ก๏ธ Built-in Protection - Rate limiting, input validation, audit logging

  • ๐Ÿณ Docker-Ready - Production-grade containerized deployment

  • ๐Ÿ”„ Resilient Architecture - Circuit breakers, retry logic, intelligent caching

  • ๐ŸŽฏ 14 Powerful Tools - Complete Firewalla management capabilities

Related MCP server: MCP Web Research Server

๐Ÿ› ๏ธ Available Tools

๐Ÿ“ฑ Device Monitoring (3 tools)

  • get_devices - List all network devices with status and basic info

  • get_device_details - Detailed device information including bandwidth usage

  • search_devices - Search devices by name, IP, MAC, or vendor

๐ŸŒ Network Analysis (3 tools)

  • analyze_network_flows - Analyze traffic flows with filtering and statistics

  • get_bandwidth_statistics - Bandwidth usage stats for devices or entire network

  • get_network_statistics - Comprehensive network health and top talkers

๐Ÿ” Security Monitoring (4 tools)

  • get_alarms - Retrieve security alerts with severity and category filtering

  • get_alarm_details - Detailed information about specific security events

  • archive_alarm - Mark security alerts as reviewed

  • get_alarm_statistics - Statistical analysis of security events

โš™๏ธ Rule Management (4 tools)

  • list_firewall_rules - List all firewall rules with status and conditions

  • get_rule_details - Detailed rule information including hit statistics

  • pause_rule - Temporarily disable rules with duration and reason

  • resume_rule - Re-enable paused firewall rules

๐Ÿš€ Quick Start

git clone https://github.com/MadLlama25/firewalla_msp-mcp.git
cd firewalla_msp-mcp
./scripts/setup.sh

The setup script will:

  • โœ… Check prerequisites

  • โœ… Create and configure environment files

  • โœ… Build Docker image

  • โœ… Generate Claude Desktop configuration

  • โœ… Start the server

Manual Setup

Prerequisites

  • Docker and Docker Compose

  • Firewalla MSP account with API token

  • Claude Desktop (or other MCP client)

  • (Optional) Cloudflare Tunnel for remote access

Installation Steps

  1. Clone and Setup

git clone https://github.com/MadLlama25/firewalla_msp-mcp.git
cd firewalla_msp-mcp
cp .env.example .env
  1. Configure Environment Edit .env with your Firewalla credentials:

FIREWALLA_API_TOKEN=your_api_token_here
FIREWALLA_MSP_DOMAIN=https://your-domain.firewalla.net
  1. Deploy with Docker Compose

docker-compose up -d
  1. Verify Deployment

curl http://localhost:3000/health
docker logs firewalla-mcp

๐Ÿ”ง Claude Desktop Configuration

{
  "mcpServers": {
    "firewalla": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env-file", "/full/path/to/.env",
        "--network", "host",
        "firewalla-mcp"
      ],
      "env": {
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Remote Access via Cloudflare Tunnel

{
  "mcpServers": {
    "firewalla": {
      "url": "https://your-tunnel-domain.example.com/mcp",
      "transport": "sse"
    }
  }
}

Local HTTP (Alternative)

{
  "mcpServers": {
    "firewalla": {
      "url": "http://localhost:3000/mcp",
      "transport": "sse"
    }
  }
}

๐Ÿ—๏ธ Architecture

Security Architecture

  • API Key Isolation - Firewalla credentials stored securely in Docker

  • Request Validation - Comprehensive input sanitization and validation

  • Rate Limiting - Per-client request throttling

  • Audit Logging - Complete request/response audit trail

  • Circuit Breakers - Automatic failover when Firewalla API is unavailable

Performance Features

  • Intelligent Caching - Multi-tier caching with TTL

  • Connection Pooling - Optimized HTTP client with retry logic

  • Resource Management - Memory-efficient data processing

  • Health Monitoring - Built-in health checks and metrics

๐Ÿ“ Configuration Reference

Environment Variables

Variable

Required

Default

Description

FIREWALLA_API_TOKEN

โœ…

-

Your Firewalla MSP API token

FIREWALLA_MSP_DOMAIN

โœ…

-

Your MSP domain URL

PORT

โŒ

3000

Server port

MCP_TRANSPORT

โŒ

sse

Transport method (stdio/sse/http)

LOG_LEVEL

โŒ

info

Logging level (debug/info/warn/error)

CACHE_ENABLED

โŒ

true

Enable response caching

RATE_LIMIT_MAX

โŒ

100

Max requests per window

Docker Deployment Options

Production (docker-compose)

docker-compose up -d

Development (with hot reload)

docker-compose -f docker-compose.yml up firewalla-mcp-dev

Standalone Docker

docker run -d --name firewalla-mcp \
  --env-file .env \
  -p 3000:3000 \
  firewalla-mcp

๐Ÿ” Monitoring & Troubleshooting

Health Checks

# Server health
curl http://localhost:3000/health

# Container logs
docker logs firewalla-mcp

# Container status
docker ps | grep firewalla-mcp

Common Issues

Authentication Errors

  • Verify FIREWALLA_API_TOKEN is correct

  • Check FIREWALLA_MSP_DOMAIN format

  • Ensure API token has proper permissions

Connection Issues

  • Check Docker container is running

  • Verify port 3000 is accessible

  • Check Cloudflare Tunnel configuration (if using)

Performance Issues

  • Monitor cache hit rates in logs

  • Check circuit breaker status

  • Verify adequate system resources

๐Ÿ”’ Security Considerations

API Key Management

  • Store Firewalla API tokens in environment variables only

  • Never commit API keys to version control

  • Rotate API keys regularly (recommended: 90 days)

  • Use separate tokens for different environments

Network Security

  • Deploy behind Cloudflare Tunnel for production

  • Use HTTPS/TLS for all communications

  • Implement IP allowlisting if required

  • Monitor audit logs regularly

Access Control

  • Enable API key authentication for non-Claude Desktop clients

  • Use role-based permissions where applicable

  • Monitor unusual usage patterns

  • Implement automatic lockouts for suspicious activity

๐Ÿค Multi-Client Support

Works with various MCP clients:

  • Claude Desktop - Primary target with optimized integration

  • Continue IDE - VS Code extension support

  • Custom MCP Clients - HTTP/SSE API available

๐Ÿงช Testing

Test Categories

  • Unit Tests - Core utilities, middleware, and individual components

  • Integration Tests - API client, caching, and service integration

  • MCP Tool Tests - All 14 Firewalla management tools

  • Security Tests - Input validation, sanitization, and vulnerability checks

  • Performance Tests - Load testing and performance benchmarks

Running Tests

# Run all tests
npm test

# Run tests with coverage
npm run test:coverage

# Run specific test categories
npm run test:unit
npm run test:integration
npm run test:security
npm run test:performance

# Run tests in watch mode
npm run test:watch

Test Coverage Targets

  • Unit Tests: 90% line coverage

  • Integration Tests: 80% path coverage

  • Critical Paths: 100% coverage (authentication, validation, security)

Quality Gates

All commits must pass:

  • โœ… Linting (ESLint)

  • โœ… Type checking (TypeScript)

  • โœ… Unit tests (90%+ coverage)

  • โœ… Security audit (npm audit)

  • โœ… Code formatting (Prettier)

# Run pre-commit checks
npm run pre-commit
# or use the script
./scripts/pre-commit.sh

๐Ÿ“ Development

Local Development

npm install
npm run dev

Building

npm run build
npm run lint
npm run type-check

Testing Strategy

See TESTING_PLAN.md for comprehensive testing documentation.

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests (maintain coverage targets)

  5. Run pre-commit checks

  6. Submit a pull request

Code Quality Standards

  • TypeScript strict mode enabled

  • ESLint with strict configuration

  • Prettier for consistent formatting

  • Jest for testing with high coverage

  • Security-first development practices

๐Ÿ“Š Performance Metrics

  • Response Time - Sub-100ms for cached requests

  • Throughput - 1000+ requests per minute

  • Uptime - 99.9% with automatic recovery

  • Cache Hit Rate - 70-90% for typical workloads

๐Ÿ“œ License

MIT License - see LICENSE file for details

๐Ÿ†˜ Support

  • Issues - GitHub Issues

  • Documentation - Built-in API documentation

  • Logs - Comprehensive audit trail and error logging


Built with โค๏ธ for the Firewalla community

-
security - not tested
-
license - not tested
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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/MadLlama25/firewalla_msp-mcp'

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