Skip to main content
Glama
FortiGate MCP Server

FortiGate MCP Server

by mdemirn

FortiGate MCP Server

Test Lint Security Release

A Model Context Protocol (MCP) server for FortiGate firewalls. It lets Claude Code, Claude Desktop, Cursor or any other MCP client read and change FortiOS configuration through the FortiOS REST API: policies, address and service objects, groups, routes, VIPs, DHCP, VPN, users, security profiles, live sessions and logs. One server can manage several FortiGates at once.

It was written against FortiOS 8.0 and uses only the /api/v2/cmdb, /api/v2/monitor and /api/v2/log endpoints, so FortiOS 7.4 and 7.6 units work as well, apart from endpoints a given release does not have.

The server exposes 140 unique tools, 275 total tool-surface registrations across stdio (137) and HTTP (138) transports; three create-tools have transport-specific parameter shapes. Every tool that changes a device is disabled until you turn writes on.

Contents: Requirements · Installation · Connect your MCP client · HTTP transport · Docker · Safety model · Tool reference · Troubleshooting

What you can do with it

Typical requests, in the words you would use with the assistant:

  • "Which policy blocks 192.0.2.25 from reaching the file server on port 445?" (lookup_policy, query_traffic_log, get_firewall_policy_detail)

  • "Add the new workstation to the remote-support exception group" (add_address_group_members)

  • "Reserve 192.0.2.40 for this MAC on the client VLAN" (list_dhcp_leases, create_dhcp_reservation)

  • "Move rule 12 above rule 7" (move_firewall_policy)

  • "Which IPsec tunnels are down?" (list_ipsec_tunnels)

  • "What does the remote-access application profile actually allow?" (get_security_profile_detail)

  • "Who logged into the admin GUI today?" (query_event_log)

  • "Save a config backup before I touch anything" (backup_config)

  • Anything else the REST API can do, through cmdb_list, cmdb_get, monitor_get and log_get.

Policy details resolve every address, address group, service and service group to its real value, and show the identity restrictions (users/groups) and the security profiles attached to the rule, so a reader does not have to open four screens to understand one line of the policy table.

Related MCP server: fortigate-mcp

Requirements

  • A machine that reaches the FortiGate management interface over HTTPS (TCP 443 or your admin port)

  • Python 3.11 to 3.13. 3.12 is pinned in .python-version and recommended; 3.14 is not supported yet because pydantic-core 2.33 ships no wheel for it

  • uv (recommended) or pip, and Git

  • FortiOS 7.4, 7.6 or 8.0, with a REST API admin and its API token

  • An MCP client that speaks stdio or streamable HTTP: Claude Code, Claude Desktop, Cursor or another

  • Optional: Docker with Compose v2 for the container deployment, Node.js for mcp-remote (Claude Desktop over HTTP), Node.js for the MCP Inspector check

Installation

The steps below take you from an empty machine to an assistant that can query your FortiGate:

  1. Install uv

  2. Get the code and install the dependencies

  3. Create a REST API admin on the FortiGate

  4. Write config/config.json

  5. Check the server

  6. Connect your MCP client

  7. Send the first requests, and enable writes when you need them

1. Install uv

macOS and Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

macOS with Homebrew: brew install uv. Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Open a new terminal and check with uv --version.

2. Get the code and install the dependencies

git clone https://github.com/mdemirn/fortigate-mcp.git
cd fortigate-mcp
uv sync --locked
uv run fortigate-mcp-server --version    # prints: fortigate-mcp-server 1.1.0
pwd                                      # note this absolute path for the client configs

uv sync --locked creates .venv, downloads Python 3.12 if the machine does not have it, and installs the exact versions recorded in uv.lock.

Without uv:

python3.12 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
pip install -e .
fortigate-mcp-server --version

pip resolves the version ranges in pyproject.toml instead of the lock file. In the client configs below, use /absolute/path/fortigate-mcp/.venv/bin/fortigate-mcp-server (Windows: .venv\Scripts\fortigate-mcp-server.exe) as the command instead of uv run.

3. Create a REST API admin on the FortiGate

In the GUI: System > Administrators > Create New > REST API Admin. Pick an admin profile, restrict Trusted Hosts to the machine that runs this server, and copy the token shown once after saving.

From the CLI, a read-only profile and an API user limited to the MCP host:

config system accprofile
    edit "mcp-read"
        set comments "FortiGate MCP server, read-only"
        set secfabgrp read
        set ftviewgrp read
        set authgrp read
        set sysgrp read
        set netgrp read
        set loggrp read
        set fwgrp read
        set vpngrp read
        set utmgrp read
        set wanoptgrp read
        set wifi read
    next
end
config system api-user
    edit "mcp-api"
        set comments "FortiGate MCP server"
        set accprofile "mcp-read"
        set vdom "root"
        config trusthost
            edit 1
                set ipv4-trusthost <mcp-host-ip> 255.255.255.255
            next
        end
    next
end
execute api-user generate-key mcp-api
  • The read profile is enough for every read tool. For write tools, change read to read-write on the areas the assistant may change (for example fwgrp for policies and objects, netgrp for interfaces, routes and DHCP), or use the built-in super_admin profile, which allows everything.

  • Set vdom to the VDOM the token should work in; on a multi-VDOM unit, create one API user per VDOM or use one with access to all of them.

  • If the server reaches the FortiGate through NAT, the trusted host is the address the FortiGate sees.

Test the token from the machine that will run the server:

curl -H "Authorization: Bearer <api-token>" https://<fortigate-address>/api/v2/monitor/system/status

A JSON answer with "status": "success" means the token and the trusted host are right. A certificate error means the FortiGate presents a certificate this machine does not trust; fix that before step 4 (see verify_ssl below).

4. Write the configuration

cp config/config.example.json config/config.json
chmod 600 config/config.json        # the file holds API tokens

config/config.json is ignored by git. Replace the two sample devices in the copied file with your own. Each key under devices is the device_id the tools take:

{
  "server": {
    "name": "fortigate-mcp-server",
    "allow_writes": false
  },
  "fortigate": {
    "devices": {
      "fgt-hq": {
        "host": "192.0.2.1",
        "port": 443,
        "api_token": "your-api-token",
        "vdom": "root",
        "verify_ssl": true,
        "timeout": 30
      },
      "fgt-branch": {
        "host": "198.51.100.1",
        "port": 443,
        "api_token": "your-api-token",
        "vdom": "root",
        "verify_ssl": true,
        "timeout": 30
      }
    }
  },
  "logging": {
    "level": "INFO",
    "console": true
  }
}

Key

Meaning

server.allow_writes

false keeps every write and destructive tool disabled (default)

fortigate.devices.<id>.host

IP address or hostname of the FortiGate management interface

port

HTTPS admin port, 443 unless you changed admin-sport

api_token

The key from step 3

vdom

VDOM the requests go to

verify_ssl

Verify the FortiGate certificate; keep it true

timeout

Seconds per API request

auth.require_auth, auth.api_tokens

Bearer-token protection for the HTTP transport only

logging.level, logging.console, logging.file

