Sphior Code Mcp

io.github.Toraastrta由 GitHub 帳號 Toraastrta 發布v1.1.6更新於 Oct 24, 2026

Deterministic SAST/SCA findings + fix guidance for your AI agent. Runs locally, no account needed.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,用確定性 SAST/SCA 引擎掃描工作區的安全問題,並向助理提供修正指引。

可以做什麼
掃描工作區中的密鑰、CWE 模式和有漏洞的相依套件,並提供包含位置、步驟和參考的修正指引(get_fix_context)。檢查伺服器是否運作,雲端模式下也檢查驗證是否有效(health_check)。設定 API 金鑰後,依嚴重程度或狀態列出並檢視發現項目,並查看安全態勢概覽。設定 API 金鑰後,將發現項目標記為已修正或誤報,並驗證防竄改證據鏈。透過暴露的資源讀取態勢和單一發現項目快照。
適用情境
適合讓 AI 助理在本機程式碼庫中找出並修正安全問題,或檢視 SPHIOR 所連接儲存庫的發現項目與安全態勢。僅掃描時本機模式無需帳號即可使用;需要歷史、證據和 GRC 的團隊適合雲端模式。
執行需求
以 stdio 在本機執行,通常透過 npx 或全域 npm 安裝,因此需要 Node.js。本機模式無需帳號或金鑰。選用環境變數:SPHIOR_API_KEY 用於雲端功能,SPHIOR_WORKSPACE 指定掃描目錄,SPHIOR_API_BASE 用於自架或區域端點,另有逾時和除錯設定。
安裝前請注意
SPHIOR_API_KEY 是解鎖雲端功能的 bearer 權杖,不要放入共用設定檔。雲端工具會修改資料:resolve_finding 和 mark_false_positive 會改變發現項目狀態。雲端模式下伺服器會存取 SPHIOR 的 API,SPHIOR_API_BASE 可將其指向其他主機。README 稱原始碼不會被傳送,但在處理敏感程式碼前應自行核實。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Sphior Code Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

sphior-code-mcp

Official Model Context Protocol (MCP) server for SPHIOR CODE — find security issues in your code and let your own AI assistant fix them, inside any MCP-compatible client.

No account needed to start. With no API key set, the server scans your local workspace with the bundled deterministic engine and hands the findings to your AI agent. Add an API key later if you want tamper-evident evidence, history and GRC integrations.

[npm version] [License: MIT]

What this gives you

Your AI assistant can now answer questions like:

  • "Scan this project and fix the critical issues." ← works with no account
  • "What are the highest-severity vulnerabilities in my code right now?"
  • "Show me the fix for finding abc-123."
  • "Mark this SQL injection alert as resolved — I just fixed it." (requires an API key)
  • "What's our overall security posture this month?" (requires an API key)

…using live data from SPHIOR's scanning engine — deterministic SAST (secrets + CWE patterns, analysed with real parsers across 14 languages) and SCA powered by OSV.dev. No AI is involved in detection, so the same code always produces the same findings.

Supported clients

This is a standard MCP stdio server, so it works with any MCP-compatible client:

ClientConfig locationSetup
Cursor~/.cursor/mcp.jsonAdd MCP
Claude Code~/.claude.jsonclaude mcp add sphior-code -- npx sphior-code-mcp
VS Code~/.config/Code/User/settings.json (mcp.servers)Built-in MCP
GitHub Copilot (VS Code).vscode/mcp.jsonNative MCP
Cline (VS Code extension)~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonSettings UI
Continue (VS Code extension)~/.continue/config.yamlmcpServers: section
Windsurf~/.codeium/windsurf/mcp_config.jsonSettings UI
Zed~/.config/zed/settings.json (context_servers)Native MCP
JetBrains AI Assistant (2024.3+)Settings → Tools → AI Assistant → MCPBuilt-in

Installation

bash
# No install needed — use npxnpx -y sphior-code-mcp
# Or install globallynpm install -g sphior-code-mcpsphior-code-mcp

