FortiGate
A comprehensive Model Context Protocol (MCP) server for managing FortiGate devices.
What is FortiGate?
FortiGate is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to comprehensive model context protocol (mcp) server for managing fortigate devices.
A comprehensive Model Context Protocol (MCP) server for managing FortiGate devices.
This server falls under the Security and Cloud Services categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A comprehensive Model Context Protocol (MCP) server for mana
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx fortigateConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use FortiGate
FortiGate MCP Server is a production-ready Model Context Protocol server that exposes FortiGate firewall management capabilities to AI assistants. It supports full CRUD for firewall policies, address and service objects, virtual IPs, static routes, and multi-device management — all through a fully async Python client with connection pooling. Teams managing Fortinet infrastructure can use it to query device status, create firewall rules, configure NAT/DNAT, and inspect routing tables through natural language without leaving their AI assistant.
Prerequisites
- Python 3.11 or higher installed
- A FortiGate device with the REST API enabled (FortiOS 6.4+ recommended)
- A FortiGate API token (preferred) or admin username and password
- An MCP-compatible client such as Claude Desktop or Claude Code
- Git to clone the repository
Clone and install the server
Clone the repository, create a virtual environment, and install the package in editable mode.
git clone https://github.com/alpadalar/fortigate-mcp-server.git
cd fortigate-mcp-server
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .Create a device configuration file
Create a JSON configuration file that registers your FortiGate device(s). Set api_token to your FortiGate REST API token. Set verify_ssl to false only for lab environments with self-signed certificates.
{
"fortigate": {
"devices": {
"fw-primary": {
"host": "192.168.1.1",
"port": 443,
"api_token": "your-api-token-here",
"vdom": "root",
"verify_ssl": true,
"timeout": 30
}
}
},
"server": {
"name": "fortigate-mcp-server",
"host": "0.0.0.0",
"port": 8814
},
"logging": {
"level": "INFO",
"console": true
}
}Set the config environment variable
Point the server to your configuration file using the FORTIGATE_MCP_CONFIG environment variable.
export FORTIGATE_MCP_CONFIG=/absolute/path/to/config/config.jsonRun the server in STDIO mode
Start the server in STDIO mode for direct MCP client integration. The server communicates over standard input/output.
python -m src.fortigate_mcp.serverAdd to your MCP client configuration
Register the server with Claude Desktop or Claude Code by editing the MCP configuration file.
FortiGate Examples
Client configuration
Add this block to your claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json) to connect Claude to your FortiGate.
{
"mcpServers": {
"fortigate": {
"command": "python",
"args": ["-m", "src.fortigate_mcp.server"],
"env": {
"FORTIGATE_MCP_CONFIG": "/absolute/path/to/config/config.json"
}
}
}
}Prompts to try
After connecting, use these prompts with Claude to manage your FortiGate devices.
- "List all registered FortiGate devices and check their connection status"
- "Show me all firewall policies on fw-primary in the root VDOM"
- "Create a firewall policy allowing HTTP and HTTPS from the LAN to WAN zone"
- "List all static routes on fw-primary and show the routing table"
- "Add an address object for subnet 10.10.5.0/24 named app-servers"
- "Show me all virtual IPs configured for NAT on fw-primary"Troubleshooting FortiGate
Connection refused or SSL errors when connecting to FortiGate
Set verify_ssl to false in your config for self-signed certificates, or import the FortiGate certificate into your system's trust store. Ensure the FortiGate REST API is enabled under System > Administrator > REST API Admin.
401 Unauthorized errors on API calls
Verify the api_token value in your config is correct and the API user has sufficient privileges. In FortiOS, create the API token under System > Administrators > Create New > REST API Admin and assign appropriate profiles.
Server fails to start with import errors
Ensure you activated your virtual environment before running the server (source .venv/bin/activate). Also confirm you installed the package with pip install -e . from the repo root.
Frequently Asked Questions about FortiGate
What is FortiGate?
FortiGate is a Model Context Protocol (MCP) server that comprehensive model context protocol (mcp) server for managing fortigate devices. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install FortiGate?
Follow the installation instructions on the FortiGate GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with FortiGate?
FortiGate works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is FortiGate free to use?
Yes, FortiGate is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
FortiGate Alternatives — Similar Security Servers
Looking for alternatives to FortiGate? Here are other popular security servers you can use with Claude, Cursor, and VS Code.
Casdoor
★ 13.6kAn open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
ghidraMCP
★ 9.0kAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through
HexStrike AI
★ 8.9kHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b
IDA Pro MCP
★ 8.7kEnables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.
Anthropic Cybersecurity Skills
★ 6.6k754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform
Hooker
★ 5.1k🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u
Browse More Security MCP Servers
Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up FortiGate in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use FortiGate?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.