Log level, stderr logging, optional rotating log file

  • allow_writes keeps the server read-only until you set it to true (or export FORTIGATE_MCP_ALLOW_WRITES=1). The environment variable can only turn writes on: FORTIGATE_MCP_ALLOW_WRITES=0 does not override "allow_writes": true. While writes are on, every write and destructive tool runs for real, including on production units, so turn it on deliberately.

  • Keep verify_ssl on. If the FortiGate still uses its factory self-signed certificate, install a certificate the client trusts (or add the FortiGate's CA to the system trust store) rather than disabling verification. The server logs a warning for every device that has verification turned off.

  • logging.file is resolved from the server's working directory. uv run --directory starts the server in the repository, so logs/fortigate_mcp.log lands there; with any other launcher, use an absolute path or leave the key out. Console logging goes to stderr and never interferes with the stdio protocol.

  • username/password are accepted as a fallback, but an API token is the supported path.

  • The configuration is read at startup. Restart the server (or reconnect it in the client) after every change.

5. Check the server

The MCP Inspector starts the server the same way a client does and lets you call tools from a browser:

npx @modelcontextprotocol/inspector \
  -e FORTIGATE_MCP_CONFIG="$PWD/config/config.json" \
  -- uv run --directory "$PWD" fortigate-mcp-server

Click Connect, open Tools, run list_devices, then test_device_connection with one of your device IDs. The stdio server lists 137 tools.

6. Connect your MCP client

In every example, replace /absolute/path/fortigate-mcp with the path printed by pwd in step 2.

Claude Code

claude mcp add fortigate -s user \
  -e FORTIGATE_MCP_CONFIG=/absolute/path/fortigate-mcp/config/config.json \
  -- uv run --directory /absolute/path/fortigate-mcp fortigate-mcp-server
claude mcp list

-s user makes the server available in every project; -s project writes it to the project's .mcp.json instead (examples/claude_code_mcp.json shows that format). Only the config path goes into .mcp.json; the tokens stay in config/config.json. Start a new Claude Code session and run /mcp to see the server and its tools.

To use a running HTTP server (see HTTP transport) instead:

claude mcp add --transport http fortigate http://127.0.0.1:8814/fortigate-mcp
# with auth.require_auth = true
claude mcp add --transport http fortigate http://127.0.0.1:8814/fortigate-mcp \
  --header "Authorization: Bearer <http-token>"

Claude Desktop

Open Settings > Developer > Edit Config, or edit the file directly:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "fortigate": {
      "command": "/absolute/path/to/uv",
      "args": ["run", "--directory", "/absolute/path/fortigate-mcp", "fortigate-mcp-server"],
      "env": {
        "FORTIGATE_MCP_CONFIG": "/absolute/path/fortigate-mcp/config/config.json"
      }
    }
  }
}
  • Claude Desktop does not read your shell PATH, so give the full path of uv (which uv, for example /opt/homebrew/bin/uv or ~/.local/bin/uv written out in full; on Windows where uv).

  • On Windows, write paths with forward slashes or doubled backslashes (C:\\Users\\me\\fortigate-mcp).

  • Quit Claude Desktop completely before editing the file and start it again afterwards; the app can rewrite the file while it runs. The server then shows up in the tools menu of a new chat.

  • For the HTTP transport, examples/claude_desktop_config.http.json bridges to the URL with mcp-remote (needs Node.js).

Cursor

Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project), then check Cursor Settings > MCP:

{
  "mcpServers": {
    "fortigate": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/fortigate-mcp", "fortigate-mcp-server"],
      "env": {
        "FORTIGATE_MCP_CONFIG": "/absolute/path/fortigate-mcp/config/config.json"
      }
    }
  }
}

For a running HTTP server, use "url": "http://127.0.0.1:8814/fortigate-mcp" instead of command/args/env; examples/cursor_mcp_config.json shows both forms.

Other clients

  • stdio: command uv, arguments run --directory /absolute/path/fortigate-mcp fortigate-mcp-server, environment FORTIGATE_MCP_CONFIG=/absolute/path/fortigate-mcp/config/config.json (or --config <path> as an argument instead of the variable).

  • Streamable HTTP: http://127.0.0.1:8814/fortigate-mcp, with an Authorization: Bearer <token> header when auth.require_auth is on.

python -m src.fortigate_mcp.server is equivalent to the fortigate-mcp-server command and is what the files in examples/ use.

7. First requests and enabling writes

Ask the assistant, for example:

  • "List my FortiGate devices and test the connection to fgt-hq."

  • "Show the firewall policies on fgt-hq that allow traffic to the internet."

When you want the assistant to change configuration:

  1. Give the API user a profile with write access (step 3).

  2. Set "allow_writes": true in config/config.json and restart the server.

  3. Ask for a backup first ("Save a config backup of fgt-hq"), then for the change.

  4. Set allow_writes back to false when you are done.

HTTP transport

The HTTP transport serves several clients from one long-running process:

./start_http_server.sh
# or
uv run python -m src.fortigate_mcp.server_http \
  --host 127.0.0.1 --port 8814 --path /fortigate-mcp --config config/config.json

start_http_server.sh reads MCP_HTTP_HOST, MCP_HTTP_PORT, MCP_HTTP_PATH and FORTIGATE_MCP_CONFIG, and uses .venv when it exists. Check it with:

curl http://127.0.0.1:8814/health        # {"status":"healthy"}

The MCP endpoint is http://127.0.0.1:8814/fortigate-mcp and lists 138 tools. GET /health answers without a token. Before binding to anything other than 127.0.0.1, turn on bearer-token authentication:

"auth": {
  "require_auth": true,
  "api_tokens": ["<output of: openssl rand -hex 32>"]
}

Clients then send Authorization: Bearer <token>. Put a TLS reverse proxy in front of the server if clients connect over the network. HTTP_MCP_GUIDE.md covers the HTTP mode in more detail.

Docker

cp config/config.example.json config/config.json    # edit it as in step 4
docker compose up -d --build
docker compose logs -f
curl http://127.0.0.1:8814/health

The container runs the HTTP transport on port 8814, published on the loopback interface only. config/config.json is mounted read-only and logs are written to ./logs. Connect clients to http://127.0.0.1:8814/fortigate-mcp as described in step 6. The FortiGate addresses in the configuration must be reachable from the container.

Updating

cd /absolute/path/fortigate-mcp
git pull
uv sync --locked

Then restart the MCP client, or run docker compose up -d --build for the container.

Safety model

Every tool carries a risk class that is checked at dispatch time, on both transports:

Class

Count

Examples

Default

read

111

list_*, get_*, query_*, lookup_*, cmdb_list, monitor_get, backup_config

allowed

write

19

create_*, update_*, add_*, move_firewall_policy, execute_*

refused until writes are enabled

destructive

10

delete_*, remove_*

refused until writes are enabled

The classification is derived from the tool name and verified by the test suite; SECURITY.md lists every tool with its class. Secret-looking fields (passwords, PSKs, passphrases, SNMP communities, keys) are redacted from every response, and the device token never appears in logs or error messages.

backup_config is a read tool for the device, but it writes a file on the machine running the server; it refuses to overwrite an existing file unless asked.

Tool reference

Devices

list_devices, get_device_status, test_device_connection, add_device, remove_device, discover_vdoms, health_check, get_server_info, get_system_resources, get_performance_status, get_system_time, list_firmware, get_license_status, get_ha_status, get_security_rating, list_running_processes

Firewall policies

list_firewall_policies, get_firewall_policy_detail (resolves groups, identity and profiles), create_firewall_policy, update_firewall_policy, move_firewall_policy, delete_firewall_policy, lookup_policy (which rule would match a given flow), list_central_snat_rules, list_shaping_policies, list_traffic_shapers, list_recurring_schedules, list_onetime_schedules, list_internet_service_names

Objects

Addresses: list_address_objects, create_address_object, update_address_object, delete_address_object. Address groups: list_address_groups, get_address_group_detail, create_address_group, add_address_group_members, remove_address_group_members, delete_address_group. Services: list_service_objects, create_service_object, update_service_object, delete_service_object, list_service_groups. VIPs and pools: list_virtual_ips, get_virtual_ip_detail, create_virtual_ip, update_virtual_ip, delete_virtual_ip, list_vip_groups, list_ip_pools.

Network and routing

list_interfaces, get_interface_status, list_interface_counters, list_zones, list_static_routes, get_static_route_detail, create_static_route, update_static_route, delete_static_route, get_routing_table, list_ipv6_routes, lookup_route, list_policy_routes, get_bgp_config, get_ospf_config, list_prefix_lists, list_route_maps, get_sdwan_config, list_sdwan_health_checks, list_sdwan_members, list_arp_table, list_lldp_neighbors, ping_from_device, geoip_lookup

DHCP

list_dhcp_servers (with reservations), list_dhcp_leases, create_dhcp_reservation, delete_dhcp_reservation

VPN

