这是一个基于 Python 的 MCP 服务器,借助 FastMCP 库实现与 Microsoft Security Copilot 和 Microsoft Sentinel 的集成,同时支持通过 Azure Identity 进行身份验证,为安全开发提供有力支持。
此项目实现的 MCP 服务器具备强大功能,可在 Microsoft Sentinel 上执行 KQL 查询、上传/更新 Microsoft Security Copilot 技能集/插件,还能执行 Microsoft Security Copilot 中的提示和技能。它就像一座桥梁,连接开发环境与 Microsoft Security Copilot,支持技能和插件的测试、部署与执行,采用 SSE 作为传输层。
git clone https://github.com/jguimera/SecurityCopilotMCPServer.git
cd SecurityCopilotMCPServer
pip install -r requirements.txt
.env 文件,配置如下:# 添加应用注册以使用客户端 ID 和密钥进行身份验证
# 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 服务器提供了丰富的工具:
你可以从所选客户端使用此 MCP 服务器。在本仓库中,能找到用于 Cursor 的说明和配置文件。在客户端项目中添加 .cursor 文件夹以启用 MCP 工具,该文件夹包含两个文件:
你可以使用 /tool_name 参数1="Value of the tool parameter" 直接调用工具,例如:
/run_prompt content="列出最近风险较高的用户"
更多详细信息请参考:https://docs.cursor.com/context/model-context-protocol#配置-MCP-服务器
接下来将实现的功能包括:
该项目受 LICENSE 许可保护。
欢迎大家贡献代码!请随意提交 Pull Request。