Skip to main content

Evidence-first, LLM-augmented static code analysis: graph indexing, MCP server, audit workflows

Project description

llm-sca-tooling

Evidence-first, LLM-augmented static code analysis.

llm-sca-tooling gathers typed evidence from your repository — AST symbols, call graphs, SARIF alerts, tests, runtime traces — grades it (parser > analyser > heuristic > unknown), and only then lets an LLM reason over the graded context. Findings carry their evidence grade; the tool never upgrades confidence on its own, and it never edits your source. Humans decide on remediation.

Five product surfaces

  1. MCP server — the primary integration surface: 45+ tools, 14 resources, 12 prompts over stdio or Streamable HTTP. Point Claude Code (or any MCP client) at it and ask questions about your repository with evidence-graded answers.
  2. Workflow orchestrator — bug resolve, patch review, SAST alert repair, implementation check (spec-vs-code compliance), and fault localisation. Every run produces a structured report, a run record, and a harness condition sheet.
  3. Evaluation harness — a T1–T4 benchmark ladder with calibration reports; T1 runs in null mode (no LLM) and gates every CI check.
  4. Operational harness plane — run records, incident tracking, trajectory memory with experience replay, operational reviews, release gates.
  5. Operational guardrails — permission profiles, doom-loop and budget monitoring, governance-drift checks, privacy redaction, session replay.

Install

pipx install llm-sca-tooling          # CLI + MCP server
# optional capabilities:
pipx inject llm-sca-tooling fastembed # semantic retrieval (embeddings)
pipx inject llm-sca-tooling anthropic # live LLM boundaries (llm_mode)

or in a project:

pip install "llm-sca-tooling[embeddings,llm]"

Graph indexing uses universal-ctags (apt install universal-ctags / brew install universal-ctags).

Optional: full-fidelity TypeScript/JavaScript

The TypeScript/JavaScript backend uses ts-morph for parser-grade facts (resolved cross-file imports and call edges). It needs Node.js and a one-time dependency install:

cd <site-packages>/llm_sca_tooling/indexing/backends/typescript/runner
npm install

Without Node/ts-morph the backend transparently falls back to a heuristic regex parser — lower fidelity, but indexing still works.

Quickstart

llm-sca-tooling config validate
llm-sca-tooling mcp serve --transport stdio   # start the MCP server

Register with Claude Code:

claude mcp add llm-sca-tooling -- llm-sca-tooling mcp serve

Then, from your MCP client:

register_repo(repo_path="/path/to/repo")
graph_build(repo_path="/path/to/repo")        # async — poll task_status
get_relevant_files(issue_text="NullPointerException in UserService.authenticate")
run_implementation_check(spec="<your architecture doc>", task=true)
run_issue_resolution(issue_text="<bug report>")

LLM mode

Workflows run in null mode by default — deterministic heuristics only, suitable for CI. With the llm extra installed and ANTHROPIC_API_KEY exported, pass llm_mode: true to run_implementation_check to enable the LLM boundaries (clause grounding, contract generation). Runs degrade to null mode when no provider is available and report llm_mode_active so a degraded run is never mistaken for an LLM-graded one. Model selection via LLM_SCA_MODEL (default claude-opus-4-8).

Evidence hierarchy

Grade Source Confidence
parser ctags AST, language servers, exact SARIF locations High
analyser dataflow, cross-file call graph Medium-high
heuristic pattern matching, keyword search, LLM-classified groundings Medium
unknown no hard evidence — reported honestly, never auto-passed Low

Every LLM-derived artefact is fail-closed: unparseable output degrades to the deterministic null path, citations are filtered to evidence actually provided, generated predicates must compile before they count, and LLM groundings carry a derivation="llm" audit field.

Governance

Development of this repository is governed by AGENTS.md: hard constraints (no secrets, write allowlists, deny-by-default egress), a verify-before-commit gate (make verify), live session telemetry, and harness condition sheets for every evaluation and release run.

Documentation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_sca_tooling-0.14.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_sca_tooling-0.14.0-py3-none-any.whl (537.7 kB view details)

Uploaded Python 3

File details

Details for the file llm_sca_tooling-0.14.0.tar.gz.

File metadata

  • Download URL: llm_sca_tooling-0.14.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for llm_sca_tooling-0.14.0.tar.gz
Algorithm Hash digest
SHA256 698f9ef0566f78777110ab81a364bf0816e99aa1695ab034b92c79bf1a15301d
MD5 d33a8451348fd4130f92b81065e9913f
BLAKE2b-256 23e3174801c25c8f2e48af6b58b003f8021dbec3ace0fe99212412935e0f6c18

See more details on using hashes here.

File details

Details for the file llm_sca_tooling-0.14.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_sca_tooling-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 541e5807b30e8786e34995dcc80d1fc2d7610b06170727334717d077ad8a7762
MD5 4c83ae7e2870385bf3ed6abb625a597e
BLAKE2b-256 f421aef705c36af1c5e32abff488e7693d4e96f152a541fbdec4bbbb73a6685a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page