fortigate-mcp-server
MCP server for managing FortiGate firewalls: policies, objects, routing, VPN, monitoring and read-only diagnostics.
Install / Use
claude mcp add alpadalar -- npx -y github:alpadalar/fortigate-mcp-serverIf the server publishes to npm under a different name, use that package instead โ check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
OperationsSupported Platforms
Our assessment of fortigate-mcp-server
fortigate-mcp-server scores 84/100 on our quality scale, 551st of 745 Operations skills we index.
Its MCP Server is 16 KB long, well organised into 55 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.
It has 44 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 26 days ago, so fortigate-mcp-server is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit โ read the skill file before letting an agent act on it.
fortigate-mcp-server compared with similar skills
All 4 of these similar skills score higher than fortigate-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| fortigate-mcp-server (this skill)by alpadalar | 84 | 44 | 26d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 48.0k | today | CLAUDE.md |
Frequently asked questions
- How do I install fortigate-mcp-server?
- Run
claude mcp add alpadalar -- npx -y github:alpadalar/fortigate-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does fortigate-mcp-server work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is fortigate-mcp-server safe to use?
- It is MIT-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is fortigate-mcp-server still maintained?
- The repository was last updated 26 days ago, so fortigate-mcp-server is actively maintained.
Skill content
View source on GitHubFortiGate 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)
uvpackage manager (recommended) orpip- 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: passโฆ[redacted] login is reported to be deprecated there (unofficial community sources; see SECURITY.md)
๐ ๏ธ Installation
1. Clone the Project
git clone https://github.com/alpadalar/fortigate-mcp-server.git
cd fortigate-mcp-server
2. Install Dependencies
# Using uv (recommended) - installs the locked, reproducible dependency set
uv sync --locked
# Or using pip
pip install -e .
3. Configuration
Create your local config from the committed example (config/config.json is gitignored and does
not exist on a fresh clone):
cp config/config.example.json config/config.json
Then edit config/config.json:
{
"server": {
"allow_writes": false
},
"fortigate": {
"devices": {
"default": {
"host": "192.168.1.1",
"port": 443,
"username": "admin",
"password": "your_password",
"api_token": "your-api-token",
"vdom": "root",
"verify_ssl": true,
"timeout": 30
}
}
},
"logging": {
"level": "INFO",
"file": "./logs/fortigate_mcp.log"
}
}
๐ Usage
Start HTTP Server
# Start with script
./start_http_server.sh
# Or manually
uv run python -m src.fortigate_mcp.server_http \
--host 127.0.0.1 \
--port 8814 \
--path /fortigate-mcp \
--config config/config.json
Use --host 0.0.0.0 only if you need access from other machines on the network AND have
auth.require_auth=true configured in config/config.json; otherwise keep 127.0.0.1 โ
unauthenticated HTTP should never bind wider than loopback.
Run with Docker
# Build and start
docker-compose up -d
# View logs
docker-compose logs -f fortigate-mcp-server
The compose file publishes port 8814 on loopback only (127.0.0.1:8814:8814), so the server is
reachable solely from the Docker host itself. To expose it beyond 127.0.0.1, first set
auth.require_auth=true in config/config.json, then widen the ports: mapping deliberately โ
see SECURITY.md.
๐ง MCP Client Integration
FortiGate MCP Server works with any MCP-compatible client. Verified, ready-to-use config examples are provided for Claude Desktop, Claude Code, and Cursor:
examples/claude_desktop_config.stdio.jsonโ Claude Desktop, stdio transport (recommended)examples/claude_desktop_config.http.jsonโ Claude Desktop, HTTP transport via themcp-remotebridgeexamples/claude_code_mcp.jsonโ Claude Code project-scope.mcp.json(stdio and HTTP entries)examples/cursor_mcp_config.jsonโ Cursor MCP configuration
Every stdio example in this project launches the server via uv run --directory <path> python -m src.fortigate_mcp.server instead of a bare python -m ... command. This matters because
GUI-launched MCP clients (like Claude Desktop) commonly start commands from a directory other than
the repo root โ the explicit --directory flag makes the invocation working-directory
independent, so it keeps working regardless of where the client process happens to start from.
Claude Code (.mcp.json)
Add a project-scope .mcp.json at your repository root (see
examples/claude_code_mcp.json for the full file, including the HTTP entry):
{
"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"
}
}
}
}
Or register the HTTP transport via the Claude Code CLI:
claude mcp add --transport http fortigate-mcp http://127.0.0.1:8814/fortigate-mcp --header "Authorization: Bearer <token>"
--header is only needed when auth.require_auth=true is set in config/config.json.
Claude Desktop
Claude Desktop's native config schema validates stdio servers only. Use
examples/claude_desktop_config.stdio.json for the stdio transport (recommended). For the HTTP
transport, examples/claude_desktop_config.http.json bridges to this server through the
community mcp-remote npm package (npx -y mcp-remote ...) โ this package is not vetted or
installed by this project; inspect it yourself before running it, since npx fetches and
executes third-party code on your behalf.
Cursor
See examples/cursor_mcp_config.json for a working stdio configuration.
๐ API Commands
Device Management
list_devices- List registered devicesget_device_status- Get device statustest_device_connection- Test connectionadd_device- Add new deviceremove_device- Remove devicediscover_vdoms- Discover VDOMs
Firewall Management
list_firewall_policies- List firewall rulescreate_firewall_policy- Create new ruleupdate_firewall_policy- Update ruledelete_firewall_policy- Delete rule
Network Management
list_address_objects- List address objectscreate_address_object- Create address objectlist_service_objects- List service objectscreate_service_object- Create service object
Virtual IP Management
list_virtual_ips- List virtual IPscreate_virtual_ip- Create virtual IPupdate_virtual_ip- Update virtual IPget_virtual_ip_detail- Get virtual IP detaildelete_virtual_ip- Delete virtual IP
Routing Management
list_static_routes- List static routescreate_static_route- Create static routeupdate_static_route- Update static routedelete_static_route- Delete static routeget_static_route_detail- Get static route detailget_routing_table- Get routing tablelist_interfaces- List interfacesget_interface_status- Get interface status
Security & Admin Visibility (read-only)
list_security_profiles- List security profiles (antivirus, IPS, web filter, application control)list_admins- List admin accounts (secret fields redacted;vdomis expected to be a no-op on this global-scope endpoint)get_sslvpn_settings- Get SSL-VPN settings and portal bookmarks (bookmark credentials redacted)list_local_in_policies- List IPv4 local-in policies (IPv6local-in-policy6not covered)
Config-Object & Monitor Visibility (read-only)
All take device_id and an optional vdom. A FortiOS 404 is reported as "not supported on this FortiOS version".
list_address_groups- List address groupslist_service_groups- List service groupslist_schedules- List recurring, one-time and group scheduleslist_ip_pools- List IP poolslist_central_snat_maps- List central SNAT mapsget_system_resources- Latest CPU/memory/session usage valuesget_license_status- Get license and subscription statusget_ha_status- Get HA peer status (empty result means standalone)get_arp_table- Get ARP table (interfacefilter,limitdefault 100, max 500)list_dhcp_leases- List DHCP leases (interfacefilter,limitdefault 100, max 500)get_ipsec_tunnel_status- IPsec tunnel and phase 2 selector status (never returns pre-shared keys)list_firewall_sessions- List active sessions (countdefault 20, max 200;srcaddr,dstaddr,srcport,dstport,protofilters)analyze_policy_hygiene- Offline analysis of shadowed, duplicate, any-any and disabled policies
System Commands
health- Health checktest_connection- Connection testget_schema_info- Schema information
๐งช Testing
Run Tests
# One-time setup: test dependencies (pytest, pytest-cov, respx, pyyaml) live in the
# dev/test extras โ the plain `uv sync --locked` from the install step does not install them
uv sync --locked --all-extras
# Quick run with coverage disabled (a bare -q only reduces verbosity;
# without --no-cov the coverage gate from pyproject.toml addopts still runs)
uv run pytest -q --no-cov
# Full suite with coverage (--cov-fail-under=67 enforced per pyproject.toml)
uv run pytest
# Run specific test files
uv run pytest tests/test_device_manager.py
uv run pytest tests/test_fortigate_api.py
uv run pytest tests/test_tools.py
# Verbose output
uv run pytest -v
# Detailed error information
uv run pytest --tb=long
Test Categories
- Unit Tests: Test individual components and functions
- Coverage: Code coverage reporting with HTML output
Manual Testing
The /health route lives at the app root, is exempt from Bearer-token auth, and works with
plain curl:
# Liveness probe
curl http://127.0.0.1:8814/health
The MCP protocol itself cannot be exercised with a bare curl POST: the streamable-HTTP
transport requires an initialize handshake, session management, and tools/call framing.
Use a real MCP client for protocol-level testing โ for example fastmcp.Client:
uv run python - <<'PY'
import asyncio
from fastmcp import Client
async def main():
# Trailing slash matches the mount co
Truncated for display โ read the full file on GitHub.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu โ one CLI, zero API fees.
ruflo
81.9k๐ The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
48.0kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit โ see the Safety scan above for what the skill file itself contains.