list_ipsec_tunnels (live status), list_ipsec_phase1, list_ipsec_phase2, execute_ipsec_tunnel_action (up/down), list_ssl_vpn_sessions, get_ssl_vpn_settings, list_ssl_vpn_portals, list_local_certificates, list_ca_certificates, list_remote_certificates

Users and authentication

list_local_users, list_user_groups, list_firewall_auth_sessions, list_radius_servers, list_ldap_servers, list_tacacs_servers, list_saml_servers, list_fsso_agents, list_fortitokens, list_admins, list_api_users, list_endpoint_devices

Security profiles

list_security_profiles and get_security_profile_detail for application, webfilter, antivirus, ips, dnsfilter, ssl-ssh, dlp, emailfilter, file-filter, icap, ssh-filter, waf, voip and virtual-patch; list_url_filters, list_dns_domain_filters, list_ips_custom_signatures, list_application_groups

Sessions and logs

list_active_sessions, get_fortiview_top, query_traffic_log, query_event_log, query_utm_log, get_log_settings, list_syslog_settings, get_fortianalyzer_settings, backup_config

System settings

get_system_global, get_dns_settings, get_ntp_settings, list_snmp_communities, get_snmp_sysinfo

Wireless and switching

list_wireless_ssids, list_ap_profiles, list_managed_aps, list_wifi_clients, list_rogue_aps, get_wifi_controller_settings, list_managed_switches, list_switch_port_stats

Generic access to the whole API

cmdb_list, cmdb_get, create_cmdb_object, update_cmdb_object, delete_cmdb_object, monitor_get, execute_monitor_action, log_get

These take a FortiOS path and reach any table or monitor endpoint, for example:

cmdb_list   path="firewall/policy" filter_expr="action==deny" format_fields="policyid|name|srcaddr"
cmdb_get    path="system/interface" key="vlan10"
monitor_get path="system/interface" params={"interface_name": "wan"}
log_get     path="memory/event/vpn" rows=20 filter_expr="logdesc=@tunnel"
execute_monitor_action path="firewall/session/close" data={"saddr": "10.0.0.5", "daddr": "1.1.1.1", "sport": 51000, "dport": 443, "pro": "tcp"}

Paths are validated before they become URL segments; keys are percent-encoded, so names with spaces such as G Suite work.

HTTP-only: test_connection, health, get_schema_info.

Development

uv sync --locked --all-extras
uv run pytest                 # full suite with the coverage gate from pyproject.toml
uv run pytest -q --no-cov     # quicker iteration
uv run ruff check src tests
uv run mypy src

The tool surface is frozen in tests/fixtures/tool_schemas_*.json. After an intentional schema change, regenerate the goldens and update the SHA pins in tests/test_engine_gate.py:

UPDATE_SNAPSHOTS=1 uv run pytest tests/test_tool_schema_snapshot.py --no-cov

Adding a parameterless read tool is one CatalogEntry in src/fortigate_mcp/tools/catalog.py plus a row in the SECURITY.md table.

Project layout

src/fortigate_mcp/
  server.py            stdio entry point
  server_http.py       HTTP entry point (uvicorn + bearer-token middleware)
  registry.py          every tool, its description and risk class, for both transports
  core/fortigate.py    REST client (cmdb/monitor/log, typed endpoints, generic helpers)
  validation.py        path/key/host validators and secret redaction
  formatting/          text renderers for each resource type
  tools/               tool classes: device, firewall, network, routing, virtual_ip,
                       dhcp, security, vpn, users, system, generic, catalog
config/                config.example.json (copy to config.json)
examples/              MCP client configuration snippets
tests/                 pytest suite, respx-based API tests, golden tool schemas

Troubleshooting

  • FORTIGATE_MCP_CONFIG environment variable must be set: pass -e in claude mcp add or --config on the command line.

  • uv sync tries to build pydantic-core and fails: uv picked Python 3.14. Run uv sync --locked --python 3.12.

  • Claude Desktop shows the server as failed or disconnected right after start: the command is not found. Use the full path of uv, and check the app's MCP log (macOS: ~/Library/Logs/Claude/mcp-server-fortigate.log).

  • Tools do not appear after a config change: restart the server or the client; the configuration is read only at startup.

  • CERTIFICATE_VERIFY_FAILED: the FortiGate certificate is not trusted on the machine running the server. Install a trusted certificate on the FortiGate or add its CA to the system trust store; see verify_ssl in step 4.

  • A RuntimeWarning: 'src.fortigate_mcp.server' found in sys.modules line when the server is started with python -m: harmless; the fortigate-mcp-server command does not print it.

  • Authentication failed / HTTP 401: wrong token, or the request comes from an address outside the API user's trusted hosts.

  • Permission denied / HTTP 403 on a single tool: the API user's admin profile lacks that area (for example list_firewall_auth_sessions needs the user monitor permission).

  • HTTP 404 on a catalog tool: that FortiOS release or model does not have the endpoint; monitor_get/cmdb_list with a nearby path usually finds the current one.

  • A *_tool is a write tool and this server is running in read-only mode error means allow_writes is still false.

  • Session-table and log filters use FortiOS filter syntax (srcaddr==10.0.0.5, logdesc=@login); the typed tools build these for you.

Credits

This project builds on alpadalar/fortigate-mcp-server. Thank you for the repository: the configuration loader, the dual stdio/HTTP transport, the read-only write gate and the test harness all come from there.

The purpose of this fork is to add tools. The original 33 tools covered devices, policies, address and service objects, routes and VIPs; this repository adds address groups, DHCP, VPN, identity, security profiles, sessions, logs, diagnostics, a catalog of read-only list tools and generic access to the rest of the FortiOS REST API, for a total of 140 tools.

License

MIT License, see LICENSE.

FortiGate and FortiOS are trademarks of Fortinet, Inc. This project is not affiliated with Fortinet.

Available Tools

137 tools
add_address_group_membersA

Add address objects to an existing address group, keeping the current members.

Typical use: grant a new PC an exception that a policy already applies to the group (e.g. add a host object to an "allowed" group instead of editing the policy).

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Address group name

  • members: Address object names to add (already-present names are skipped)

  • vdom: Virtual Domain name (optional)

Returns:

  • Which members were added and the new member count

Inputs: name (required), members (required), device_id (required), vdom.

add_deviceB

Add a new FortiGate device to the MCP server.

This tool registers a new FortiGate device with the server, configuring connection parameters and authentication credentials.

Parameters:

  • device_id: Unique identifier for the new device

  • host: IP address or hostname of the FortiGate device

  • port: HTTPS port (default: 443)

  • username: Username for authentication (if not using API token)

  • password: Password for authentication (if not using API token)

  • api_token: API token for authentication (preferred method)

  • vdom: Virtual Domain name (default: "root")

  • verify_ssl: Whether to verify SSL certificates (default: false)

  • timeout: Connection timeout in seconds (default: 30)

Returns:

  • Registration status

  • Device configuration summary

Inputs: host (required), device_id (required), port, vdom, +5 more.

backup_configA

Download the running configuration and save it to a file on the MCP server host.

Parameters:

  • device_id: Identifier of the FortiGate device

  • output_path: Absolute file path to write (parent directory must exist)

  • scope: "global" (default, whole device) or "vdom"

  • overwrite: Replace an existing file (default false)

  • vdom: Virtual Domain name (optional)

Returns:

  • Saved path, size and line count

Inputs: device_id (required), output_path (required), vdom, scope, +1 more.

cmdb_getA

Get one configuration object by key (GET /api/v2/cmdb/{path}/{key}).

Examples: path "firewall/policy" key "56"; path "system/interface" key "port1"; path "vpn.ipsec/phase1-interface" key "branch-vpn". Secret fields are redacted.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: cmdb table path

  • key: Object key (policy id, object name, interface name, ...)

  • vdom: Virtual Domain name (optional)

Returns:

  • The raw JSON object

Inputs: key (required), path (required), device_id (required), vdom.

cmdb_listA

