mcpField
S
sphior-code-mcp

sphior-code-mcp

Local
sphior.comSecurity1Updated 3d ago

About sphior-code-mcp

sphior-code-mcp is a local code security scanning server for MCP clients, giving AI agents findings and remediation guidance. Its deterministic SAST and SCA engine works without an account; an API key enables cloud finding management and evidence features.

Key features

  1. 01Local deterministic SAST and SCA scans
  2. 02Code analysis across 14 languages
  3. 03Remediation guidance for findings
  4. 04Cloud finding lookup and status updates
  5. 05Security summaries and evidence verification

Use cases

  1. 01Scan a local project for security issues
  2. 02Get remediation steps for a finding
  3. 03Review security posture across cloud repositories

MCP support

A standard MCP stdio server that exposes scanning and remediation tools, plus security summary and finding resources to compatible clients. Cloud queries, status updates, and evidence features require an API key.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"toraastrta-sphior-code": {
"command": "npx",
"args": [
"-y",
"sphior-code-mcp"
],
"env": {
"SPHIOR_API_KEY": "<SPHIOR_API_KEY>",
"SPHIOR_WORKSPACE": "<SPHIOR_WORKSPACE>",
"SPHIOR_API_BASE": "<SPHIOR_API_BASE>"
}
}
}
}
Run commandnpx -y sphior-code-mcp
Environment variables to set
SPHIOR_API_KEYSecretOptional. Without it the server runs in local mode: it scans your workspace with the bundled deterministic engine and returns fix guidance. Set it to also get tamper-evident evidence, history and GRC integrations. Create one at https://sphior.com/account/code.
SPHIOR_WORKSPACEOptional. Directory to scan in local mode. Defaults to the directory your client launches the server in.
SPHIOR_API_BASEOverride the API base URL for self-hosted / regional deployments. Default: https://sphior.com/api/v1

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmsphior-code-mcp1.1.6

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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

# No install needed — use npx
npx -y sphior-code-mcp

# Or install globally
npm install -g sphior-code-mcp
sphior-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:

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.

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

Claude Code users can skip the file entirely:

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:

{
  "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):

{
  "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

# In this directory
npm install
npm run build
# Local mode — no key needed
node bin/sphior-code-mcp.js

# Cloud mode
SPHIOR_API_KEY=sk_test_xxx node bin/sphior-code-mcp.js
# Type a JSON-RPC request to test

License

MIT © SPHIOR Security

Links

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.