Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
AiSOC IDE Extension
Run triage, replay investigation steps, and ask "why did the agent do this?" from inside your editor — without leaving your IDE.
This extension is the analyst-facing companion to @aisoc/mcp. It registers four commands that call the AiSOC MCP gateway over HTTP and renders the response in a side-panel webview. It targets any VSCode-compatible IDE (engines ^1.80.0), so it runs on every editor that supports the VSCode extension API.
Commands
| Command palette | What it does |
|---|---|
AiSOC: Run Triage on Case… |
Kicks off the multi-agent investigator on a case UUID. Returns the run_id you can feed back into the next two commands. |
AiSOC: Replay Investigation Step… |
Walks the agent decision ledger for a run — recon → forensic → responder → reporter steps, with optional since_seq cursor for tail-mode polling. |
AiSOC: Explain Why the Agent Did This |
Deep-dive on one step: prompt, response, tool I/O, surrounding context. The trust-vector view that closed-source agents don't expose. |
AiSOC: Find Detections for This Technique |
Search the detection-rule library. Pastes a MITRE technique id (T1059.003) or free text. If you have text selected in the editor, it pre-seeds the query. |
Plus two key-management helpers:
| Command palette | What it does |
|---|---|
AiSOC: Set API Key… |
Prompts for your AiSOC API key (aisoc_pat_…) with a masked input box and stores it in the IDE's secret storage. |
AiSOC: Clear Stored API Key |
Forgets the stored key. |
All output is logged to the AiSOC output channel for an audit trail you can grep.
Settings
| Setting | Default | What it controls |
|---|---|---|
aisoc.mcpEndpoint |
http://localhost:8765/mcp |
HTTP URL the extension posts JSON-RPC tools/call requests to. Point this at your AiSOC MCP gateway (see below). |
aisoc.requestTimeoutMs |
30000 |
Per-request timeout. Investigations stream back asynchronously via replayDecision; this is the timeout on the kick-off call. |
aisoc.apiKey |
(empty, do not use) | Decoy setting. Do not paste your API key here — it's stored as plain text. Use the AiSOC: Set API Key… command instead. |
Architecture (short)
┌──────────────┐ tools/call (HTTP) ┌──────────────────┐ stdio MCP ┌──────────────┐
│ IDE │ ────────────────────► │ MCP HTTP gateway │ ────────────► │ @aisoc/mcp │
│ (extension) │ ◄──────────────────── │ (your choice) │ ◄──────────── │ (stdio bin) │
└──────────────┘ └──────────────────┘ └──────────────┘
│
▼
AiSOC REST API
+ decision ledger
- The extension only knows about HTTP JSON-RPC. It sends
{ jsonrpc, id, method: "tools/call", params: { name, arguments } }and reads the standard MCPCallToolResultenvelope back. - The MCP HTTP gateway is your choice — it can be a thin wrapper that spawns
npx @aisoc/mcp serveand bridges stdio↔HTTP, the AiSOC API itself once an MCP-over-HTTP endpoint lands, or any reverse proxy you already run. - The API key never appears on the wire to the underlying AiSOC API directly; it's sent to the gateway as
Authorization: Bearer …and forwarded from there.
Install locally (developer)
cd services/mcp/cursor-extension
npm install
npm run compile # produces out/extension.js
Then load the extension in a development host:
- Open this folder in VSCode-compatible IDE.
- Press
F5(or "Run → Start Debugging"). A second IDE window opens with the extension loaded. - Open the command palette (
Ctrl/Cmd+Shift+P) and typeAiSOC:to see the four commands.
Or package and side-load a .vsix:
npm install -g @vscode/vsce
vsce package --no-dependencies # writes aisoc-extension-0.1.0.vsix
code --install-extension aisoc-extension-0.1.0.vsix
(--no-dependencies is correct here: the extension ships only its compiled output and has no runtime npm dependencies.)
First-run configuration
After installing, configure the extension from the command palette:
AiSOC: Set API Key…— paste youraisoc_pat_…token. It's stored in the OS keychain via the IDE's secret-storage API; nothing lands insettings.json.- Open settings → search "AiSOC" and set
aisoc.mcpEndpointif your gateway isn't onhttp://localhost:8765/mcp.
You're done. Run AiSOC: Find Detections for This Technique, type T1059.003, and you should see a list come back.
Tests
npm test # vitest run — covers URL construction, JSON-RPC shape, error mapping
The smoke tests stub fetch and assert each public method (runInvestigation, replayDecision, explainStep, queryDetections) constructs the right URL, headers, and payload. They are intentionally lightweight — full end-to-end coverage lives in services/mcp/tests/.
Publishing
This package is publish-ready but not published yet. The launch flow is:
- Bump
versioninpackage.json. - Update the
CHANGELOG.md(TODO when first published) with the user-visible delta. - From this directory:
npm install npm run compile npm test npx @vscode/vsce package --no-dependencies - Inspect the
.vsix(unzip -l aisoc-extension-*.vsix) and confirm it does not containsrc/,tests/,node_modules/, or any.env/.secretfiles. The.vscodeignoreis what enforces that — review it before publishing. - Authenticate with the marketplace publisher (separate one-time step):
npx @vscode/vsce login aisoc - Publish:
(Ornpx @vscode/vsce publish --no-dependenciesvsce publish minor/patchto bump and publish in one step.) - Optionally publish to the Open VSX registry as well for non-marketplace IDEs:
npx ovsx publish aisoc-extension-*.vsix --pat <OVSX_PAT>
Secrets: the publisher PAT and the OVSX PAT must come from the publisher's secret manager — they are never committed to the repo.
Roadmap
- Live "tail mode" for in-progress investigations (poll
replayDecisionwithsince_seqand stream new steps into the webview). - Detection-rule "open in editor" — when
queryDetectionsreturns a hit, offer to fetch the rule body and open it in a buffer. - A command-palette quick-pick that lists recent investigations (uses
aisoc_list_investigations) so users don't have to paste UUIDs.
License
MIT — same as the rest of AiSOC. See LICENSE at the repo root.