
Itsoc Mcp
io.github.Ankit512由 GitHub 帳號 Ankit512 發布v0.1.0更新於 Oct 24, 2026
Read-only MCP server over a local log-analysis backend; a client that computes no verdicts.
概覽
唯讀的 MCP 用戶端,代理本機日誌分析後端,讓助理執行分析、檢視發現與證據、匯出執行結果並提出 IP 封鎖提案。
- 可以做什麼
- 執行與列出日誌分析:對本機路徑或 http(s) 網址啟動分析,列出已儲存的執行紀錄與目前執行
- 檢視發現與證據:依嚴重程度、規則或主機篩選發現,並取得單一發現的證據行、規則判定條件與時間軸
- 解釋發現:透過後端模型端點要求僅供參考的說明
- 匯出執行結果:以 csv、html、xml、json 或 md 格式代理匯出
- 查詢威脅情報:對單一 IPv4 位址做離線 STIX 對應 MITRE 的比對
- 提出封鎖提案:在後端主控台建立待核准的 IP 封鎖紀錄
- 適用情境
- 當你已經執行本專案的本機日誌分析後端,並希望支援 MCP 的助理在對話中驅動分析、研判發現並草擬封鎖提案時使用。它並非獨立的偵測器:只轉送後端結果,本身不做出任何判定。
- 執行需求
- 需要本機 Python 環境並安裝 MCP SDK(pip、uvx 或 pipx),且後端正在執行並可連線,預設位址為 指定後端位址,ITSOC_MCP_TRUSTED_LOCAL 回傳原始文字,ITSOC_STIX_BUNDLE 指定本機 STIX 套件。離線威脅情報需要程式碼倉庫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Itsoc Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
itsoc-icp — an MCP server over the local analysis backend
mcp-name: io.github.Ankit512/itsoc-icp
itsoc-icp (Python package itsoc_mcp) exposes this project's existing log-analysis capabilities as
Model Context Protocol tools, so an
MCP-capable agent (Claude Code / Claude Desktop) can drive them. It is an
isolated sibling package: it imports nothing from anomaly_detector.py,
changes no /api/* route, and adds no dependency to the core backend.
What it is (and is not)
- A client, not a brain. Every tool proxies the already-running local backend
(
http://127.0.0.1:8765by default). This server computes no verdicts: severities, correlation, and rule verdicts are owned by the frozen deterministic detector on the backend. Tools relay; they never re-decide. - No action execution and no approval authority. No tool can approve, reject,
execute, or revoke actions.
propose_block_ipcan create a proposal in thependingstate only; all execution and approval authority strictly resides on the backend console with human-in-the-loop step-up authentication.analyze_logkicks off log analysis andexplain_findingrequests an advisory explanation via the existing endpoint — an explanation never changes, suppresses, or escalates a verdict. - Honest by construction. Backend
null/ "0 lines parsed" / idle states are passed through verbatim — never a fabricated all-clear or an empty file. - Redacted by default. Any field carrying raw log text is masked through the
project's existing egress choke point (
console/redact.py) before it leaves, unless you opt into a trusted local session (see below).
Every tool response carries a provenance block stating: verdicts are
deterministic/rule-owned, explanations are advisory, MITRE tags are derived (not
verdicts), plus the running detector's detector_sha256.
Tools
Every tool declares all four MCP hints as explicit booleans (readOnlyHint,
destructiveHint, idempotentHint, openWorldHint) so hosts can warn before
invoke and OpenAI's directory will accept the contract. Read tools
(list_runs, get_findings, get_evidence, export_run, threat_intel_lookup)
are readOnlyHint: true. analyze_log, explain_finding, and propose_block_ip
are writes (additive, not destructive). All backend-facing tools are
openWorldHint: true.
Install
The core backend stays stdlib-only — do not install anything to run it. Install the MCP SDK only if you want to run this server:
Run
-
Start the backend (from the repo root), stdlib-only, no extra installs:
-
Launch the MCP server over stdio (from the repo root):
Configuration (environment)
Register with an MCP client (stdio)
Paste into your MCP client config (e.g. Claude Desktop's
claude_desktop_config.json, or .mcp.json for Claude Code). Replace
/ABSOLUTE/PATH/TO/itsoc with the repo root:
To allow raw evidence/export on a trusted local machine, add
"ITSOC_MCP_TRUSTED_LOCAL": "1" (and optionally "ITSOC_STIX_BUNDLE": "...") to
that env block. The backend (python3 console/serve.py) must be running.
Tests
Network-free, no SDK, no ATT&CK cache required — the client is faked and the offline mapper is stubbed:
It asserts each tool's shape, that get_evidence/get_findings/explain_finding
are redacted by default and raw only with ITSOC_MCP_TRUSTED_LOCAL=1, and
that idle/unrecognized/error states return honest errors, not empty payloads.
Standalone install (uvx / pipx)
pyproject.toml builds an itsoc-icp distribution with an itsoc-icp console
script (itsoc_mcp.server:main) and pins mcp>=1.9,<2 — MCP clients speak the
stable 1.x API; mcp 2.0 changed the server API. The package is self-contained:
designed to run with no repo checkout.
Two honesty points, stated plainly:
- The egress guard is never weakened standalone. Redaction has a single source
of truth —
console/redact.py— used whenever the repo is importable. In a bare install it falls back to a verbatim vendored mirror (_redact_vendored.py) that masks identically (redact-by-default; raw only withITSOC_MCP_TRUSTED_LOCAL=1). A drift-guard test asserts the two never diverge, so the vendored copy can never silently mask less.redaction.redact_source()reports which is active. If neither could load, the module fails to import rather than pass text through — it fails closed, never open. threat_intel_lookupneeds the repo. Its offline STIX→MITRE path reuses the repo's siblingthreat_intel/package, which a bare install does not ship. In a standalone install that one tool fails closed with an honest "offline threat-intel unavailable … NOT a clean verdict / not an all-clear" message — never a fabricated match or a fake all-clear. Run from the repo (python -m itsoc_mcp) to use offline threat-intel. Every other tool is a client of the backend API and works identically standalone or in-repo.
Standalone means no repo checkout is needed for the MCP package — the backend
(python3 console/serve.py) still runs separately and must be reachable at
ITSOC_BASE_URL.
License
MIT — see the repository's top-level LICENSE.
來源:itsoc_mcp/README.md,提交 c05a31e
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分