How rstierli/fortianalyzer-mcp works
FortiAnalyzer MCP Server exposes FortiAnalyzer security and operations capabilities to AI assistants through MCP tools. The main workflow is an MCP client request entering the server, reaching a domain tool, and using the API client to query FortiAnalyzer; query helpers shape and constrain log results. Separate branches provide reports, device and security operations, higher-level SOC skills, and optional reversible masking. Edges reflect README statements and the supplied source index or excerpts; some tool registrations and unsampled implementations are documented but not shown in source excerpts.
Main entry points: server.py MCP server · client.py API client · handlers.py SOC skills · log_tools.py Log analysis
Components 19
MCP interface
- MCP server
src/fortianalyzer_mcp/server.py
FortiAnalyzer operations
- API client
src/fortianalyzer_mcp/api/client.py - Log analysis
src/fortianalyzer_mcp/tools/log_tools.py - Traffic analysis
src/fortianalyzer_mcp/tools/traffic_tools.py - FortiView analytics
src/fortianalyzer_mcp/tools/fortiview_tools.py - Alerts and events
src/fortianalyzer_mcp/tools/event_tools.py - Incident management
src/fortianalyzer_mcp/tools/incident_tools.py - IOC analysis
src/fortianalyzer_mcp/tools/ioc_tools.py - PCAP downloads
src/fortianalyzer_mcp/tools/pcap_tools.py - Report operations
src/fortianalyzer_mcp/tools/report_tools.py - Device and system
src/fortianalyzer_mcp/tools
Query processing
- Query helpers
src/fortianalyzer_mcp/query
SOC capabilities
- SOC skills
src/fortianalyzer_mcp/skills/handlers.py - Skill dispatcher
src/fortianalyzer_mcp/skills/dispatcher.py - Output masking
src/fortianalyzer_mcp/masking/wrapper.py
Shared runtime
- Configuration and validation
src/fortianalyzer_mcp/utils/config.py - Response helpers
src/fortianalyzer_mcp/utils/responses.py
Other components
- AI assistant
- FortiAnalyzer
Connections 30
- AI assistant → MCP server: calls tools
README.md - MCP server → Log analysis: registers tools
src/fortianalyzer_mcp/server.py - MCP server → Alerts and events: registers tools
src/fortianalyzer_mcp/server.py - MCP server → FortiView analytics: registers tools
src/fortianalyzer_mcp/server.py - MCP server → Incident management: registers tools
src/fortianalyzer_mcp/server.py - MCP server → IOC analysis: registers tools
src/fortianalyzer_mcp/server.py - MCP server → PCAP downloads: registers tools
src/fortianalyzer_mcp/server.py - MCP server → Report operations: registers tools
src/fortianalyzer_mcp/server.py - MCP server → Device and system: registers tools
src/fortianalyzer_mcp/server.py - Log analysis → API client: queries API
src/fortianalyzer_mcp/tools/log_tools.py - Traffic analysis → API client: queries API
- FortiView analytics → API client: queries API
src/fortianalyzer_mcp/tools/fortiview_tools.py - Alerts and events → API client: queries API
src/fortianalyzer_mcp/tools/event_tools.py - Incident management → API client: queries API
src/fortianalyzer_mcp/tools/incident_tools.py - IOC analysis → API client: queries API
src/fortianalyzer_mcp/tools/ioc_tools.py - PCAP downloads → API client: queries API
src/fortianalyzer_mcp/tools/pcap_tools.py - Report operations → API client: queries API
src/fortianalyzer_mcp/tools/report_tools.py - Device and system → API client: queries API
src/fortianalyzer_mcp/tools/log_tools.py - API client → FortiAnalyzer: sends JSON-RPC
README.md - Log analysis → Query helpers: uses filters and shaping
src/fortianalyzer_mcp/tools/log_tools.py - FortiView analytics → Query helpers: uses grouping and shaping
src/fortianalyzer_mcp/tools/fortiview_tools.py - MCP server → Skill dispatcher: exposes skill tool
src/fortianalyzer_mcp/skills/dispatcher.py - Skill dispatcher → SOC skills: dispatches skills
src/fortianalyzer_mcp/skills/dispatcher.py - SOC skills → Log analysis: orchestrates tools
src/fortianalyzer_mcp/skills/handlers.py - SOC skills → Alerts and events: orchestrates tools
src/fortianalyzer_mcp/skills/handlers.py - SOC skills → Incident management: orchestrates tools
src/fortianalyzer_mcp/skills/handlers.py - SOC skills → FortiView analytics: orchestrates tools
src/fortianalyzer_mcp/skills/handlers.py - MCP server → Output masking: wraps tool outputs
src/fortianalyzer_mcp/server.py - MCP server → Configuration and validation: loads settings
src/fortianalyzer_mcp/server.py - Log analysis → Response helpers: builds responses
src/fortianalyzer_mcp/tools/log_tools.py