How jguimera/securitycopilotmcpserver works
Main Components
• Server (server.py): This is the core MCP server that listens for incoming requests and orchestrates operations.
• Sentinel Client (SentinelClient.py): Handles the execution of KQL queries against Microsoft Sentinel.
• Security Copilot Client (SecurityCopilotClient.py): Manages the uploading/updating of skillsets/plugins and running prompts.
• External Dependencies: Azure Identity for authentication, Microsoft Sentinel workspace, and Microsoft Security Copilot services.
• Client Configuration (.cursor folder): Contains configuration (mcp.json) and custom rules (securitycopilotdev.mdc) that let a Cursor client connect to and utilize the MCP server.
Relationships & Interactions
• A client (for example, a Cursor instance) connects to the MCP server (using configurations from .cursor).
• The server receives commands (such as /run_prompt, /upload_plugin, /run_sentinel_query) and then dispatches these requests internally.
• When a Sentinel query is needed, server.py uses SentinelClient.py to interact with the Microsoft Sentinel workspace.
• Operations related to Security Copilot (like uploading a plugin or running a skill) are handled by SecurityCopilotClient.py.
• Authentication flows are managed within the server using Azure Identity, with configuration provided via the .env file.
• The communication layer uses SSE as transport, which should be shown as a bidirectional data flow between the client and the server.
Architectural Patterns & Design Principles
• Modular Architecture: Each capability (Sentinel integration, Security Copilot management) is encapsulated in separate modules/clients, promoting separation of concerns.
• Configuration-Driven: The use of environment files (.env) and dedicated client configuration files (.cursor/mcp.json) indicates that much of the integration behavior is driven by external configuration.
• Integration/Bridging Pattern: The MCP server acts as a bridge between the development/testing environment (clients like Cursor) and external services (Sentinel and Security Copilot).
Relevant Technologies, Frameworks, and Libraries
• FastMCP library is central to server implementation.
• Python as the core language.
• Azure Identity for handling authentication.
• Server-Sent Events (SSE) for transport.
• Any libraries specified in the requirements.txt (likely including FastMCP and Azure SDKs).