FortiCloud MCP server
Provides read-only access to Fortinet FortiCloud, including FortiGate Cloud devices, firmware, sub-accounts, config backup settings, and Fortinet Asset Management products, entitlements, contracts, and folders.
Click on "Deploy 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., "@FortiCloud MCP server show me which of my FortiGates are offline"
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.
FortiCloud MCP server
A read-only MCP server for Fortinet FortiCloud. Claude can ask which FortiGates are offline in FortiGate Cloud, what firmware they run, how their config backups are set, and, from Asset Management, which support and FortiGuard entitlements expire soon.
It uses the same framework as Cititec's other MCP servers: TypeScript, @modelcontextprotocol/sdk, a stdio transport, vitest tests, tsup and a Docker image.
The APIs
One FortiCloud IAM API user reaches two portals, each with its own OAuth token:
Portal | API | Token |
FortiGate Cloud (being renamed FortiManagement Cloud) |
|
|
Asset Management v3 |
|
|
Tokens:
POST https://customerapiauth.fortinet.com/api/v1/oauth/token/(the trailing slash matters) with{username: <API ID>, password, client_id, grant_type: "password"}. The token is cached for itsexpires_inless two minutes. A token that FortiCloud rejects early (HTTP 401) is replaced once.Failed sign-ins: FortiCloud answers bad credentials with HTTP 400
invalid_grant. Repeated failures are reported to lock the API user out of every portal for 15 to 30 minutes, so after a refusal this server does not try to sign in again for 10 minutes.Regions: FortiGate Cloud has Global (which is also Canada), US, Europe and Japan hosts (
api.,usapi.,euapi.,jpapi.fortigate.forticloud.com). The API only shows the region you call. The token and Asset Management hosts are global.Read-only: every Asset Management call this server can make is one of its read endpoints (a fixed list in
src/client.ts), and FortiGate Cloud is only called with GET. The other Asset Management v3 endpoints (register, decommission, transfer, folders/create...) are not reachable. Give the API user a read-only permission profile anyway.
What is not confirmed yet
Fortinet's full API reference (FNDN) needs a login. The endpoints and fields above come from Fortinet's public docs and KB articles and from open-source clients. These are handled defensively and need a live check:
the token lifetime (14,400 s, 3,660 s and 3,600 s are all reported); the server uses whatever
expires_insays;FortiGate Cloud
/devicespaging (limitandoffset): the server stops on a short page, on a page with nothing new, or at thetotalthe items carry;a "last seen" time on a device: the public sample has none, so
lastSeenis filled from any of several likely field names, andforticloud_get_deviceshows every other field the API returns (otherFields);a list of config backup revisions: only the automatic backup settings (
configbackups/setting) are documented;/subaccounts(account names), Asset Management's page size (25) andtotalPages, and the fieldsfolderPathandstatuson list items;the bodies of 429 answers. The documented quotas: Asset Management 100 calls a minute, 1,000 an hour and 10 errors an hour; FortiGate Cloud reportedly 100 calls a second and 15 errors a minute.
Every endpoint and client_id is a setting, so a change on Fortinet's side needs no new image.
Related MCP server: FortiAnalyzer MCP Server
Configuration
Variable | |
| The IAM API user's API ID (from its credentials file). |
| Its password. Never logged; removed from every error message, as are tokens. |
| Default |
| Default |
| Default |
| Default |
| Default |
| IANA time zone that dates are shown in, e.g. |
|
|
|
|
All URLs must be https.
Tools
Tool | What it does |
| Gets a token for each portal and makes one cheap read in each: FortiGates in FortiGate Cloud (online/offline) and Asset Management folders. Each portal is reported on its own. |
| FortiGate Cloud sub-accounts (an MSSP's clients) with device and offline counts. |
| FortiGates with model, serial, firmware, sub-account and connection to FortiGate Cloud ( |
| One FortiGate: FortiGate Cloud details and any other fields, its config backup settings, and its Asset Management record. |
| Devices per firmware version (oldest first) and per major version, optionally with the devices on each. |
| The automatic config backup settings for one device or a page of devices; stops after three errors. |
| Devices by name, serial or account; Asset Management products by serial. |
| Registered products by serial prefix ( |
| One product: every entitlement with days left, contracts, licence numbers, warranty, end of order and end of support. |
| Entitlements that end within N days (and, if asked, ended in the last N days), soonest first. Only the latest entitlement of each type per product counts, so a renewed service is not listed. |
| Contracts with SKU, status, terms and end date. |
| Asset Management folders (often one per client). |
Lists return total, count, offset and nextOffset (Asset Management lists: totalPages and nextPage), and each response is capped at 60,000 characters. The device list is read once a minute at most and shared by the tools in one session. When FortiGate Cloud does not return the whole device list (paging stops before its advertised total), every result built on it (status, accounts, devices, firmware, config backups, search) carries complete: false and a warning, so a partial inventory is never presented as the whole fleet.
Dates and days left
One rule for every tool:
daysLeftcounts whole 24-hour periods from now to the exact expiry moment, rounded down, and is worked out from FortiCloud's original timestamp. It does not depend on a time zone.0means it ends within the next 24 hours (later today included); a negative number means it has ended (-1within the last 24 hours).Dates shown (
end,start, thewindowofforticloud_list_expiring) are calendar dates. A FortiCloud time with an offset (Asset Management writes times like...-8:00) or an epoch number is shown as the date it falls on inFORTICLOUD_TIME_ZONE. A date with no zone (end-of-support dates, for example) is shown as written.Something with several end dates (a contract's terms) takes the latest moment, not the latest text. Contracts, their terms, entitlements and licences all use the same calculation, so they always agree.
Untrusted text
A FortiGate's host name and description are set on the device by whoever administers it, and asset descriptions and folder names are free text. Every result except forticloud_status is wrapped in a <forticloud-data> block followed by a reminder that it is data, not instructions. A closing tag inside the data is neutralized, so it cannot end the block early. This is a label, not a guarantee; what bounds the damage is that every tool is read-only.
Rate limits
A 429 (or a 503 with a wait) on a read is retried once when the wait is 10 s or less. Otherwise the tool returns an error that says Try again in N s. with structuredContent: { error_type: "rate_limited", retry_after_seconds: N } (60 s when FortiCloud gives no wait). Every request this server makes is a read: Asset Management's POSTs are queries. Writes would never be retried, but there are none. The Cititec MCP host also applies its own per-service budget.
Development
npm ci
npm run lint # tsc --noEmit
npm test # vitest
npm run build # tsup -> dist/index.jsDocker
docker build -t forticloud-mcp .
docker run --rm -i --env-file forticloud.env forticloud-mcpstdio only: the Cititec MCP host runs one container per connection with the service's env file. The Cititec release workflow tags a release with semantic-release on every merge to main and pushes ghcr.io/cititec-pty-ltd/forticloud-mcp:vX.Y.Z (and :latest).
Licence
Apache 2.0. See LICENSE and NOTICE.
Available Tools
12 toolsforticloud_config_backup_statusARead-onlyIdempotent
FortiGate Cloud's automatic config backup settings for one FortiGate (serial) or a page of FortiGates (optionally one account). Reads one setting per device, so pages are small; stops after three errors.
Inputs: limit, offset, serial, account.
forticloud_firmware_summaryARead-onlyIdempotent
FortiGate firmware across FortiGate Cloud: devices per firmware version (oldest first) with models and offline counts, and per major version (7.0, 7.2, 7.4...). Optionally for one account or model, and with the devices on each version.
Inputs: model, account, list_devices.
forticloud_get_assetARead-onlyIdempotent
One registered product from Asset Management by serial: model, folder, every entitlement (support, FortiGuard services) with start, end and days left, contracts and their terms, licence numbers, warranty, end of order and end of support dates.
Inputs: serial (required).
forticloud_get_deviceARead-onlyIdempotent
One FortiGate by serial: FortiGate Cloud details (connection, firmware, account, any other fields the API returns), its automatic config backup settings, and (include_asset) its Asset Management record with entitlements and expiry.
Inputs: serial (required), include_asset.
forticloud_list_accountsBRead-onlyIdempotent
FortiGate Cloud sub-accounts (for an MSSP account, usually one per client), with how many FortiGates each has and how many are offline.
Inputs: name, limit, offset.
forticloud_list_assetsARead-onlyIdempotent
Registered products in Asset Management whose serial starts with serial_prefix (FG = FortiGates, FS = FortiSwitches, FP = FortiAPs, F = everything), 25 per page: model, description, folder, registration, support end and the next entitlement to expire. Decommissioned products are left out unless asked.
Inputs: page, model, pages, folder, +2 more.
forticloud_list_contractsBRead-onlyIdempotent
Contracts in Asset Management (support and service contracts) with SKU, status, terms and end date, soonest end first.
Inputs: limit, offset, status, contract_number.
forticloud_list_devicesARead-onlyIdempotent
FortiGates in FortiGate Cloud with model, serial, firmware, sub-account (client) and whether the management tunnel to FortiGate Cloud is up (connection: online/offline), offline first. Filter by account, connection, model, firmware or name/serial. Each page has total and nextOffset.
Inputs: name, limit, model, offset, +3 more.
forticloud_list_expiringARead-onlyIdempotent
Support, FortiGuard and other entitlements that expire within days (default 60), soonest first, from Asset Management. Only the latest entitlement of each type per product counts, so a renewed service is not listed. include_expired_days also shows ones that ended in the last N days. Filter by serial_prefix (FG for FortiGates), entitlement type or folder.
Inputs: days, type, limit, folder, +4 more.
forticloud_list_foldersCRead-onlyIdempotent
Asset Management folders (often one per client or site), with their paths and IDs.
Inputs: name, limit, offset.
forticloud_searchARead-onlyIdempotent
Finds FortiGates by name, serial or account name in FortiGate Cloud and, when the text looks like a serial (or its start), registered products in Asset Management.
Inputs: query (required), include_assets.
forticloud_statusARead-onlyIdempotent
Checks the FortiCloud connection: gets a token for FortiGate Cloud and Asset Management, counts the FortiGates in FortiGate Cloud (online/offline) and the Asset Management folders. Each portal is reported separately, so one failing does not hide the other. Start here when other tools fail.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target a clear resource+action (list_devices vs list_assets vs list_contracts vs list_expiring are easy to tell apart). There is real overlap: forticloud_get_device with include_asset duplicates forticloud_get_asset, and it also returns the config backup settings that forticloud_config_backup_status exists for, while forticloud_search overlaps both list_devices and list_assets. The descriptions do a good job stating when to prefer one over the other, so misselection risk is low but nonzero.
All twelve tools share the forticloud_ prefix and mostly follow verb_noun (list_folders, get_asset, list_expiring, list_contracts). Three deviate to bare noun phrases: forticloud_status, forticloud_firmware_summary and forticloud_config_backup_status, which breaks the pattern slightly. Still highly readable and predictable overall.
Twelve tools is squarely in the well-scoped range for a monitoring/inventory server covering two portals plus an aggregation view. Each tool maps to a distinct query an operator would actually run (firmware rollup, expiring entitlements, contracts, backup settings), with no filler.
The read-only surface is strong: connectivity check, folders, accounts, device and asset detail, search, firmware rollup, config backup, expiring entitlements and contracts. Gaps are minor but real: no per-folder or per-account detail tool, no contract detail by ID, and no write/management operations (account or device actions), which may be intentional for a read-only inspection server. Agents can work around these via the list tools.
Maintenance
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Read-only access to your CloudFix AWS cost-saving recommendations, reports and EC2 pricing.
Provides read access to your GKE and Kubernetes resources.
Cloud cost, inventory and governance on AWS/Azure/GCP. Read-only by default, optional scoped writes
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides programmatic access to FortiGate devices for managing firewall policies, routing, virtual IPs, and device operations, enabling integration with MCP-compatible clients like Claude Desktop.MIT
- AlicenseAqualityDmaintenanceEnables interaction with FortiAnalyzer JSON-RPC APIs for system health, ADOM/device inventory, alerts, reports, LogView searches, and documented long-tail read endpoints.19MIT
- AlicenseAqualityDmaintenanceRead-only MCP server for the Action1 RMM REST API, enabling access to endpoints, missing updates, vulnerabilities, installed software, policies, automations, and reports.21Apache 2.0
- AlicenseAqualityBmaintenanceEnables language models to read FortiGate/FortiOS firewalls and answer operational questions about firewall policies, network configuration, and live client state. Provides question-shaped diagnostic tools for reference checks, configuration searches, device lookups, routing, DHCP, ARP, wireless clients, and multi-appliance targeting without allowing configuration changes.17Apache 2.0