List every object of any FortiOS configuration table (GET /api/v2/cmdb/{path}).

The escape hatch for tables that have no dedicated tool. Examples of path: "firewall/policy", "system/interface", "vpn.ipsec/phase1-interface", "router/static", "user/local", "wireless-controller/vap", "system/sdwan". Secret-looking fields (passwords, PSKs, keys) are redacted; large responses are truncated, so narrow them with filter_expr, count or format_fields.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: cmdb table path without the /api/v2/cmdb/ prefix

  • filter_expr: Optional FortiOS filter, e.g. "status==enable" or "name=@vlan" ("&" joins several)

  • start, count: Optional pagination

  • format_fields: Optional "|"-separated field list to return, e.g. "policyid|name|action"

  • vdom: Virtual Domain name (optional)

Returns:

  • The raw JSON response (results plus metadata)

Inputs: path (required), device_id (required), vdom, count, +3 more.

create_address_groupA

Create a new address group from existing address object names.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Name for the new group (letters, digits, underscore, hyphen)

  • members: List of existing address object (or group) names; at least one is required

  • comment: Optional description

  • vdom: Virtual Domain name (optional)

Returns:

  • Creation status

Inputs: name (required), members (required), device_id (required), vdom, +1 more.

create_address_objectA

Create a new address object on a FortiGate device.

This tool adds a new network address object that can be used in firewall policies and other security rules.

Parameters:

  • device_id: Identifier of the FortiGate device

  • address_data: Address object configuration as JSON

  • vdom: Virtual Domain name (optional, uses device default)

Address data should include:

  • name: Object name

  • type: ipmask, iprange, or fqdn

  • subnet: IP/netmask (for ipmask type)

  • start-ip/end-ip: IP range (for iprange type)

  • fqdn: Domain name (for fqdn type)

  • comment: Optional description

Returns:

  • Creation status

  • Object configuration summary

Inputs: device_id (required), address_data (required), vdom.

create_cmdb_objectA

Create a configuration object in any table from a raw JSON payload (POST /api/v2/cmdb/{path}).

Use the typed create_* tools when one exists; this is for tables without one (e.g. "firewall/ippool", "firewall.schedule/recurring", "system/zone", "vpn.ipsec/phase2-interface"). The payload must use FortiOS field names.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: cmdb table path

  • data: Object payload as JSON (FortiOS field names, e.g. {"name": "...", "member": [{"name": "..."}]})

  • vdom: Virtual Domain name (optional)

Returns:

  • Creation status and the new object's key when FortiOS reports it

Inputs: data (required), path (required), device_id (required), vdom.

create_dhcp_reservationA

Reserve an IP address for a MAC address on a FortiGate DHCP server.

The DHCP server is selected by dhcp_server_id, else by interface, else automatically by the server whose range/subnet contains the IP. Duplicate IP or MAC reservations are rejected before anything is written.

Parameters:

  • device_id: Identifier of the FortiGate device

  • ip: IPv4 address to reserve

  • mac: MAC address (aa:bb:cc:dd:ee:ff)

  • description: Optional description (e.g. hostname / owner)

  • dhcp_server_id: Optional DHCP server ID (see list_dhcp_servers)

  • interface: Optional interface name whose DHCP server should hold the reservation

  • vdom: Virtual Domain name (optional)

Returns:

  • Creation status with the chosen DHCP server

Inputs: ip (required), mac (required), device_id (required), vdom, +3 more.

create_firewall_policyA

Create a new firewall policy on a FortiGate device.

This tool adds a new security policy to control traffic flow through the FortiGate device, defining rules for source, destination, and services.

Parameters:

  • device_id: Identifier of the FortiGate device

  • policy_data: Policy configuration as JSON object

  • vdom: Virtual Domain name (optional, uses device default)

Policy data should include:

  • name: Policy name

  • srcintf: Source interface(s)

  • dstintf: Destination interface(s)

  • srcaddr: Source address object(s)

  • dstaddr: Destination address object(s)

  • service: Service object(s)

  • action: accept or deny

Returns:

  • Creation status

  • Policy ID assigned

  • Configuration summary

Inputs: device_id (required), policy_data (required), vdom.

create_service_objectA

Create a new service object on a FortiGate device.

This tool adds a new network service object that defines protocols and ports for use in firewall policies.

Parameters:

  • device_id: Identifier of the FortiGate device

  • service_data: Service object configuration as JSON

  • vdom: Virtual Domain name (optional, uses device default)

Service data should include:

  • name: Service name

  • protocol: TCP, UDP, or ICMP

  • tcp-portrange: TCP port range (for TCP)

  • udp-portrange: UDP port range (for UDP)

  • comment: Optional description

Returns:

  • Creation status

  • Service configuration summary

Inputs: device_id (required), service_data (required), vdom.

create_static_routeA

Create a new static route on a FortiGate device.

This tool adds a new static route to the device's routing configuration, defining how traffic to specific networks should be forwarded.

Parameters:

  • device_id: Identifier of the FortiGate device

  • route_data: Route configuration as JSON

  • vdom: Virtual Domain name (optional, uses device default)

Route data should include:

  • dst: Destination network (IP/netmask)

  • gateway: Next hop gateway IP

  • device: Outgoing interface name

  • distance: Administrative distance (optional)

  • comment: Optional description

Returns:

  • Creation status

  • Route configuration summary

Inputs: device_id (required), route_data (required), vdom.

create_virtual_ipB

Create a new Virtual IP on a FortiGate device.

This tool adds a new Virtual IP object that can be used for port forwarding, NAT, and external access to internal services.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Virtual IP name

  • extip: External IP address

  • mappedip: Mapped internal IP address

  • extintf: External interface name

  • portforward: Enable/disable port forwarding (default: disable)

  • protocol: Protocol type (tcp/udp, default: tcp)

  • extport: External port (optional)

  • mappedport: Mapped port (optional)

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Creation status

  • Virtual IP configuration summary

Inputs: name (required), extip (required), extintf (required), mappedip (required), +6 more.

delete_address_groupB

Delete an address group. FortiOS refuses while a policy still references the group.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Address group name

  • vdom: Virtual Domain name (optional)

Returns:

  • Deletion status

Inputs: name (required), device_id (required), vdom.

delete_address_objectA

Delete an address object. FortiOS refuses while a policy or group still references it.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Address object name

  • vdom: Virtual Domain name (optional)

Returns:

  • Deletion status

Inputs: name (required), device_id (required), vdom.

delete_cmdb_objectB

Delete a configuration object from any table (DELETE /api/v2/cmdb/{path}/{key}).

FortiOS refuses while the object is still referenced elsewhere.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: cmdb table path

  • key: Object key

  • vdom: Virtual Domain name (optional)

Returns:

  • Deletion status

Inputs: key (required), path (required), device_id (required), vdom.

delete_dhcp_reservationB

Delete a DHCP reservation identified by reservation_id, ip or mac.

Parameters:

  • device_id: Identifier of the FortiGate device

  • dhcp_server_id: Optional DHCP server ID to narrow the search

  • reservation_id: Optional reservation entry ID (see list_dhcp_servers)

  • ip: Optional reserved IPv4 address

  • mac: Optional reserved MAC address

  • vdom: Virtual Domain name (optional)

Returns:

  • Deletion status (ambiguous matches are refused)

Inputs: device_id (required), ip, mac, vdom, +2 more.

delete_firewall_policyB

Delete a firewall policy from a FortiGate device.

This tool removes an existing firewall policy from the device configuration, permanently deleting the specified security rule.

Parameters:

  • device_id: Identifier of the FortiGate device

  • policy_id: ID of the policy to delete

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Deletion status confirmation

Inputs: device_id (required), policy_id (required), vdom.

delete_service_objectA

Delete a custom service object. FortiOS refuses while a policy or service group references it.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Service object name

  • vdom: Virtual Domain name (optional)

Returns:

  • Deletion status

Inputs: name (required), device_id (required), vdom.

delete_static_routeB

Delete a static route from a FortiGate device.

