安全调查工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
安全调查工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
安全调查工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/SCStelz/security-investigator
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"------": {
"command": "npx",
"args": ["-y", "security-investigator"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 安全调查工具 执行以下任务... Claude: [自动调用 安全调查工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"______": {
"command": "npx",
"args": ["-y", "security-investigator"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Comprehensive, automated security investigations powered by Microsoft Sentinel, Defender XDR, Graph API, and threat intelligence — with 25 specialized Agent Skills
📺 Video Walkthrough: See this project in action — Watch on YouTube (starts at the Security Investigator demo). Covers the end-to-end workflow: natural language investigations, MCP server integration, KQL query execution, threat intelligence enrichment, and automated report generation.
An investigation automation framework that combines GitHub Copilot, VS Code Agent Skills, and Model Context Protocol (MCP) servers to enable natural language security investigations. Ask questions like "Investigate this user for the last 7 days" or "Is this IP malicious?" and get comprehensive analysis with KQL queries, threat intelligence correlation, and professional reports.
┌────────────────────────────────────────────────────────────────────┐
│ GitHub Copilot (VS Code) │
├────────────────────────────────────────────────────────────────────┤
│ .github/copilot-instructions.md │
│ (Skill detection, universal patterns, routing) │
├────────────────────────────────────────────────────────────────────┤
│ .github/skills/*.md │
│ (25 specialized workflows with KQL, risk assessment) │
├────────────────────────────────────────────────────────────────────┤
│ MCP Servers (Platform) │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────────────────┐ │
│ │ Sentinel │ │ Graph API │ │ Sentinel Triage (XDR) │ │
│ │ Data Lake │ │ (Identity) │ │ (Advanced Hunting) │ │
│ └─────────────┘ └──────────────┘ └───────────────────────────┘ │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────────────────┐ │
│ │ KQL Search │ │ Microsoft │ │ Azure MCP Server │ │
│ │ (Schema) │ │ Learn (Docs) │ │ (ARM + Monitor) │ │
│ └─────────────┘ └──────────────┘ └───────────────────────────┘ │
│ ┌─────────────┐ │
│ │ Sentinel │ │
│ │ Graph (Rel) │ │
│ └─────────────┘ │
├────────────────────────────────────────────────────────────────────┤
│ MCP Apps (Local Custom Servers) │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────────────────┐ │
│ │ Geomap │ │ Heatmap │ │ Incident Comment │ │
│ │ (Attack Map)│ │ (Patterns) │ │ (Sentinel Integration) │ │
│ └─────────────┘ └──────────────┘ └───────────────────────────┘ │
├────────────────────────────────────────────────────────────────────┤
│ Python Utilities │
│ generate_report_from_json.py │ enrich_ips.py │ report_generator│
└────────────────────────────────────────────────────────────────────┘
Key Components: - 25 Agent Skills — Modular investigation workflows for incidents, users, devices, IoCs, authentication, scope drift (SPN/User/Device), MCP monitoring, exposure management, AI agent posture, app registration posture, identity posture, data security analysis, email threat posture, MITRE ATT&CK coverage, ingestion analysis, detection authoring, threat pulse scanning, SVG dashboards, and more - 7 MCP Server Integrations — Sentinel Data Lake, Graph API, Defender XDR Triage, KQL Search, Microsoft Learn, Azure MCP Server, Sentinel Graph (private preview) - 3 Local MCP Apps — Interactive heatmaps, geographic attack maps, incident commenting - Python Utilities — HTML report generation with IP enrichment (geolocation, VPN detection, abuse scores, Shodan port/service/CVE intelligence)
---
| Requirement | Details |
|---|---|
| **VS Code** | Version 1.99+ recommended (Agent mode + MCP support). |
| **GitHub Copilot** | Active subscription — [Copilot Pro+](https://github.com/features/copilot), Business, or Enterprise. Agent mode must be enabled. |
| **Python 3.8+** | For IP enrichment utility and report generation. [Download](https://www.python.org/downloads/) |
| **Azure CLI** | Required for Azure MCP Server (underlying auth) and sentinel-ingestion-report skill (az monitor log-analytics query for all KQL queries, az rest for analytic rule inventory, az monitor log-analytics workspace table list for tier classification). [Install](https://aka.ms/installazurecli). Authenticate: az login --tenant <tenant_id>, then az account set --subscription <subscription_id>. Requires **Log Analytics Reader** (KQL queries + table list) and **Microsoft Sentinel Reader** (analytic rule inventory) on the workspace. |
**log-analytics CLI extension** | Required by the sentinel-ingestion-report skill for az monitor log-analytics query (all KQL queries in Phases 1-5). Install: az extension add --name log-analytics. Verify: az extension list --query "[?name=='log-analytics']". |
| **PowerShell 7.0+** | Required for sentinel-ingestion-report skill (parallel query execution via ForEach-Object -Parallel). [Install](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell). Verify: $PSVersionTable.PSVersion. |
| **Node.js 18+** | Required for KQL Search MCP (npx) and building local MCP Apps. [Download](https://nodejs.org/) or install via winget install OpenJS.NodeJS.LTS (Windows) / brew install node (macOS). |
| **Microsoft Sentinel** | Log Analytics workspace with data. You'll need the workspace GUID and tenant ID. |
| **Entra ID Permissions** | If you can query Sentinel in the Azure Portal, you likely have sufficient access. The **Graph MCP server** requires a [one-time tenant provisioning](https://learn.microsoft.com/en-us/graph/mcp-server/get-started?tabs=http%2Cvscode) by an admin. See [MCP Server Setup](#-mcp-server-setup) for detailed per-server requirements. |
| **Microsoft.Graph PowerShell** | Required for detection-authoring skill (CustomDetection.ReadWrite.All — create/update/delete custom detection rules via Graph API). Also used by sentinel-ingestion-report skill for rule inventory (CustomDetection.Read.All — read-only, degrades gracefully if not installed). Install-Module Microsoft.Graph.Authentication -Scope CurrentUser. |
| **GitHub PAT** | public_repo scope — [Create one here](https://github.com/settings/tokens/new). Used by KQL Search MCP. |
Verify prerequisites:
python --version # Requires 3.8+
node --version # Requires 18+ (needed for KQL Search MCP)
az --version # Azure CLI (needed for Azure MCP Server, ingestion report skill)
pwsh --version # Requires 7.0+ (needed for sentinel-ingestion-report skill)
If Node.js is missing: Download or run winget install OpenJS.NodeJS.LTS (Windows) / brew install node (macOS). If Azure CLI is missing: Install, then az login --tenant <tenant_id> and az account set --subscription <subscription_id>. If the log-analytics extension is missing: az extension add --name log-analytics (required for sentinel-ingestion-report skill).
Set up Python environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
pip install -r requirements.txt
Core packages: requests (HTTP client for enrichment APIs), python-dateutil (date parsing for KQL time ranges).
---
PowerShell (Windows):
cd mcp-apps/sentinel-geomap-server; npm install; npm run build; cd ../..
cd mcp-apps/sentinel-heatmap-server; npm install; npm run build; cd ../..
cd mcp-apps/sentinel-incident-comment; npm install; npm run build; cd ../..
Bash (macOS/Linux):
cd mcp-apps/sentinel-geomap-server && npm install && npm run build && cd ../..
cd mcp-apps/sentinel-heatmap-server && npm install && npm run build && cd ../..
cd mcp-apps/sentinel-incident-comment && npm install && npm run build && cd ../..
The sentinel-incident-comment MCP App requires an Azure Logic App backend. See mcp-apps/sentinel-incident-comment/README.md for setup. Based on stefanpems/mcp-add-comment-to-sentinel-incident.
---
The system uses several Model Context Protocol (MCP) servers. All are pre-configured in .vscode/mcp.json.template — copy it to .vscode/mcp.json to get started (see Step 3 above). The sections below document permissions, tools, and installation guides for each server.
Install-Module Microsoft.Entra.Beta -Force -AllowClobber
Open Copilot Chat (Ctrl+Shift+I) in Agent mode and try these prompts:
| Test | Prompt to type in Copilot Chat |
|---|---|
| Sentinel Data Lake | List my Sentinel workspaces |
| Microsoft Graph | Look up my user profile in Graph |
| Sentinel Triage | List recent security incidents |
| KQL Search | What columns does the SigninLogs table have? |
| Microsoft Learn | Search Microsoft docs for KQL query language |
| All skills | What investigation skills do you have access to? |
If any server fails, check the MCP Servers panel in VS Code (click the {} icon in the bottom status bar) to verify each server shows a green connected status.
---
```powershell
python -m venv .venv .venv\Scripts\Activate.ps1 # Windows
pip install --require-hashes -r requirements.lock # Hash-verified (recommended)
copy config.json.template config.json
copy .env.template .env
copy .vscode\mcp.json.template .vscode\mcp.json
Copy config.json.template to config.json and fill in your workspace details:
{
"sentinel_workspace_id": "YOUR_WORKSPACE_ID_HERE",
"tenant_id": "YOUR_TENANT_ID_HERE",
"subscription_id": "YOUR_SUBSCRIPTION_ID_HERE",
"azure_mcp": {
"resource_group": "YOUR_LOG_ANALYTICS_RESOURCE_GROUP",
"workspace_name": "YOUR_LOG_ANALYTICS_WORKSPACE_NAME",
"tenant": "YOUR_TENANT_ID_HERE",
"subscription": "YOUR_SUBSCRIPTION_ID_HERE"
},
"output_dir": "reports"
}
| Setting | Required | Description |
|---|---|---|
sentinel_workspace_id | Yes | Microsoft Sentinel (Log Analytics) workspace GUID |
tenant_id | Yes | Entra ID (Azure AD) tenant ID for your Sentinel workspace |
subscription_id | Yes | Azure subscription ID containing the Sentinel workspace |
azure_mcp.* | Yes | Azure MCP Server parameters — resource group, workspace name, tenant, subscription. Required to avoid cross-tenant auth errors. |
output_dir | No | Directory for HTML reports (default: reports) |
.env file)API tokens for IP enrichment are stored in a .env file (gitignored) rather than config.json for security. Copy the template and add your keys:
```powershell copy .env.template .env
dotenv IPINFO_TOKEN=your_token_here ABUSEIPDB_TOKEN=your_token_here VPNAPI_TOKEN=your_token_here SHODAN_TOKEN=your_token_here ```
These are auto-loaded by enrich_ips.py via python-dotenv — no manual sourcing needed.
| Token | Required | Description |
|---|---|---|
IPINFO_TOKEN | Recommended | [ipinfo.io](https://ipinfo.io/) API token — geolocation, ASN, org. Free: 1K/day; token: 50K/month; paid plans include VPN detection |
ABUSEIPDB_TOKEN | Recommended | [AbuseIPDB](https://www.abuseipdb.com/) API token — IP reputation scoring (0-100 confidence). Free: 1K/day |
VPNAPI_TOKEN | Optional | [vpnapi.io](https://vpnapi.io/) API token — VPN/proxy/Tor detection. Not needed if ipinfo.io is on a paid plan |
SHODAN_TOKEN | Optional | [Shodan](https://account.shodan.io/) API key — open ports, services, CVEs, OS detection, tags. Free InternetDB fallback if no key or credits exhausted |
Copy the MCP server template (all platform servers + 3 optional MCP Apps are pre-configured):
copy .vscode/mcp.json.template .vscode/mcp.json
The template includes inline documentation for each server. On first use, VS Code will prompt for: - Entra ID login — browser-based auth for Sentinel Data Lake, Graph, Triage, and Sentinel Graph servers - GitHub PAT — for KQL Search MCP (schema intelligence and query discovery). Needs public_repo scope.
See MCP Server Setup below for per-server permissions and installation guides.
GitHub Copilot Chat in VS Code provides agents with a memory tool — a built-in filesystem (/memories/) for persisting notes across conversations. Copilot already uses this internally; you can extend it with tenant-specific context (known infrastructure IPs, validated personnel, false-positive patterns, lab automation signatures) so investigations don't repeatedly mis-classify documented activity as 🔴 critical.
Two memory tiers are relevant:
| Tier | Path | Auto-loaded? | Use for |
|---|---|---|---|
| **User memory** | /memories/*.md | ✅ Yes (~200 lines) | Short trigger rules ("when you see tenant X, read repo file Y") |
| **Repo memory** | /memories/repo/*.md | ❌ Filenames only | Rich tenant context (IPs, personnel, FP patterns) — pulled in by trigger rules |
The memory tool is an internal agent capability — VS Code does not publish a dedicated docs page for it. Closest related concepts are custom instructions and Agent Skills, which serve different purposes (always-applied conventions and specialized workflows, respectively).
This workspace ships with:
notes/memory/examples/ — copy and adapt for your tenant (one user-tier example, two repo-tier examples)scripts/sync-repo-memory.ps1 — backs up workspace-scoped (repo) memory from VS Code AppData into the workspace folder, surviving VS Code reinstall and workspace rename. Any cloud sync attached to your workspace (OneDrive, Dropbox, iCloud, etc.) then mirrors the backup across machines. Defaults to one-way export (ToBackup); restore mode (FromBackup) requires -Force because it writes into Copilot's trusted memory store.notes/memory/README.md — full walkthrough, sync usage, security model, and the trigger-rule pattern that makes Copilot actually consult repo memoryQuickstart: Open a template from notes/memory/examples/, then ask Copilot in chat to "create this as a memory file at /memories/..., replacing placeholders with my tenant values." Copilot uses its memory tool to write it directly — no AppData path navigation needed.
⚠️ Memory = trusted input. Anything innotes/memory/repo/becomes authoritative instructions for Copilot in every future chat (with MCP tool access to Sentinel, Graph, Azure). Review diffs from forks/PRs before restoring, never paste secrets, and if your workspace is cloud-synced, confirm the destination is acceptable for security context. Seenotes/memory/README.mdfor the full threat model.
---
| Provider | Free Tier | With Token |
|---|---|---|
| **ipinfo.io** | 1,000/day (geo, org, ASN) | 50,000/month; paid plans include VPN detection |
| **AbuseIPDB** | 1,000/day | 10,000/day ($20/month) |
| **vpnapi.io** | 1,000/month | 10,000/month ($9.99/month) |
| **Shodan** | InternetDB (unlimited, ports/vulns/tags) | $49 one-time membership: 100 queries/month (adds services, banners, SSL, OS) |
Token priority: If ipinfo_token is a paid plan, VPN detection is included and vpnapi_token is optional. Shodan uses the full API when a paid key is available; on 403/429 it automatically falls back to the free InternetDB.
IP enrichment happens during report generation (not data collection), so you can re-generate reports without re-querying Sentinel/Graph.
git clone https://github.com/SCStelz/security-investigator.git code security-investigator
Grant-EntraBetaMCPServerPermission -ApplicationName VisualStudioCode ```
This only needs to be done once per tenant. After provisioning, all users in the tenant can use the Graph MCP server by signing in with their own account.
Permissions (delegated, per-user): - User.Read.All — user profiles and authentication methods - UserAuthenticationMethod.Read.All — MFA methods - Device.Read.All — device compliance and enrollment - IdentityRiskEvent.Read.All — Identity Protection risk detections
| Issue | Solution |
|---|---|
| **"No anomalies found"** | Signinlogs_Anomalies_KQL_CL table doesn't exist or has no data. See user-investigation skill docs. Wait 24h for initial population. |
| **"IP enrichment failed"** | ipinfo.io rate limits (1K/day free). Add token to config.json for 50K/month. |
| **"MCP server not available"** | Check VS Code MCP server config. Verify authentication tokens are valid. |
| **"User ID not found" (Graph)** | Verify UPN is correct. Check Graph permissions: User.Read.All. |
| **"Sentinel query timeout"** | Reduce date range. Add \| take 10 to limit results. |
| **Report generation fails** | Validate JSON: python -m json.tool temp/investigation_*.json. Check required fields. |
| **SecurityIncident returns 0 results** | Use BOTH targetUPN and targetUserId (Object ID). Some incidents use Object ID. |
| **Risky sign-ins 404** | Must use /beta endpoint, not /v1.0. |
安全调查自动化系统是一种综合的、自动化的安全调查系统,基于 Microsoft Sentinel、Defender XDR、Graph API 和威胁智能等技术,拥有 25 个专业的技能。
本项目需要以下环境依赖和系统要求:Python 3.8+、Node.js 18+、Azure CLI 和 PowerShell 7.0+。
安装步骤包括:安装依赖项、配置环境、设置 MCP 服务器和部署可视化技能。
使用本项目的快速入门包括:安装依赖项、配置环境、设置 MCP 服务器和部署可视化技能。
配置说明包括:设置 MCP 服务器、配置环境变量和设置关键参数。
API/接口说明包括:IP 地理位置、ISP/ASN 识别、VPN 检测等威胁智能 API。
常见问题包括:解决“无异常发现”和“IP enrich failed”的问题。
高质量的自动化安全调查工具
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,安全调查工具 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | security-investigator |
| 原始描述 | 开源MCP工具:Automated security investigation tool using Microsoft MCP Servers, GitHub Copilo。⭐204 · Python |
| Topics | 安全调查自动化 |
| GitHub | https://github.com/SCStelz/security-investigator |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-04 · 更新时间:2026-06-06 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端