Security Copilot 和 Sentinel MCP 服务器
使用 FastMCP 库的基于 Python 的 MCP 服务器,可使用 Azure Identity Authentication 与 Microsoft Security Copilot 和 Microsoft Sentinel 集成。
概述
该项目实现了一个 MCP 服务器,可以实现以下功能:
- 针对 Microsoft Sentinel 运行 KQL 查询
- 上传/更新 Microsoft Security Copilot 技能组/插件
- 在 Microsoft Security Copilot 中运行提示和技能
该服务器充当开发环境与 Microsoft Security Copilot 之间的桥梁,允许测试、部署和执行技能和插件。它使用 SSE 作为 MCP 服务器的传输层。当前集成有很多用例。其中最有趣的用例之一是支持 Security Copilot KQL 技能的开发、测试和部署。
特征
- Sentinel 集成:针对您的 Sentinel 工作区执行 KQL 查询
- 安全副驾驶管理:
- 列出现有的技能组合/插件
- 上传新的或更新现有的技能组合/插件
- 在 Security Copilot 中运行提示或技能
- 身份验证支持:多种身份验证方法,包括交互式浏览器、客户端密钥和托管身份
路线图
接下来的功能将包括:
- Promptbook 测试和更新
- 在 Defender XDR 中运行高级搜索查询
先决条件
- Python 3.8+
- Microsoft Sentinel 工作区
- Microsoft Security Copilot 访问
- 为 Sentinel 和 Security Copilot 提供适当的 Azure 权限
安装
- 克隆存储库:Copy
- 安装依赖项:Copy
- 创建具有以下配置的
.env
文件:Copy
用法
启动服务器
运行 MCP 服务器:
在启动服务器之前运行测试:
可用工具
MCP 服务器提供以下工具:
- run_sentinel_query :在 Sentinel 中执行 KQL 查询
- get_skillsets :列出 Security Copilot 中的技能组合
- upload_plugin :上传或更新技能组/插件
- run_prompt :在 Security Copilot 中运行提示或技能
MCP 客户端游标配置
您可以从您选择的客户端使用此 MCP 服务器。在此 repo 中,您可以找到 Cursor 的说明和配置文件。
在客户端项目中添加 .cursor 文件夹以启用 MCP 工具。此文件夹包含两个文件:
- 光标项目规则(securitycopilotdev.mdc):此文件包含一些自定义光标规则,以帮助代理进行流程定义和理解用户提示。
- MCP 客户端配置(mcp.json):将 Cursor 连接到 MCP 服务器的文件。
您可以使用/tool_name parameter1="工具参数的值"直接调用该工具例如:/run_prompt content="列出最近的有风险的用户"
更多信息: https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
- 分叉存储库
- 创建你的功能分支(
git checkout -b feature/amazing-feature
) - 提交您的更改(
git commit -m 'Add some amazing feature'
) - 推送到分支(
git push origin feature/amazing-feature
) - 打开拉取请求
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
This server cannot be installed
基于 Python 的 MCP 服务器,可与 Microsoft Security Copilot 和 Microsoft Sentinel 集成,允许用户运行 KQL 查询、管理技能组/插件以及在 Security Copilot 中执行提示。