This tool removes an existing static route from the device configuration.

Parameters:

  • device_id: Identifier of the FortiGate device

  • route_id: ID of the route to delete

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Deletion status confirmation

Inputs: route_id (required), device_id (required), vdom.

delete_virtual_ipA

Delete a Virtual IP from a FortiGate device.

This tool removes an existing Virtual IP object from the device configuration. Note that Virtual IPs in use by policies cannot be deleted.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Name of the Virtual IP to delete

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Deletion status confirmation

Inputs: name (required), device_id (required), vdom.

discover_vdomsA

Discover and list all Virtual Domains (VDOMs) on a FortiGate device.

This tool queries the specified FortiGate device to retrieve information about all configured Virtual Domains, including their status and settings.

Parameters:

  • device_id: Identifier of the FortiGate device to query

Returns:

  • List of VDOMs with their configuration

  • VDOM status (enabled/disabled)

  • Resource allocation information

Inputs: device_id (required).

execute_ipsec_tunnel_actionA

Bring an IPsec tunnel up or down (monitor/vpn/ipsec/tunnel_up | tunnel_down).

Bringing a site-to-site tunnel down interrupts traffic until it renegotiates; requires writes to be enabled.

Parameters:

  • device_id: Identifier of the FortiGate device

  • phase1_name: Phase-1 interface name (see list_ipsec_phase1 / list_ipsec_tunnels)

  • action: "up" or "down"

  • phase2_name: Optional phase-2 selector name (defaults to all selectors of the phase-1)

  • vdom: Virtual Domain name (optional)

Returns:

  • Action status

Inputs: action (required), device_id (required), phase1_name (required), vdom, +1 more.

execute_monitor_actionA

Run a monitor action (POST /api/v2/monitor/{path}): tunnel up/down, session close, cache flush, user deauthentication, etc.

Examples: path "vpn/ipsec/tunnel_down" data {"p1name": "branch-vpn"}; path "firewall/session/close" data {"saddr": "10.0.0.5", "daddr": "...", "sport": 1, "dport": 443, "pro": "tcp"}; path "user/firewall/deauth" data {"user": "alice", "ip": "10.0.0.5"}. These change device state and require writes to be enabled.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: monitor action path

  • data: Optional JSON body

  • vdom: Virtual Domain name (optional)

Returns:

  • The raw JSON response

Inputs: path (required), device_id (required), data, vdom.

geoip_lookupA

Resolve an IP address to its FortiGuard geolocation (country) via the device.

Parameters:

  • device_id: Identifier of the FortiGate device

  • ip: IPv4 address

  • vdom: Virtual Domain name (optional)

Returns:

  • Country and related GeoIP fields

Inputs: ip (required), device_id (required), vdom.

get_address_group_detailA

Show one address group with every member resolved to its subnet, range or FQDN.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Address group name (exact match)

  • vdom: Virtual Domain name (optional)

Returns:

  • Group metadata and each member with its resolved value (nested groups are listed with their members)

Inputs: name (required), device_id (required), vdom.

get_bgp_configB

Show the BGP configuration (AS, router-id, neighbors, networks).

Inputs: device_id (required), vdom.

get_device_statusB

Get detailed system status information for a specific FortiGate device.

This tool retrieves comprehensive system information from a FortiGate device, including hardware details, software version, hostname, and operational status.

Parameters:

  • device_id: Identifier of the FortiGate device to query

Returns:

  • Device model and serial number

  • Software version and build

  • System hostname

  • Current operational status

  • Virtual Domain information

Inputs: device_id (required).

get_dns_settingsB

Show the system DNS configuration (primary/secondary servers, domain, DoT/DoH protocol).

Inputs: device_id (required), vdom.

get_firewall_policy_detailC

Get detailed information for a specific firewall policy

Inputs: device_id (required), policy_id (required), vdom.

get_fortianalyzer_settingsB

Show FortiAnalyzer logging settings (log.fortianalyzer/setting).

Inputs: device_id (required), vdom.

get_fortiview_topA

FortiView top talkers from the live session statistics (monitor/fortiview/statistics).

Parameters:

  • device_id: Identifier of the FortiGate device

  • report_by: source (default), destination, application, threat, country, policy, interface, website, web_category

  • count: Rows to return (default 20, max 200)

  • sort_by: bytes (default), sessions or bandwidth

  • source_interface: Optional source interface filter

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per entry with sessions, bytes and bandwidth

Inputs: device_id (required), vdom, count, sort_by, +2 more.

get_ha_statusA

Show HA cluster statistics (members, roles, sync state). Standalone units return an empty list.

Inputs: device_id (required), vdom.

get_interface_statusA

Get the current status of a specific network interface on a FortiGate device.

This tool retrieves live status information for a single named interface, including its link state, IP address configuration, and related details.

Parameters:

  • device_id: Identifier of the FortiGate device

  • interface_name: Name of the specific interface to query

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Interface name

  • Link status (up/down)

  • IP address configuration

  • Related interface detail fields

Inputs: device_id (required), interface_name (required), vdom.

get_license_statusC

Show FortiGuard/FortiCare license and subscription status.

Inputs: device_id (required), vdom.

get_log_settingsA

Show where the device sends logs: memory, disk, syslog, FortiAnalyzer and FortiCloud settings in one view.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per log destination with status, server and key options

Inputs: device_id (required), vdom.

get_ntp_settingsA

Show the NTP configuration (sync mode, servers, server mode on interfaces).

Inputs: device_id (required), vdom.

get_ospf_configB

Show the OSPF configuration (router-id, areas, networks, interfaces).

Inputs: device_id (required), vdom.

get_performance_statusB

Show CPU/memory/session/uptime performance counters (monitor/system/performance/status).

Inputs: device_id (required), vdom.

get_routing_tableA

Get the current routing table from a FortiGate device.

This tool retrieves the active routing table showing all routes currently installed on the device, including static, dynamic, and connected routes.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Active route entries

  • Route sources (static, OSPF, BGP, etc.)

  • Metrics and preferences

  • Interface assignments

Inputs: device_id (required), vdom.

get_sdwan_configC

Show the SD-WAN configuration (zones, members, health checks, rules).

Inputs: device_id (required), vdom.

get_security_profile_detailB

Show one security profile in depth.

For application control lists the entries are shown in evaluation order with their action, categories and application signatures (resolved to names). For web filter profiles the FortiGuard category actions are grouped by action.

Parameters:

  • device_id: Identifier of the FortiGate device

  • profile_type: application | webfilter | antivirus | ips | dnsfilter | ssl-ssh

  • name: Profile name

  • vdom: Virtual Domain name (optional)

Returns:

  • Profile settings and entries

Inputs: name (required), device_id (required), profile_type (required), vdom.

get_security_ratingC

Show the Security Fabric security rating summary (monitor/system/security-rating).

Inputs: device_id (required), vdom.

get_server_infoB

Get detailed information about the FortiGate MCP server.

This tool provides comprehensive information about the server configuration, capabilities, and current operational status.

Returns:

  • Server version and build information

  • Available tools and capabilities

  • Configuration summary

  • Runtime statistics

  • API endpoints

Inputs: no named parameters.

get_snmp_sysinfoC

Show SNMP agent status, contact, location and description.

Inputs: device_id (required), vdom.

get_ssl_vpn_settingsA

Show SSL-VPN settings (status, port, source interfaces, portal mapping, tunnel IP pools).

Inputs: device_id (required), vdom.

get_static_route_detailB

Get detailed information for a specific static route.

This tool retrieves comprehensive configuration details for a specific static route, including all settings and status.

Parameters:

  • device_id: Identifier of the FortiGate device

  • route_id: ID of the route to query

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Complete route configuration

  • Gateway and interface details

  • Status information

Inputs: route_id (required), device_id (required), vdom.

get_system_globalA

Show global system settings: hostname, admin ports/timeouts, timezone, management features.

Inputs: device_id (required), vdom.

get_system_resourcesB

