codebadger-toolkit
Verified Safeby Lekssays
Overview
A containerized Model Context Protocol (MCP) server providing static code analysis using Joern's Code Property Graph (CPG) technology for integration with AI/LLM agents.
Installation
python main.py &Environment Variables
- MCP_HOST
- MCP_PORT
- MCP_LOG_LEVEL
- JOERN_BINARY_PATH
- JOERN_MEMORY_LIMIT
- JOERN_JAVA_OPTS
- JOERN_SERVER_AUTH_USERNAME
- JOERN_SERVER_AUTH_PASSWORD
- CPG_GENERATION_TIMEOUT
- MAX_REPO_SIZE_MB
- QUERY_TIMEOUT
- QUERY_CACHE_ENABLED
- QUERY_CACHE_TTL
- WORKSPACE_ROOT
- CLEANUP_ON_SHUTDOWN
- JOERN_CONTAINER_NAME
Security Notes
The server processes arbitrary source code for analysis, which is an inherent risk. It utilizes Docker containerization for the Joern analysis engine, providing a layer of isolation. Input validation is present for CPGQL queries (blocking dangerous commands like `System.exit`) and source code paths (preventing traversal). Extensive use of `docker exec` for CPG generation and Joern server management inside the container is a critical component; while paths are constrained to the `/playground` mount, any vulnerability in command construction could be severe. No hardcoded secrets were identified. Overall, the system demonstrates awareness of security implications, but running arbitrary static analysis inherently carries risks.
Similar Servers
mcp-watch
A comprehensive security scanner for Model Context Protocol (MCP) servers, detecting various vulnerabilities in their implementations.
ast-mcp-server
Provides a Model Context Protocol (MCP) server for deep code analysis, offering Abstract Syntax Tree (AST) and Abstract Semantic Graph (ASG) generation, code structure analysis, and transformation capabilities, primarily for integration with AI agents like Claude Desktop.
mcp-playground
A web-based developer tool for testing, inspecting, and debugging Model Context Protocol (MCP) servers, supporting OAuth integration, request logging, and interactive execution of tools, resources, and prompts.
ultrascript-tools-mcp
An AI-powered assistant for analyzing, navigating, and refactoring codebases using a code graph and semantic search.