- Code Pathfinder
Code Pathfinder
Code Pathfinder MCP Server: Complete Guide
Overview
Code Pathfinder's Model Context Protocol (MCP) Server transforms AI coding assistants like Claude Code, Codex, and OpenCode into powerful code intelligence tools through deep semantic analysis. Unlike traditional grep or text-based search, this open-source MCP server provides call graph analysis, symbol search, dependency tracking, and dataflow analysis—enabling developers to query codebases using natural language.
The Code Pathfinder MCP implementation runs 100% locally, ensuring your code never leaves your machine while delivering enterprise-grade code intelligence for security analysis, codebase onboarding, and refactoring support.
Core Capabilities
Six Specialized Analysis Tools
The Code Pathfinder MCP Server provides comprehensive semantic code analysis through six dedicated tools:
- Project Statistics: Codebase metrics and structure overview
- Symbol Search: Find functions, classes, and variables across your project
- Reverse Call Graphs (get_callers): Discover "who calls this function?"
- Forward Call Graphs (get_callees): Trace "what does this function call?"
- Call Site Details: Exact file paths and line numbers for each invocation
- Import Resolution: Track dependencies and module relationships
Natural Language Code Queries
Developers can ask questions in plain English instead of manually using grep or performing code archaeology:
- "What functions call validate_user in my authentication module?"
- "Show me all database queries in the user service"
- "Where is decrypt_token used across the codebase?"
- "How does user input flow through the payment pipeline?"
Technical Architecture
Multi-Pass AST Analysis
Unlike traditional code search tools that only match text patterns, the Code Pathfinder MCP Server performs multi-pass Abstract Syntax Tree (AST) analysis to build comprehensive code graphs with precise semantic understanding. This enables accurate dataflow analysis, taint tracking for security, cross-file call resolution, and dependency graph construction.
Multi-Project Support
Query across microservices, monorepos, and complex multi-project architectures—suitable for enterprise-scale codebases.
Key Benefits
- Eliminates Manual Code Search: No more grepping through thousands of files—get instant answers about code structure
- Deep Semantic Understanding: Goes beyond text matching to understand actual code relationships and execution paths
- Seamless IDE Integration: Works directly within your AI coding assistant workflow
- Multi-Language Support: Currently supports Python with planned expansion to JavaScript, TypeScript, Go, and Java
Privacy and Open Source
100% Local Execution
All analysis runs entirely locally on your development machine. Your source code never gets sent to external servers—critical for enterprise security compliance, protected intellectual property, and GDPR regulations.
Free and Open Source (AGPL-3.0)
Fully free and open-source with community contributions welcome. Developers can inspect, modify, and extend the codebase for custom security analysis workflows.
Installation (Under 5 Minutes)
Homebrew (macOS/Linux):
brew install shivasurya/tap/pathfinder
pip (Python):
pip install code-pathfinder
Chocolatey (Windows):
choco install code-pathfinder
Docker:
docker pull codepathfinder/mcp-server
Add a simple JSON configuration to your AI assistant's MCP config file. See the Code Pathfinder documentation for step-by-step setup guides.
Use Cases
Security Vulnerability Analysis
Combined with Code Pathfinder's SAST security scanning, the MCP server enables AI assistants to understand vulnerability context—tracing how user input flows to dangerous functions like SQL injection points, command execution, and deserialization.
Codebase Onboarding
New team members can query the codebase to understand architecture, function relationships, and code organization without reading extensive documentation.
Refactoring Support
Quickly identify all callers of a function to assess refactoring impact and breaking changes.
Dependency Analysis
Track how modules and functions depend on each other—essential for managing technical debt and planning migrations.
Integration with Code Pathfinder Platform
The Code Pathfinder MCP Server is part of the broader Code Pathfinder platform that includes:
- SAST Security Scanning: 98% fewer false positives with AI-powered filtering
- SecureFlow AI: Contextual security analysis for teams
- CI/CD Integration: GitHub Actions, SARIF exports, DefectDojo reporting
- Security Rule Registry: OWASP Top 10, CVEs, CWE categories, and framework vulnerabilities
Getting Started
Visit codepathfinder.dev/mcp for installation guides, configuration examples, and documentation for integrating with Claude Code, Codex, OpenCode, and other AI coding assistants.
Server Config
{
"mcpServers": {
"code-pathfinder": {
"command": "pathfinder",
"args": [
"serve",
"--project",
"/absolute/path/to/your/project"
]
}
}
}