Show current CPU, memory, disk and session usage of a FortiGate device.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • Current values for cpu, memory, disk, sessions, setup rate

Inputs: device_id (required), vdom.

get_system_timeA

Show the device clock and timezone (monitor/system/time).

Inputs: device_id (required), vdom.

get_virtual_ip_detailA

Get detailed information for a specific Virtual IP.

This tool retrieves comprehensive configuration details for a specific Virtual IP object, including all settings and mappings.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Name of the Virtual IP to query

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Complete Virtual IP configuration

  • Port forwarding details

  • Interface assignments

  • Status information

Inputs: name (required), device_id (required), vdom.

get_wifi_controller_settingsC

Show wireless controller settings (country, duplicate SSID handling, fake SSID action).

Inputs: device_id (required), vdom.

health_checkB

Perform a comprehensive health check of the FortiGate MCP server.

This tool checks the overall health and status of the MCP server, including device connectivity, service availability, and system resources.

Returns:

  • Overall server health status

  • Registered device count

  • Service availability

  • Performance metrics

  • Error conditions if any

Inputs: no named parameters.

list_active_sessionsA

Query the live session table with optional filters.

Use it to check whether a host's traffic is actually flowing and which policy it matched.

Parameters:

  • device_id: Identifier of the FortiGate device

  • source_ip: Optional source IPv4 address

  • destination_ip: Optional destination IPv4 address

  • destination_port: Optional destination port

  • policy_id: Optional policy ID

  • count: Maximum sessions to return (default 50, max 500)

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per session: protocol, source, destination, policy, duration, bytes, NAT

Inputs: device_id (required), vdom, count, policy_id, +3 more.

list_address_groupsA

List address groups on a FortiGate device with their member names.

Address groups bundle address objects (and other groups) so one policy entry can reference many hosts/subnets. Use get_address_group_detail to resolve the members to IP values.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Group name, member count, member names, excluded members, comment

Inputs: device_id (required), vdom.

list_address_objectsA

List all address objects configured on a FortiGate device.

This tool retrieves all network address objects defined on the device, including IP addresses, subnets, ranges, and FQDN objects.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Object name and type

  • IP address or subnet configuration

  • Comments and descriptions

Inputs: device_id (required), vdom.

list_adminsB

List administrator accounts with profile, trusted hosts and two-factor settings (passwords redacted).

Inputs: device_id (required), vdom.

list_api_usersB

List REST API users (api-user) with their admin profile and trusted hosts (keys redacted).

Inputs: device_id (required), vdom.

list_application_groupsC

List application control groups (application/group).

Inputs: device_id (required), vdom.

list_ap_profilesB

List FortiAP profiles (platform, radios, SSIDs per radio).

Inputs: device_id (required), vdom.

list_arp_tableA

Show the ARP table (IP, MAC, interface, age).

Inputs: device_id (required), vdom.

list_ca_certificatesC

List trusted CA certificates installed on the device.

Inputs: device_id (required), vdom.

list_central_snat_rulesC

List central SNAT map rules.

Inputs: device_id (required), vdom.

list_devicesA

List the identifiers of all registered FortiGate devices.

This tool returns the device IDs of every FortiGate currently registered with the MCP server. Use get_device_status with a specific device ID to retrieve that device's system, connection, and configuration details.

Returns:

  • The registered device IDs

Inputs: no named parameters.

list_dhcp_leasesA

List active DHCP leases (ip, mac, hostname, interface, expiry, reserved flag).

Useful to find a PC's MAC address before creating a reservation.

Parameters:

  • device_id: Identifier of the FortiGate device

  • interface: Optional interface name to filter on (e.g. "vlan10")

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per lease sorted by interface and IP

Inputs: device_id (required), vdom, interface.

list_dhcp_serversB

List DHCP servers configured on a FortiGate device, including their reservations.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • Per server: id, interface, status, IP range, gateway/netmask, DNS, lease time, reserved addresses (id, ip, mac, description)

Inputs: device_id (required), vdom.

list_dns_domain_filtersC

List DNS filter domain lists (dnsfilter/domain-filter).

Inputs: device_id (required), vdom.

list_endpoint_devicesB

List devices seen by the device inventory (monitor/user/device/query): IP, MAC, hostname, OS, interface.

Inputs: device_id (required), vdom.

list_firewall_auth_sessionsA

List users currently authenticated against identity-based firewall policies.

Requires an API profile with permission on the user monitor (otherwise FortiOS returns 403).

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • Username, source IP, method, duration per authenticated user

Inputs: device_id (required), vdom.

list_firewall_policiesA

List all firewall policies configured on a FortiGate device.

This tool retrieves and displays all firewall security policies from the specified device and Virtual Domain, showing traffic control rules and settings.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Policy ID and name

  • Source and destination addresses

  • Services and ports

  • Action (allow/deny)

  • Policy status (enabled/disabled)

Inputs: device_id (required), vdom.

list_firmwareA

Show the running firmware and available upgrade images (monitor/system/firmware).

Inputs: device_id (required), vdom.

list_fortitokensB

List FortiTokens and their status/assignment (monitor/user/fortitoken).

Inputs: device_id (required), vdom.

list_fsso_agentsB

List FSSO collector agents (passwords redacted).

Inputs: device_id (required), vdom.

list_interface_countersC

Show per-interface traffic counters and link state (monitor/system/interface).

Inputs: device_id (required), vdom.

list_interfacesB

List all network interfaces configured on a FortiGate device.

This tool retrieves information about all network interfaces, including physical ports, VLANs, and virtual interfaces.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Interface names and types

  • IP address configurations

  • Interface status (up/down)

  • VLAN and zone assignments

Inputs: device_id (required), vdom.

list_internet_service_namesA

List FortiGuard Internet Service names that policies can reference (large list; use cmdb_list with a filter for lookups).

Inputs: device_id (required), vdom.

list_ip_poolsC

List NAT IP pools (type, start/end IP, ARP reply).

Inputs: device_id (required), vdom.

list_ips_custom_signaturesC

List custom IPS signatures (ips/custom).

Inputs: device_id (required), vdom.

list_ipsec_phase1A

List IPsec phase-1 interfaces: type, remote gateway, IKE version, proposals, peer settings (PSKs redacted).

Inputs: device_id (required), vdom.

list_ipsec_phase2B

List IPsec phase-2 selectors: phase-1 name, local/remote subnets, proposals, auto-negotiate.

Inputs: device_id (required), vdom.

list_ipsec_tunnelsB

List IPsec VPN tunnels with status, remote gateway, phase-2 selectors and traffic counters.

Dial-up tunnels show the number of connected clients instead of a gateway.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • One block per tunnel: state (UP/PARTIAL/DOWN/dialup), gateway, bytes in/out, phase-2 entries

Inputs: device_id (required), vdom.

list_ipv6_routesA

Show the IPv6 routing table (monitor/router/ipv6).

Inputs: device_id (required), vdom.

list_ldap_serversA

List LDAP servers (server, port, DN, bind type, secure mode; passwords redacted).

Inputs: device_id (required), vdom.

list_lldp_neighborsB

Show LLDP neighbors (switch ports, neighbor system names).

Inputs: device_id (required), vdom.

list_local_certificatesB

List local (device) certificates with subject, issuer and validity (private keys redacted).

Inputs: device_id (required), vdom.

list_local_usersB

List local user accounts defined on the FortiGate (status, type, two-factor, email).

Passwords are never returned by FortiOS.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per user

Inputs: device_id (required), vdom.

list_managed_apsB

Show managed FortiAPs with status, IP, clients and firmware (monitor/wifi/managed_ap).

Inputs: device_id (required), vdom.

list_managed_switchesB

List FortiSwitch units managed by the switch controller (monitor/switch-controller/managed-switch).

Inputs: device_id (required), vdom.

list_onetime_schedulesB

List one-time firewall schedules (start/end datetime).

Inputs: device_id (required), vdom.

list_policy_routesC

List policy-based routes (router/policy).

Inputs: device_id (required), vdom.

list_prefix_listsC

