AF

alpadalar/fortigate-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

45 stars 29 forks 质量 83 趋势 9MIT

alpadalar/fortigate-mcp-server 是从 https://github.com/alpadalar/fortigate-mcp-server. 导入的 MCP 服务器候选

概览

alpadalar/fortigate-mcp-server 是从 https://github.com/alpadalar/fortigate-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

FortiGate MCP 服务器——一个全面的模型上下文协议(MCP)服务器,用于管理 FortiGate 设备。该项目提供对 FortiGate 设备的程序访问,并支持与兼容 MCP 的客户端如 Claude Desktop、Claude Code 和 Cursor 的集成。

🚀 特色

FortiGate MCP 服务器暴露了52个独立工具,99个工具面注册,跨越stdio(49个)和HTTP(50个)传输;3个创建工具具有传输专用参数形状。覆盖区域:

  • 设备管理:添加、移除和测试与FortiGate设备的连接
  • 防火墙管理:列出、创建、更新和删除防火墙规则
  • 网络管理:管理地址和服务对象
  • 路由管理:管理静态路由和接口
  • 虚拟IP管理:管理虚拟IP(VIP/DNAT)
  • 安全可视化:仅读安全配置文件、管理员账户(秘密字段已涂黑)、SSL-VPN设置和IPv4本地输入策略
  • 配置对象可视化:只读地址组、服务组、调度(周期性、一次性组)、IP池、中央SNAT地图、防火墙区域(带接口到区域索引)和DHCP服务器范围

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

FortiGate MCP Server

FortiGate MCP Server - A comprehensive Model Context Protocol (MCP) server for managing FortiGate devices. This project provides programmatic access to FortiGate devices and enables integration with MCP-compatible clients such as Claude Desktop, Claude Code, and Cursor.

🚀 Features

FortiGate MCP Server exposes 52 unique tools, 99 total tool-surface registrations across stdio (49) and HTTP (50) transports; 3 create-tools have transport-specific parameter shapes. Covered areas:

  • Device Management: Add, remove, and test connections to FortiGate devices
  • Firewall Management: List, create, update, and delete firewall rules
  • Network Management: Manage address and service objects
  • Routing Management: Manage static routes and interfaces
  • Virtual IP Management: Manage virtual IPs (VIP/DNAT)
  • Security Visibility: Read-only insight into security profiles, admin accounts (secret fields redacted), SSL-VPN settings, and IPv4 local-in policies
  • Config-Object Visibility: Read-only address groups, service groups, schedules (recurring, one-time, groups), IP pools, central SNAT maps, firewall zones (with an interface-to-zone index), and DHCP server scopes
  • Monitor Visibility: Read-only system resources, license status, HA status (standalone reported as such), ARP table, and DHCP leases
  • IPsec, Sessions & Policy Hygiene: Read-only IPsec tunnel status (no pre-shared keys), capped firewall session listing with validated filters, and offline policy hygiene analysis (shadowed, duplicate, any-any, disabled)
  • HTTP Transport: MCP protocol over HTTP using FastMCP 4 (fastmcp>=4.1.2,<5)
  • Docker Support: Easy installation and deployment
  • MCP Client Integration: Works with Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients

📋 Requirements

  • Python 3.11+ (3.11, 3.12, 3.13 and 3.14 are tested in CI)
  • uv package manager (recommended) or pip
  • Access to FortiGate device
  • API token (recommended) or username/password
  • FortiOS 7.4 and 7.6 are the supported release lines. FortiOS 8.0 has not been verified. On 7.6 and later, use an API token: password/session login is reported to be deprecated there (unofficial community sources; see SECURITY.md)
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "fortigate-mcp-stdio": { "type": "stdio", "command": "uv", "args": ["run", "--directory", "${CLAUDE_PROJECT_DIR}", "python", "-m", "src.fortigate_mcp.server"], "env": { "FORTIGATE_MCP_CONFIG": "${CLAUDE_PROJECT_DIR}/config/config.json" } } } }