Firewalla MCP Server

Firewalla MCP Server

Enables interaction with Firewalla network security devices for network monitoring, device management, traffic analysis, and security rule configuration through MCP tools.

Category
访问服务器

README

MCP Servers

CI codecov

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选