
Code Pathfinder
dev.codepathfinderPublished by codepathfinder.devv2.1.1Updated Oct 24, 2026
Code intelligence MCP server: call graphs, type inference, and symbol search for Python/Go.
Overview
A local code-intelligence MCP server that gives assistants call graphs, cross-file dataflow tracing, symbol search, and security rule scanning for Python and…
- What you can do
- Code Pathfinder parses a project into an AST, builds a call graph and per-function variable dependency graphs, and runs taint analysis to trace source-to-sink flows across files and function boundaries. Through MCP it exposes tools to find callers and callees, trace data flows, search for code patterns, and run security rules. It ships with rule bundles for Python, Dockerfiles, and Docker Compose, and reports findings as text, JSON, SARIF, or CSV.
- When to use it
- Use it when an assistant needs structural understanding of a Python codebase beyond what an LSP provides, or when reviewing code for vulnerabilities such as SQL injection, SSRF, path traversal, and deserialization that span multiple files. It is also useful for Dockerfile and Compose configuration checks.
- Requirements
- Runs as a local process over stdio. Install via Homebrew, pip (codepathfinder), a prebuilt binary, or the Docker image; the pip package also provides the Python SDK for writing rules. No API keys, config files, or cloud accounts are needed. Rulesets download from a CDN automatically, so network access is required for those.
Installation
In SourceWeft
- Open Code Pathfinder in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Open-source SAST engine that traces vulnerabilities across files and functions
Website · Docs · Rule Registry · MCP Server · Blog
[Build] [GitHub Release] [Apache-2.0 License] [GitHub Stars] [Ask DeepWiki]
Quick Start
Install:
Scan a Python project (rules download automatically):
Scan Dockerfiles:
No config files, no API keys, no cloud accounts. Results in your terminal in seconds.
What is Code Pathfinder?
Code Pathfinder is an open-source static analysis engine that builds a graph of your codebase and traces how data flows through it. It parses source code into Abstract Syntax Trees, constructs call graphs across files, and runs taint analysis to find source-to-sink vulnerabilities that span multiple files and function boundaries.
v2.0 introduces cross-file dataflow analysis: trace user input from an HTTP handler in one file through helper functions and into a SQL query in another file. This is the kind of analysis that pattern-matching tools miss entirely.
Cross-File Taint Analysis
Most open-source SAST tools operate on single files. Code Pathfinder v2.0 tracks tainted data across file boundaries:
The engine builds a Variable Dependency Graph (VDG) per function, then connects them through inter-procedural taint transfer summaries. When user_input flows into a function parameter in another file, the taint propagates through the call graph to the sink.
How It Works
- Parse: Tree-sitter builds ASTs for Python, Dockerfiles, and Docker Compose files
- Index: Extract functions, call sites, parameters, and assignments into a queryable call graph
- Analyze: Build VDGs per function, resolve inter-procedural flows, run taint analysis
- Detect: Python-based security rules query the graph to find source-to-sink paths
- Report: Output findings as text, JSON, SARIF (GitHub Code Scanning), or CSV
190 Security Rules, Ready to Use
Rules download from CDN automatically. No need to clone the repo or manage rule files.
Browse all rules with examples and test cases at the Rule Registry.
MCP Server for AI Coding Assistants
Code Pathfinder runs as an MCP server, giving Claude Code, Cursor, Cline, and other AI assistants access to call graphs, data flows, and security analysis. More context than LSP, focused on security and code structure.
The MCP server exposes tools for querying the code graph: find callers/callees, trace data flows, search for patterns, and run security rules — all available to the AI assistant during code review or development.
Write Custom Rules
Security rules are Python scripts using the PathFinder SDK. Define sources, sinks, and sanitizers — the dataflow engine handles the analysis.
Here's a real rule from the repo (PYTHON-DJANGO-SEC-001) that detects SQL injection in Django:
Explore all 190 rules in the rules/ directory or browse the Rule Registry. See the rule writing guide and dataflow documentation to write your own.
See the rule writing guide and dataflow documentation for more.
Installation
Homebrew (Recommended)
pip
Installs the CLI binary and Python SDK for writing rules.
Docker
Pre-Built Binaries
Download from GitHub Releases for Linux (amd64, arm64), macOS (Intel, Apple Silicon), and Windows (x64).
From Source
Usage
GitHub Action
See the full example: .github/workflows/code-pathfinder-scan.yml
Action Inputs
Either rules or ruleset is required.
Supported Languages
Contributing
Contributions are welcome. Read the Contributing Guide for setup instructions, how to run tests locally, and the PR process.
Pushing an in-product announcement
In-product announcements (workshops, blog posts, security advisories) are
managed via release/latest.json. Add an entry to announcements[],
open a PR, and once it merges to main the publish workflow uploads the
manifest to the CDN within ~60 seconds. See the version-update-check tech
spec for the schema and version_range semantics.
All contributors must sign the Contributor License Agreement (CLA) before any pull request can be merged.
License
Source: README.md at commit 460d0d3
Tools
0Version history
1- v2.1.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts