Unofficial FortiMonitor MCP Server
Disclaimer: This is an unofficial community project. It is not affiliated with, endorsed by, or supported by Fortinet, Inc. or the FortiMonitor/Panopta team. "FortiMonitor" and "Fortinet" are trademarks of Fortinet, Inc. Use at your own risk.
Model Context Protocol (MCP) server for FortiMonitor/Panopta v2 API integration with Claude AI.
241 tools across 33 modules providing near-complete coverage of the FortiMonitor v2 API.
Features
- Server Management β CRUD, tagging, attributes, DNS flush, path monitoring, logs
- Outage Monitoring β Query, acknowledge, escalate, broadcast, delay, historical incidents
- Metrics & Resources β Agent resources, SNMP resources, thresholds, metric graphs
- Maintenance Windows β Create, extend, pause, resume, terminate schedules
- Server Groups β Group CRUD, membership, compound services, child groups, monitoring policies
- Templates β Create, apply, reapply monitoring templates to servers and groups
- Notifications β Schedules, contacts, contact groups, rotating on-call contacts
- Cloud Monitoring β Providers, credentials, discovery, regions, services
- DEM β Digital Experience Monitoring applications, instances, locations
- Compound Services β Aggregated service CRUD, thresholds, availability, response time
- Dashboards & Status Pages β CRUD for monitoring dashboards and public status pages
- Reporting β System health summary, outage statistics, availability reports, CSV exports
- SNMP β Credentials, discovery, resource CRUD, metrics
- OnSight β On-premises monitoring instances and groups
- Fabric Connections β Integration management
- Countermeasures β Automated remediation on network services and thresholds
- User Management β User CRUD, roles, addons
- Reference Data β Contact types, timezones, roles, account history, server attribute types
- Docker Support β Easy deployment via Docker containers
- Windows Support β Native deployment on Windows for Claude Desktop and Claude Code
Quick Start
Option A: Docker (Recommended)
# Run with Docker
docker run -d \
--name unofficial-fortimonitor-mcp \
-e FORTIMONITOR_API_KEY=your-api-key-here \
gjenkins20/unofficial-fortimonitor-mcp:latest
# Or use Docker Compose
cp .env.example .env
# Edit .env and set your API key
docker-compose up -d
See DOCKER_DEPLOYMENT.md for detailed Docker instructions.
Option B: Local Installation
1. Install dependencies
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
2. Configure environment
cp .env.example .env
# Edit .env with your FortiMonitor API key
3. Test connectivity
python test_connectivity.py
4. Run the server
python -m src.server
Option C: Windows (Claude Desktop / Claude Code)
See docs/WINDOWS_DEPLOYMENT.md for step-by-step Windows instructions.
Configuration
Edit .env:
FORTIMONITOR_BASE_URL=https://api2.panopta.com/v2
FORTIMONITOR_API_KEY=your_api_key_here
LOG_LEVEL=INFO
Available Tools (241)
The server exposes 241 MCP tools organized into the following categories. For full parameter details, see the End-User Guide.
| Category | Module(s) | Tools | Description | |----------|-----------|-------|-------------| | Servers | servers, server_enhanced | 21 | List, detail, CRUD, attributes, logs, DNS, path monitoring | | Outages | outages, outage_management, outage_enhanced | 22 | Query, health check, acknowledge, escalate, broadcast, delay, historical | | Metrics | metrics, agent_resources | 6 | Server metrics, agent resource types, resource details | | Maintenance | server_management, maintenance_enhanced | 12 | Status management, maintenance window CRUD, extend, pause, resume | | Bulk Operations | bulk_operations | 6 | Bulk acknowledge, bulk tags, advanced search, active outages | | Server Groups | server_groups, server_groups_enhanced | 12 | Group CRUD, membership, policies, compound services, child groups | | Templates | templates, templates_enhanced | 8 | Template CRUD, apply to server/group, reapply | | Notifications | notifications, notifications_enhanced | 14 | Schedules, contacts, groups, schedule CRUD, sub-resource queries | | Contacts | contacts_enhanced, rotating_contacts | 18 | Contact CRUD, contact info, contact groups, on-call rotations | | Cloud | cloud | 15 | Providers, credentials, discovery, regions, services | | DEM | dem | 10 | Applications, instances, locations, path monitoring | | Compound Services | compound_services | 11 | Service CRUD, thresholds, availability, network services, response time | | Dashboards | dashboards | 5 | Dashboard CRUD | | Status Pages | status_pages | 5 | Public status page CRUD | | Network Services | network_services | 5 | Server network service CRUD, response time | | Monitoring Nodes | monitoring_nodes | 2 | List and detail monitoring nodes | | Network Service Types | network_service_types | 2 | List and detail service types | | Reporting | reporting | 10 | Health summary, statistics, top alerting, exports, availability reports | | Users | users | 6 | User CRUD, addons | | Reference Data | reference_data | 13 | Account history, contact types, roles, timezones, attribute types | | SNMP | snmp | 12 | Credentials CRUD, discovery, resource CRUD, metrics | | OnSight | onsight | 12 | OnSight CRUD, groups, countermeasures, servers | | Fabric | fabric | 4 | Fabric connection CRUD | | Countermeasures | countermeasures | 20 | Network service & threshold countermeasures, outage metadata, thresholds |
Integration with Claude Desktop
Add to Claude Desktop config (claude_desktop_config.json):
Option A: Using Docker (Recommended)
First, ensure the container is running: ``bash docker-compose up -d ``
Then add to your Claude Desktop config: ``json { "mcpServers": { "fortimonitor": { "command": "docker", "args": ["exec", "-i", "unofficial-fortimonitor-mcp", "python", "-m", "src.server"] } } } ``
Option B: Using Local Python
{
"mcpServers": {
"fortimonitor": {
"command": "/path/to/unofficial-fortimonitor-mcp-server/.venv/bin/unofficial-fortimonitor-mcp",
"args": [],
"env": {
"FORTIMONITOR_API_KEY": "your_key",
"FORTIMONITOR_BASE_URL": "https://api2.panopta.com/v2",
"PYTHONPATH": "/path/to/unofficial-fortimonitor-mcp-server",
"ENABLE_SCHEMA_CACHE": "false"
}
}
}
}
Note: Claude Desktop does not reliably set
cwd, so use the full path to the installed entrypoint script and setPYTHONPATHexplicitly. SetENABLE_SCHEMA_CACHE=falseto avoid[Errno 30] Read-only file systemerrors when the server cannot write to the defaultcache/directory. Alternatively, setSCHEMA_CACHE_DIRto an absolute writable path to keep caching enabled.
API Documentation
The server automatically discovers and caches FortiMonitor API schemas for validation and documentation. Schemas are cached in cache/schemas/ by default.
Schema Endpoints
/schema/resources- Lists all available API resources/schema/resources/{resource_name}- Get schema for specific resource
Development
Run tests
pytest tests/ -v
Run tests with coverage
pytest tests/ --cov=src --cov-report=html
Format code
black src/ tests/
Type checking
mypy src/
Lint
flake8 src/ tests/
Project Structure
unofficial-fortimonitor-mcp-server/
βββ README.md
βββ FORTIMONITOR_API_DOCS.md # FortiMonitor API documentation
βββ Dockerfile # Container definition
βββ docker-compose.yml # Docker Compose config
βββ requirements.txt
βββ pyproject.toml
βββ .env.example
βββ .gitignore
βββ .dockerignore
βββ test_connectivity.py
βββ scripts/ # Build and deployment scripts
β βββ build.sh / build.bat
β βββ test-container.sh / test-container.bat
β βββ push.sh
β βββ release.sh
βββ .github/
β βββ workflows/
β βββ docker-build.yml # CI/CD pipeline
βββ src/
β βββ __init__.py
β βββ __main__.py
β βββ server.py # MCP server entrypoint, dispatch registry
β βββ config.py # Pydantic settings from env vars / .env
β βββ fortimonitor/
β β βββ client.py # Synchronous HTTP client (requests lib)
β β βββ schema.py # Schema discovery & caching
β β βββ models.py # Pydantic data models (~50 models)
β β βββ exceptions.py # Custom exceptions
β βββ tools/ # 33 tool module files (241 tools)
β βββ servers.py # Server list/detail
β βββ server_enhanced.py # Server CRUD, attributes, logs, path monitoring
β βββ outages.py # Outage queries, health check
β βββ outage_management.py # Acknowledge, notes, details
β βββ outage_enhanced.py # Broadcast, escalate, delay, historical
β βββ metrics.py # Server metrics
β βββ agent_resources.py # Agent resource types & details
β βββ server_management.py # Status management, maintenance
β βββ maintenance_enhanced.py # Maintenance CRUD, extend, pause
β βββ bulk_operations.py # Bulk ops, advanced search
β βββ server_groups.py # Server group CRUD
β βββ server_groups_enhanced.py # Group members, policies, children
β βββ templates.py # Template list/detail/apply
β βββ templates_enhanced.py # Template CRUD, reapply
β βββ notifications.py # Notification schedules/contacts/groups
β βββ notifications_enhanced.py # Schedule CRUD, sub-resources
β βββ contacts_enhanced.py # Contact CRUD, info, groups
β βββ rotating_contacts.py # On-call rotation management
β βββ network_services.py # Network service CRUD, response time
β βββ network_service_types.py # Service type list/detail
β βββ monitoring_nodes.py # Monitoring node list/detail
β βββ cloud.py # Cloud providers, credentials, discovery
β βββ dem.py # DEM applications, instances, locations
β βββ compound_services.py # Compound service CRUD, thresholds
β βββ dashboards.py # Dashboard CRUD
β βββ status_pages.py # Status page CRUD
β βββ reporting.py # Health, stats, exports, availability
β βββ users.py # User CRUD, addons
β βββ reference_data.py # Account history, types, roles, timezones
β βββ snmp.py # SNMP credentials, discovery, resources
β βββ onsight.py # OnSight CRUD, groups
β βββ fabric.py # Fabric connection CRUD
β βββ countermeasures.py # Countermeasures, thresholds, metadata
βββ tests/
β βββ conftest.py # Test fixtures
β βββ test_client.py # API client tests
β βββ test_tools.py # Original tool tests
β βββ test_tool_definitions.py # Tool definition validation
β βββ test_dict_tool_handlers.py # Dict-pattern handler tests
β βββ test_registry.py # Registry build tests
β βββ test_server.py # Server integration tests
βββ cache/
β βββ schemas/ # Cached API schemas
βββ docs/
βββ USER_GUIDE.md # End-user guide
βββ DEVELOPER_GUIDE.md # Developer/contributor guide
βββ WINDOWS_DEPLOYMENT.md # Windows setup for Claude Desktop/Code
Troubleshooting
Authentication Errors
- Verify API key in
.env - Check base URL is correct (
https://api2.panopta.com/v2) - Test API key with curl:
curl "https://api2.panopta.com/v2/server?api_key=YOUR_KEY&limit=1"
Schema Discovery Failures
- Check network connectivity
- Verify
cache/schemas/directory exists and is writable - Clear cache and retry:
rm -rf cache/schemas/*
MCP Server Not Appearing in Claude
- Check Claude Desktop config syntax
- Verify file paths are absolute
- Restart Claude Desktop completely
- Check server logs for startup errors
About the Developer
Built by Gregori Jenkins β originally from Chicago, a humble student of Computer Science, and a proud cat dad.
License
MIT License β see LICENSE for details.