Two modes

Local (default)Cloud
Setupnothing — just run itset SPHIOR_API_KEY
What it scansyour local workspacerepositories connected to SPHIOR
Tools availableget_fix_context, health_checkall 8 tools
Source code leaves your machinenevernever
Tamper-evident evidence / history / GRC push—✅

In local mode the server runs the same deterministic engine that powers the editor extensions (secrets + CWE patterns + taint analysis across 14 languages, parsed with real grammars) against the directory your client launched it in, then returns remediation guidance your agent can act on. It never contacts SPHIOR's servers.

Cloud-only tools return a clear message explaining what they need, rather than failing silently.

Configuration

Nothing is required to start. To unlock cloud features, set an API key from sphior.com/account/api:

bash
export SPHIOR_API_KEY=sk_live_xxxxxxxxxxxx

Environment variables

VariableRequiredDefaultDescription
SPHIOR_API_KEYNo—Bearer token. Omit for local mode; set it for cloud mode
SPHIOR_WORKSPACENocurrent directoryDirectory to scan in local mode
SPHIOR_API_BASENohttps://sphior.com/api/v1Override for self-hosted / regional deployments
SPHIOR_TIMEOUTNo30000Request timeout in ms (1000–300000)
SPHIOR_DEBUGNofalseEnable verbose logging to stderr

Example config (Cursor / Claude Code / VS Code style)

Local mode — copy, paste, done. No account, no key.

json
{  "mcpServers": {    "sphior-code": {      "command": "npx",      "args": ["-y", "sphior-code-mcp"]    }  }}

Claude Code users can skip the file entirely:

bash
claude mcp add sphior-code -- npx sphior-code-mcp

Then ask your agent: "Scan this project and fix the critical issues."

Cloud mode — add the key to the same block:

json
{  "mcpServers": {    "sphior-code": {      "command": "npx",      "args": ["-y", "sphior-code-mcp"],      "env": {        "SPHIOR_API_KEY": "sk_live_xxxxxxxxxxxx"      }    }  }}

For GitHub Copilot in VS Code, use "servers" instead of "mcpServers" (the env block is optional here too):

json
{  "servers": {    "sphior-code": {      "type": "stdio",      "command": "npx",      "args": ["-y", "sphior-code-mcp"]    }  }}

Tools exposed

ToolModePurpose
get_fix_contextlocal + cloudRemediation guidance your agent acts on — why it matters, exact location, steps, references. Source code is never sent; the agent opens the file in your own workspace
health_checklocal + cloudVerify the server is up (and auth, in cloud mode)
list_findingscloudList vulnerabilities (filter by severity / status / limit)
get_findingcloudFull details for one finding (CVSS, CWE, file path, fix hint)
get_security_summarycloudPosture overview (counts by severity, last scan, repos monitored)
resolve_findingcloudMark as fixed
mark_false_positivecloudMark as not exploitable
verify_evidencecloudIndependently verify the tamper-evident evidence chain (for auditors)

get_fix_context accepts path in local mode to scan a directory other than the one your client launched the server in.

Resources exposed

  • sphior-code://summary — JSON snapshot of current posture
  • sphior-code://findings/{id} — full detail per finding (auto-listed for open findings)

Reliability

  • Exponential backoff retry on 5xx / network errors (3 attempts)
  • 30-second request timeout (configurable)
  • Graceful degradation — auth errors fail fast, server errors retry
  • Structured errors with actionable hints
  • stderr-only logging (stdout is reserved for MCP protocol)

Development

bash
# In this directorynpm installnpm run build# Local mode — no key needednode bin/sphior-code-mcp.js
# Cloud modeSPHIOR_API_KEY=sk_test_xxx node bin/sphior-code-mcp.js# Type a JSON-RPC request to test

License

MIT © SPHIOR Security

Links

來源:packages/code-mcp/README.md,提交 564b189

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v1.1.6最新Oct 17, 2026
  2. v1.1.4Oct 16, 2026
  3. v1.0.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分