List router prefix lists.

Inputs: device_id (required), vdom.

list_radius_serversA

List RADIUS servers (addresses, auth type, NAS IP; secrets redacted).

Inputs: device_id (required), vdom.

list_recurring_schedulesB

List recurring firewall schedules (days and time window).

Inputs: device_id (required), vdom.

list_remote_certificatesC

List remote certificates (vpn.certificate/remote).

Inputs: device_id (required), vdom.

list_rogue_apsB

Show detected rogue/neighbor access points (monitor/wifi/rogue_ap).

Inputs: device_id (required), vdom.

list_route_mapsC

List router route maps.

Inputs: device_id (required), vdom.

list_running_processesB

List running processes with CPU/memory usage (monitor/system/running-processes).

Inputs: device_id (required), vdom.

list_saml_serversB

List SAML identity providers (entity IDs, SSO/SLO URLs).

Inputs: device_id (required), vdom.

list_sdwan_health_checksB

Show SD-WAN health-check results per member (latency, jitter, packet loss).

Inputs: device_id (required), vdom.

list_sdwan_membersB

Show SD-WAN member interface status and traffic.

Inputs: device_id (required), vdom.

list_security_profilesB

List security (UTM) profiles of one type with a short summary each.

Parameters:

  • device_id: Identifier of the FortiGate device

  • profile_type: application | webfilter | antivirus | ips | dnsfilter | ssl-ssh

  • vdom: Virtual Domain name (optional)

Returns:

  • Profile names, comments and a per-type summary (entry counts, block counts, ...)

Inputs: device_id (required), profile_type (required), vdom.

list_service_groupsB

List service groups with their member services resolved to protocol/ports.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • Group name, members with resolved ports, comment

Inputs: device_id (required), vdom.

list_service_objectsB

List all service objects configured on a FortiGate device.

This tool retrieves all network service objects defined on the device, including TCP/UDP port definitions and protocol specifications.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Service name and protocol

  • Port configurations

  • Comments and descriptions

Inputs: device_id (required), vdom.

list_shaping_policiesC

List traffic shaping policies.

Inputs: device_id (required), vdom.

list_snmp_communitiesB

List SNMP v1/v2c communities and their hosts (community strings redacted).

Inputs: device_id (required), vdom.

list_ssl_vpn_portalsC

List SSL-VPN portals (tunnel mode, split tunneling, IP pools, web mode).

Inputs: device_id (required), vdom.

list_ssl_vpn_sessionsB

List active SSL-VPN sessions (user, source host, login time, duration).

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per session

Inputs: device_id (required), vdom.

list_static_routesB

List all static routes configured on a FortiGate device.

This tool retrieves all manually configured static routes from the device's routing table, showing destination networks and gateways.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Route destinations and gateways

  • Interface assignments

  • Administrative distances

  • Route status (enabled/disabled)

Inputs: device_id (required), vdom.

list_switch_port_statsC

Show FortiSwitch port statistics (monitor/switch-controller/port-stats).

Inputs: device_id (required), vdom.

list_syslog_settingsC

Show the primary syslog server settings (log.syslogd/setting).

Inputs: device_id (required), vdom.

list_tacacs_serversB

List TACACS+ servers (secrets redacted).

Inputs: device_id (required), vdom.

list_traffic_shapersB

List shared traffic shapers (guaranteed/maximum bandwidth, priority).

Inputs: device_id (required), vdom.

list_url_filtersB

List static URL filter tables used by web filter profiles (entries with action).

Inputs: device_id (required), vdom.

list_user_groupsB

List user groups and their members (local users and remote-server matches).

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional)

Returns:

  • Group name, type, members, remote group matches

Inputs: device_id (required), vdom.

list_vip_groupsB

List virtual IP groups and their member VIPs.

Inputs: device_id (required), vdom.

list_virtual_ipsA

List all Virtual IPs configured on a FortiGate device.

This tool retrieves all Virtual IP objects defined on the device, including port forwarding configurations and NAT mappings.

Parameters:

  • device_id: Identifier of the FortiGate device

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Virtual IP name and configuration

  • External and mapped IP addresses

  • Port forwarding settings

  • Interface assignments

Inputs: device_id (required), vdom.

list_wifi_clientsB

Show connected Wi-Fi clients (SSID, MAC, IP, signal, AP).

Inputs: device_id (required), vdom.

list_wireless_ssidsA

List SSIDs (wireless-controller/vap): security mode, VLAN, broadcast, schedule (passphrases redacted).

Inputs: device_id (required), vdom.

list_zonesB

List interface zones and their member interfaces.

Inputs: device_id (required), vdom.

log_getA

Read raw log records from any log endpoint (GET /api/v2/log/{path}).

path is "{memory|disk}/{type}/{subtype}", e.g. "memory/event/system", "memory/event/vpn", "memory/utm/webfilter", "memory/traffic/local", "disk/traffic/forward". Prefer query_traffic_log / query_event_log / query_utm_log for formatted output.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: log path

  • rows: Maximum records (default 50, max 500)

  • filter_expr: Optional FortiOS filter, e.g. "srcip==10.0.0.5" ("&" joins several)

  • vdom: Virtual Domain name (optional)

Returns:

  • The raw JSON log records

Inputs: path (required), device_id (required), rows, vdom, +1 more.

lookup_policyA

Ask the FortiGate which firewall policy a hypothetical flow would match (monitor/firewall/policy-lookup), without sending any traffic.

Use it to answer "would host X reach server Y on port Z, and through which rule?".

Parameters:

  • device_id: Identifier of the FortiGate device

  • source_ip: Source IPv4 address

  • destination_ip: Destination IPv4 address

  • destination_port: Destination port

  • protocol: tcp (default), udp, icmp, sctp or a protocol number

  • source_interface: Optional ingress interface name (improves accuracy)

  • source_port: Optional source port

  • vdom: Virtual Domain name (optional)

Returns:

  • Matching policy id/name/action, or "no matching policy" (implicit deny)

Inputs: device_id (required), source_ip (required), destination_ip (required), destination_port (required), +4 more.

lookup_routeB

Ask the routing table which route, interface and gateway reach a destination (monitor/router/lookup).

Parameters:

  • device_id: Identifier of the FortiGate device

  • destination: Destination IPv4 address

  • vdom: Virtual Domain name (optional)

Returns:

  • Matched route details (interface, gateway, type, distance, metric)

Inputs: device_id (required), destination (required), vdom.

monitor_getA

Read any live-status endpoint (GET /api/v2/monitor/{path}).

Examples: "system/status", "router/ipv4", "vpn/ipsec", "license/status", "system/interface", "firewall/policy/select", "switch-controller/managed-switch", "wifi/client". Optional query parameters are passed through as params.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: monitor path without the /api/v2/monitor/ prefix

  • params: Optional query parameters as JSON object

  • vdom: Virtual Domain name (optional)

Returns:

  • The raw JSON response (secret fields redacted, large output truncated)

Inputs: path (required), device_id (required), vdom, params.

move_firewall_policyA

Move a firewall policy before or after another policy in the evaluation order.

FortiGate evaluates policies top-down and applies the first match, so a host-specific policy must sit above the broader policy it is meant to override. Newly created policies are appended at the bottom; use this tool to position them.

Parameters:

  • device_id: Identifier of the FortiGate device

  • policy_id: ID of the policy to move

  • position: "before" or "after"

  • reference_id: ID of the policy to position relative to

  • vdom: Virtual Domain name (optional)

Returns:

  • Move status

Inputs: position (required), device_id (required), policy_id (required), reference_id (required), +1 more.

ping_from_deviceA

Ping a host from the FortiGate itself (monitor/network/diag-icmp-ping), useful to check reachability from the firewall's own perspective (e.g. through a VPN tunnel).

Parameters:

  • device_id: Identifier of the FortiGate device

  • target: IPv4 address or hostname to ping

  • source_interface: Optional source interface

  • vdom: Virtual Domain name (optional)

Returns:

  • Packets sent/received and round-trip statistics as reported by the device

