fortigate-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fortigate-mcpIs the IPsec tunnel to the branch office up?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fortigate-mcp
An MCP (Model Context Protocol) server for managing and monitoring FortiGate firewalls through the FortiOS REST API.
Connect your AI assistant (Claude Code, Claude Desktop, or any MCP client) to one or more FortiGates and ask things like:
"Which firewall policies have never been hit?" "Is the IPsec tunnel to the branch office up?" "Show me all active sessions from 10.0.0.15."
Initial setup (creating the API user and token on the FortiGate) is automated over SSH — after that, everything runs over the REST API with a token. SSH credentials are never stored.
Features
Phase 1 — read-only (current):
Tool | What it does |
| Hostname, model, FortiOS version, HA mode, CPU/memory/session usage |
| Interfaces with link status, IP, speed, traffic counters |
| Active IPv4 routing table (connected, static, OSPF, BGP, …) |
| Policy list in evaluation order, optional hit counts |
| Full detail of a single policy |
| Address objects (subnet, FQDN, range, geography) |
| Custom service objects |
| IPsec tunnel status + active SSL-VPN sessions |
| Session table search with src/dst/port filters |
Roadmap:
Phase 2 — guarded write operations (create/update policies and objects, block an IP) with a
read_onlykill-switch and dry-run supportPhase 3 — analysis tools (unused policies, shadowed rules, config audit)
Optional SSH transport for
diagnose/executecommands not exposed by REST
Related MCP server: FortiGate MCP Server
FortiOS version support
Primary target is FortiOS 7.0 – 7.6, with best-effort support for 6.4.
Versions below 6.4 are rejected (end-of-life). The device version is detected
automatically from API responses; per-version differences live in one place
(src/fortigate_mcp/quirks.py).
Quick start
# 1. Install (Python 3.10+)
git clone https://github.com/irfanharis/fortigate-mcp.git
cd fortigate-mcp
python -m venv .venv
.venv/Scripts/activate # Windows (Linux/macOS: source .venv/bin/activate)
pip install -e .
# 2. Bootstrap your FortiGate (creates the API user over SSH, one time)
fortigate-mcp-bootstrap --host 192.168.1.99 --ssh-user admin \
--trusthost 192.168.1.50 --name lab
# 3. Register with your MCP client, e.g. Claude Code
claude mcp add fortigate -- fortigate-mcpSee the Usage Guide for full documentation: manual setup without SSH, multi-device and multi-VDOM configuration, per-tool examples, and troubleshooting.
Security model
Read-only by default, at two layers: the access profile created on the FortiGate only grants
read, and the MCP config hasread_only: true(used to reject write tools in Phase 2). Pass--read-writeto bootstrap only when you need write access.Trusthost pinning: with
--trusthost, the token only works from the machine running the MCP server.No stored SSH credentials: SSH is used once for bootstrap; only the API token is persisted, in a config file that is git-ignored.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA complete MCP server for Fortinet FortiOS 7.6.x that exposes the entire REST API as typed MCP tools for use with MCP-compatible clients like Claude Desktop.Last updated10011MIT
- Alicense-qualityCmaintenanceA production-ready MCP server for managing FortiGate firewalls, enabling AI assistants to manage firewall policies, network objects, routing, and device configurations.Last updated32MIT
- AlicenseAqualityDmaintenanceA secure MCP server for managing OPNsense firewalls through AI assistants. Provides 81 tools across system, firewall, network, DNS, DHCP, VPN, HAProxy, services, diagnostics, and security domains.Last updated8110MIT
- Alicense-qualityBmaintenanceMCP server for managing Fortinet FortiAppSec (WAF as a Service) via AI agents. Supports listing, creating, and deleting WAF applications and templates.Last updatedMIT
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/irfanharis/fortigate-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server