Code Pathfinder MCP
A SAST scanner with cross-file dataflow analysis and an MCP server: the agent sees call graphs, taint sources and sinks
- 143 ★ on the repository
- Last commit
Extended access
Why this level
- The server reads the source code of the whole project and exposes its structure to the agent.
- Rules download from the network, and anonymous MCP telemetry is turned off with a flag.
Install
- Works in
Manual install
brew install shivasurya/tap/pathfinderThe first install command from the README. `pip install codepathfinder` and a Docker image also exist.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The server reads the source code of the whole project and exposes its structure to the agent.
- Rules download from the network, and anonymous MCP telemetry is turned off with a flag.
This is third-party code. Review the repository files before installing.
What it does
Code Pathfinder builds a project call graph and traces how data moves from a source to a dangerous spot across several files and functions. Tree-sitter parses the code, and Python, Dockerfile and Docker Compose are supported. Version 2.0 finds, for instance, a path from user input in an HTTP handler in one file to a SQL query in another. The `pathfinder scan --ruleset python/all --project .` command runs 190 ready rules: 158 for Python (Django, Flask, AWS Lambda, JWT, deserialization, cryptography), 37 for Docker and 10 for Docker Compose. Rules download from a CDN, and output goes as text, JSON, SARIF for GitHub Code Scanning or CSV. Custom rules are written in Python through the SDK, naming sources, sinks and sanitizers. The `pathfinder serve --project .` command turns on MCP mode for Claude Code, Cursor, Cline and other agents. Tools look up symbols and modules, show callers and callees and resolve imports, Dockerfile instructions and Compose services.
Who it is for. Security teams and Python developers who need an agent for code review with data tracing and for Dockerfile checks.
Good fit when
- A Django or Flask project review must find a SQL injection where input passes through several files.
- CI fails on critical findings and the report goes to GitHub Code Scanning as SARIF.
- An agent uses the call graph to learn who uses a function and what it calls.
- Dockerfiles and Compose files are checked for root user, an exposed socket and privileged mode.
- A team writes its own rule over the sources and sinks of its code.
Not a fit when
- The project is in JavaScript, Go or Java: ready rules and parsing cover Python and container files.
- A full pentest is needed: static analysis does not replace testing a running system.
- Someone else's code would be scanned without the owner's permission.
Example request
Scan the project with the python/all ruleset, then show the path from user input to the SQL query and explain how to close it.MCP
- Transport
- stdio, http
- Authentication
- not required
Limitations
Dataflow analysis works for Python, Dockerfile and Docker Compose, and the rule list is limited to those languages. Rules download from a CDN on first run, so network access is required. The MCP server code has anonymous telemetry that the `--disable-metrics` flag turns off. The last commit on the main branch dates from May 2026. Static analysis gives false positives and misses, so a human or an agent verifies findings in project context. MCP runs over stdio by default and HTTP mode is switched on with the `--http` flag.
How to disable. Remove the `pathfinder` entry from the MCP client settings and stop the `pathfinder serve` process. The scanner itself is removed with `brew uninstall pathfinder` or `pip uninstall codepathfinder`.
FAQ
How do I scan a project?
Run `pathfinder scan --ruleset python/all --project .`. No keys or cloud accounts are needed and rules download automatically. For Dockerfiles use the `docker/all` set.
How do I connect Code Pathfinder as MCP?
The `pathfinder serve --project .` command starts a server for the chosen project. Pick the client settings entry from the guide at codepathfinder.dev/mcp.
Which report formats are available?
Text, JSON, SARIF and CSV. Set the file with the `--output` and `--output-file` flags, for example `--output sarif --output-file results.sarif`.
How do I fail CI on critical findings?
Add the `--fail-on=critical,high` flag to the scan command.
How do I write a custom rule?
Rules are written in Python through the PathFinder SDK, naming sources, sinks, sanitizers and the analysis scope. Run them with `pathfinder scan --rules ./my_rules/ --project .`. The SDK installs with `pip install codepathfinder`.
Discussion
No questions or reviews yet.
Related
MCP serversA static scanner for vulnerabilities in AI agent code and MCP configs with 66 rules mapped to OWASP Agentic Top 10
Security scanner for coding agents: checks code, MCP servers, prompts and model-invented packages, and gives an A to F grade.
A local dashboard for Claude Code, Codex CLI and OpenCode: what the agent loads, its token cost and an MCP server security scan
Prowler plugin for Claude Code
Prowler for Claude Code
A plugin that takes a cloud account toward CIS, PCI-DSS and other frameworks: reads Prowler Cloud reports, fixes failures and proposes a rescan
A scanner that finds leaked keys, dangerous access and connected models in MCP configs of Claude Desktop, Cursor and VS Code.
An AI security verification CLI: scans models and code, probes live endpoints and MCP servers, and analyzes recorded agent runs
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Code Pathfinder (this card) | no | not required | 143 | |
| Semgrep Skills | yes | 340 | skills for running Semgrep with custom rules; Code Pathfinder builds the call graph itself and tracks data across files | |
| CodeGraph | no | not required | 76,797 | a general code graph for agent navigation; Code Pathfinder focuses on security and finds data paths to sinks |
README in short
Install through Homebrew, pip, Docker or prebuilt binaries for Linux, macOS and Windows. A GitHub Action scans pull requests, and a rule registry on the project site holds examples and tests.