Inputs: target (required), device_id (required), vdom, source_interface.

query_event_logA

Query event logs by category: system (admin logins, config changes), vpn (tunnel up/down, dial-up logins), user (authentication), router, wireless, endpoint, ha, sdwan and more.

Parameters:

  • device_id: Identifier of the FortiGate device

  • category: system (default), vpn, user, router, wireless, endpoint, ha, security-rating, fortiextender, connector, sdwan, cifs, compliance-check

  • rows: Maximum records (default 50, max 500)

  • raw_filter: Optional FortiOS filter, e.g. "user==admin" or "logdesc=@login"

  • source: "memory" (default) or "disk"

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per record: time, level, description, user, message

Inputs: device_id (required), rows, vdom, source, +2 more.

query_traffic_logA

Query forward traffic logs with optional filters (most recent first).

Use it to answer "why is this host blocked / which policy handled this flow". Memory logs are the default (models without a log disk); pass source="disk" on models that log to disk.

Parameters:

  • device_id: Identifier of the FortiGate device

  • source_ip, destination_ip, destination_port, policy_id, action: Optional filters (action examples: deny, accept, close, timeout)

  • rows: Maximum records (default 50, max 500)

  • source: "memory" (default) or "disk"

  • raw_filter: Optional FortiOS filter expression, e.g. "srcip==192.0.2.25"

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per log record: time, action, src -> dst, service, policy, bytes

Inputs: device_id (required), rows, vdom, action, +6 more.

query_utm_logA

Query UTM (security) logs: webfilter, app-ctrl, ips, virus, dns, emailfilter, dlp, ssl, anomaly, waf, file-filter, ssh, voip, icap, virtual-patch.

Use it to see which site or application was blocked for a host and by which profile.

Parameters:

  • device_id: Identifier of the FortiGate device

  • log_type: webfilter (default) or one of the types above

  • rows: Maximum records (default 50, max 500)

  • source_ip: Optional source IPv4 filter

  • raw_filter: Optional FortiOS filter, e.g. "action==blocked"

  • source: "memory" (default) or "disk"

  • vdom: Virtual Domain name (optional)

Returns:

  • One line per record: time, action, src -> dst, hostname/application/attack, policy

Inputs: device_id (required), rows, vdom, source, +3 more.

remove_address_group_membersA

Remove address objects from an address group.

FortiOS requires a group to keep at least one member; removing the last member is refused -- delete the group instead.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Address group name

  • members: Address object names to remove

  • vdom: Virtual Domain name (optional)

Returns:

  • Which members were removed and the new member count

Inputs: name (required), members (required), device_id (required), vdom.

remove_deviceA

Remove a FortiGate device from the MCP server.

This tool unregisters a FortiGate device from the server, removing all associated configuration and terminating active connections.

Parameters:

  • device_id: Identifier of the device to remove

Returns:

  • Removal status confirmation

Inputs: device_id (required).

test_device_connectionA

Test network connectivity to a specific FortiGate device.

This tool performs a connection test to verify that the MCP server can successfully communicate with the specified FortiGate device.

Parameters:

  • device_id: Identifier of the FortiGate device to test

Returns:

  • Connection status (success/failure)

  • Response time information

  • Error details if connection fails

Inputs: device_id (required).

update_address_objectA

Update an existing address object (comment, subnet, range, FQDN, ...).

Only the fields present in address_data change; FortiOS merges them into the object. Example address_data: {"subnet": "192.0.2.40 255.255.255.255", "comment": "HR workstation"}

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Address object name

  • address_data: Fields to change as JSON object

  • vdom: Virtual Domain name (optional)

Returns:

  • Update status

Inputs: name (required), device_id (required), address_data (required), vdom.

update_cmdb_objectA

Change fields of an existing configuration object (PUT /api/v2/cmdb/{path}/{key}).

Only the fields in data change. Example: path "system/interface", key "vlan60-guest", data {"description": "Guest Wi-Fi"}.

Parameters:

  • device_id: Identifier of the FortiGate device

  • path: cmdb table path

  • key: Object key

  • data: Fields to change as JSON

  • vdom: Virtual Domain name (optional)

Returns:

  • Update status

Inputs: key (required), data (required), path (required), device_id (required), +1 more.

update_firewall_policyC

Update an existing firewall policy on a FortiGate device.

This tool modifies the configuration of an existing firewall policy, allowing changes to rules, addresses, services, and other settings.

Parameters:

  • device_id: Identifier of the FortiGate device

  • policy_id: ID of the policy to update

  • policy_data: Updated policy configuration as JSON object

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Update status

  • Configuration changes applied

Inputs: device_id (required), policy_id (required), policy_data (required), vdom.

update_service_objectB

Update an existing custom service object (ports, protocol, comment).

Example service_data: {"tcp-portrange": "3389", "comment": "RDP"}

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Service object name

  • service_data: Fields to change as JSON object

  • vdom: Virtual Domain name (optional)

Returns:

  • Update status

Inputs: name (required), device_id (required), service_data (required), vdom.

update_static_routeB

Update an existing static route on a FortiGate device.

This tool modifies the configuration of an existing static route, allowing changes to destination, gateway, or other settings.

Parameters:

  • device_id: Identifier of the FortiGate device

  • route_id: ID of the route to update

  • route_data: Updated configuration as JSON

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Update status

  • Configuration changes applied

Inputs: route_id (required), device_id (required), route_data (required), vdom.

update_virtual_ipB

Update an existing Virtual IP on a FortiGate device.

This tool modifies the configuration of an existing Virtual IP object, allowing changes to IP addresses, ports, or other settings.

Parameters:

  • device_id: Identifier of the FortiGate device

  • name: Name of the Virtual IP to update

  • vip_data: Updated configuration as JSON

  • vdom: Virtual Domain name (optional, uses device default)

Returns:

  • Update status

  • Configuration changes applied

Inputs: name (required), vip_data (required), device_id (required), vdom.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 137 tools

    Disambiguation3/5

    Most tools target distinct FortiGate resources or actions, but generic cmdb_list/cmdb_get/create_cmdb_object/monitor_get/log_get overlap heavily with many dedicated list/get/query tools. Descriptions do clarify when to use typed versus generic tools, but the sheer breadth of 137 tools makes misselection likely.

    Naming Consistency4/5

    Predominantly consistent verb_noun snake_case naming (list_, get_, create_, update_, delete_, query_, execute_), which is predictable. A few deviations such as cmdb_list, cmdb_get, monitor_get, and log_get are minor but noticeable.

    Tool Count1/5

    137 tools is far beyond a well-scoped set; even for a broad FortiGate management domain, this exceeds the 50+ extreme mismatch threshold. Many list/get tools could be consolidated or handled by the generic cmdb/monitor/log tools.

    Completeness5/5

    The surface covers core configuration CRUD for policies, addresses, services, VIPs, routes, and DHCP, plus extensive monitoring, logs, VPN, routing, wireless, HA, certificates, users, and generic cmdb/monitor/log escape hatches. There are no obvious dead ends for the stated domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for the FortiMonitor v2 monitoring API. 241 tools across 33 modules covering server management, outage monitoring, maintenance windows, metrics, notifications, cloud monitoring, SNMP, dashboards, reporting, and more. Unofficial community project, not affiliated with Fortinet. Python, MIT license, Docker and local deployment supported.
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that enables natural language management of FortiGate firewalls via the FortiOS REST API, offering 393 tools for system, policy, routing, VPN, and security configuration.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Manage a fleet of OPNsense firewalls from an AI agent, inside guardrails it can't drive around. MCP server for central management of OPNsense firewall fleets. 129 tools across devices, config sync, tasks, schedules, templates, backups and remote consoles - destructive actions confirmation-gated, MCP-issued tokens lifetime-bounded, backup and storage secrets excluded from the toolset entirely.
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for managing and monitoring FortiGate firewalls via the FortiOS REST API, enabling natural language queries for status, policies, VPNs, and sessions.
      9
      MIT