- Explore MCP Servers
- mcp-joern
Mcp Joern
What is Mcp Joern
mcp-joern is a simple MCP Server based on Joern, designed to assist developers in code review and security analysis.
Use cases
Use cases for mcp-joern include automated code reviews, security vulnerability assessments, and educational purposes for understanding code structure and security.
How to use
To use mcp-joern, clone the project from GitHub, install the required Python dependencies, start the Joern server, configure the MCP server, and run the demo script to test the connection.
Key features
Key features include integration with Joern for code analysis, a simple setup process, and the ability to interact with a large language model for querying code-related questions.
Where to use
mcp-joern can be used in software development environments, particularly in code review processes and security analysis tasks.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Joern
mcp-joern is a simple MCP Server based on Joern, designed to assist developers in code review and security analysis.
Use cases
Use cases for mcp-joern include automated code reviews, security vulnerability assessments, and educational purposes for understanding code structure and security.
How to use
To use mcp-joern, clone the project from GitHub, install the required Python dependencies, start the Joern server, configure the MCP server, and run the demo script to test the connection.
Key features
Key features include integration with Joern for code analysis, a simple setup process, and the ability to interact with a large language model for querying code-related questions.
Where to use
mcp-joern can be used in software development environments, particularly in code review processes and security analysis tasks.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Joern MCP Server
A simple MCP Server for Joern.
Project Introduction
This project is an MCP Server based on Joern, providing a series of features to help developers with code review and security analysis.
Environment Requirements
- Python >= 3.10 (default 3.12) & uv
- Joern
Installation Steps
-
Clone the project locally:
git clone https://github.com/sfncat/mcp-joern.git cd mcp-joern -
Install Python dependencies:
uv venv .venv source .venv/bin/activate uv sync
Project Structure
├── server.py # MCP Server main program ├── test_mcp_client.py # Test program for joern server and mcp tool ├── test_sc_tools.py # Direct test program for sc tools ├── common_tools.py # Common utility functions ├── server_tools.py # Server utility functions ├── server_tools.sc # Scala implementation of server utility functions ├── server_tools_source.sc # Scala implementation of server utility functions,use sourceCode to get the source code of method ├── requirements.txt # Python dependency file ├── sample_cline_mcp_settings.json # Sample cline mcp configuration file └── env_example.txt # Environment variables example file
Usage
-
Start the Joern server:
joern -J-Xmx40G --server --server-host 127.0.0.1 --server-port 16162 --server-auth-username user --server-auth-password password --import server_tools.sc Or joern -J-Xmx40G --server --server-host 127.0.0.1 --server-port 16162 --server-auth-username user --server-auth-password password --import server_tools_source.sc -
Copy env_example.txt to .env
Modify the configuration information to match the joern server startup configuration -
Run the test connection:
Modify the information intest_mcp_client.pyto confirm the joern server is working properlyuv run test_mcp_client.py Starting MCP server test... ================================================== Testing server connection... [04/16/25 20:38:54] INFO Processing request of type CallToolRequest server.py:534 Connection test result: Successfully connected to Joern MCP, joern server version is XXX -
Configure MCP server
Configure the mcp server in cline, refer tosample_cline_mcp_settings.json. -
Use MCP server
Ask questions to the large language model, refer toprompts_en.md
Development Notes
.envfile is used to store environment variables.gitignorefile defines files to be ignored by Git version controlpyproject.tomldefines the Python configuration for the project- MCP tool development
- Implement in
server_tools.sc, add definitions inserver_tools.py, and add tests intest_mcp_client.py
- Implement in
Contribution Guidelines
Welcome to submit Issues and Pull Requests to help improve the project.
Welcome to add more tools.
References
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










