关于 Security Copilot and Sentinel MCP Server
Security Copilot and Sentinel MCP Server 是基于 Python 与 FastMCP 的 MCP 服务,连接 Microsoft Sentinel 和 Microsoft Security Copilot。它面向开发 Security Copilot 技能与插件的安全工程师,支持测试和部署 KQL 技能。
主要功能
- 01执行 Sentinel 工作区的 KQL 查询
- 02列出 Security Copilot 技能集
- 03上传或更新技能集与插件
- 04在 Security Copilot 中运行提示词或技能
适用场景
- 01开发、测试和部署 Security Copilot KQL 技能
- 02通过 MCP 客户端在 Sentinel 中执行查询
- 03从开发环境向 Security Copilot 上传插件
MCP 相关
该项目作为 MCP 服务,通过 SSE 传输向 MCP 客户端提供 run_sentinel_query、get_skillsets、upload_plugin 和 run_prompt 四个工具。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Security Copilot and Sentinel MCP 服务
这是一个基于 Python 的 MCP 服务,使用 FastMCP 库,通过 Azure Identity 身份验证集成 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 管理:
- 列出现有的技能集/插件
- 上传新的或更新现有的技能集/插件
- 在 Security Copilot 中运行提示词或技能
- 身份验证支持:支持多种身份验证方式,包括交互式浏览器、客户端密钥和托管身份
路线图
接下来的功能包括:
- 提示词集测试和更新
- 在 Defender XDR 中运行高级搜寻查询
前提条件
- Python 3.8+
- Microsoft Sentinel 工作区
- Microsoft Security Copilot 访问权限
- Sentinel 和 Security Copilot 所需的 Azure 权限
安装
-
克隆代码库:
git clone https://github.com/jguimera/SecurityCopilotMCPServer.git cd SecurityCopilotMCPServer -
安装依赖项:
pip install -r requirements.txt -
创建
.env文件,并添加以下配置:#Add App Reg to use ClientID and Secret authentication #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 #Authentication Options: interactive, client_secret AUTHENTICATION_TYPE=interactive
使用方法
启动服务
运行 MCP 服务:
python server.py
启动服务前运行测试:
python server.py --run-tests
可用工具
MCP 服务提供以下工具:
- run_sentinel_query:在 Sentinel 中执行 KQL 查询
- get_skillsets:列出 Security Copilot 中的技能集
- upload_plugin:上传或更新技能集/插件
- run_prompt:在 Security Copilot 中运行提示词或技能
Cursor 的 MCP 客户端配置
你可以通过自己选择的客户端使用此 MCP 服务。此代码库中提供了 Cursor 的说明和配置文件。
将 .cursor 文件夹添加到客户端项目中,以启用 MCP 工具。
此文件夹包含两个文件:
- Cursor 项目规则(securitycopilotdev.mdc):此文件包含一些自定义 Cursor 规则,用于帮助 Agent 定义流程并理解用户提示词。
- MCP 客户端配置(mcp.json):用于将 Cursor 连接到 MCP 服务的文件。
你可以使用 /tool_name 参数直接调用工具,例如 parameter1="Value of the tool parameter"
例如:/run_prompt content="List the most recent risky users"
更多信息:https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers
参与贡献
欢迎贡献!请随时提交 Pull Request。
- Fork 此代码库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 提交更改(
git commit -m 'Add some amazing feature') - 推送到分支(
git push origin feature/amazing-feature) - 发起 Pull Request
许可证
此项目采用 MIT 许可证,详情请参阅 LICENSE 文件。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。