j

jguimera

@jguimera/SecurityCopilotMCPServer
0 Stars 328 次浏览 jguimera 更新于 2026-08-23
该服务暂未提供标准配置,请参考 README 手动接入

服务介绍

Security Copilot 和 Sentinel MCP 服务器

这是一个基于 Python 的 MCP 服务器,使用 FastMCP 库,并通过 Azure Identity 认证提供与 Microsoft Security Copilot 和 Microsoft Sentinel 的集成。
Diagram

概述

该项目实现了一个 MCP 服务器,能够:

  • 对 Microsoft Sentinel 运行 KQL 查询
  • 上传/更新 Microsoft Security Copilot 技能集/插件
  • 在 Microsoft Security Copilot 中运行提示和技能

该服务器作为开发环境与 Microsoft Security Copilot 之间的桥梁,支持技能和插件的测试、部署和执行。它使用 SSE 作为 MCP 服务器的传输层。
当前集成有许多用例。其中一个最有趣的用途是支持 Security Copilot KQL 技能的开发、测试和部署。

AgentFlow1
AgentFlow2

功能

  • Sentinel 集成:对您的 Sentinel 工作区执行 KQL 查询
  • Security Copilot 管理
    • 列出现有的技能集/插件
    • 上传新的或更新现有的技能集/插件
    • 在 Security Copilot 内运行提示或技能
  • 认证支持:包括交互式浏览器、客户端密钥和托管身份在内的多种认证方法

路线图

接下来的功能将包括:

  • Promptbook 测试和更新
  • 在 Defender XDR 中运行高级搜索查询

前提条件

  • Python 3.8+
  • Microsoft Sentinel 工作区
  • Microsoft Security Copilot 访问权限
  • 适用于 Sentinel 和 Security Copilot 的适当 Azure 权限

安装

  1. 克隆仓库:

    git clone https://github.com/jguimera/SecurityCopilotMCPServer.git
    cd SecurityCopilotMCPServer

  2. 安装依赖项:

    pip install -r requirements.txt

  3. 创建一个 .env 文件并配置如下:

    添加应用程序注册以使用 ClientID 和 Secret 认证

    #AZURE_TENANT_ID=your_tenant_id
    #AZURE_CLIENT_ID=your_client_id
    #AZURE_CLIENT_SECRET=your_client_secret
    SENTINEL_SUBSCRIPTION_ID=your_subscription_id
    SENTINEL_RESOURCE_GROUP=your_resource_group
    SENTINEL_WORKSPACE_NAME=your_workspace_name
    SENTINEL_WORKSPACE_ID=your_workspace_id

    认证选项:interactive, client_secret

    AUTHENTICATION_TYPE=interactive

使用

启动服务器

运行 MCP 服务器:

python server.py

在启动服务器前运行测试:

python server.py --run-tests

可用工具

MCP 服务器提供了以下工具:

  1. run_sentinel_query:在 Sentinel 中执行 KQL 查询
  2. get_skillsets:列出 Security Copilot 中的技能集
  3. upload_plugin:上传或更新技能集/插件
  4. run_prompt:在 Security Copilot 中运行提示或技能

Cursor 的 MCP 客户端配置

您可以从您选择的客户端使用此 MCP 服务器。在这个仓库中,您可以找到有关 Cursor 的说明和配置文件。

在您的客户端项目中添加 .cursor 文件夹以启用 MCP 工具。
该文件夹包含两个文件:

  1. Cursor 项目规则 (securitycopilotdev.mdc):此文件包含一些自定义 Cursor 规则,以帮助代理在过程定义和理解用户提示时提供帮助。
  2. MCP 客户端配置 (mcp.json):连接 Cursor 到 MCP 服务器的文件。

您可以直接使用 /tool_name 参数1="工具参数值" 来调用工具。
例如:/run_prompt content="列出最近的风险用户"

更多信息:https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers

贡献

欢迎贡献!请随时提交 Pull Request。

  1. 分叉仓库
  2. 创建您的功能分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m "Add some amazing feature")
  4. 推送到分支 (git push origin feature/amazing-feature)
  5. 打开 Pull Request

许可证此项目采用MIT许可证进行授权 - 详情请参见LICENSE文件。

相关 MCP 服务