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 分