| title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned | license | short_description |
|---|---|---|---|---|---|---|---|---|---|
Code Analysis MCP |
🧑💻 |
black |
yellow |
gradio |
5.32.0 |
src/app.py |
false |
apache-2.0 |
Automated code reviews for LLMs. |
This project is a simple Gradio-based MCP server that provides two basic code analysis functionalities:
- Code Analysis Report: Generates a report with basic information about the provided code.
- Code Score: Provides a simple score for the provided code.
-
Clone the repository.
-
Navigate to the project directory.
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the application:
python src/app.py
-
The Gradio interface will be available at
http://127.0.0.1:7860/and MCP server will be avaible athttp://127.0.0.1:7860/gradio_api/mcp/sse.
-
To test the MCP server with Cursor AI, open Cursor Settings, navigate to the "MCP" tab, and click the "+ Add new global MCP server" button.
-
Add the following JSON configuration to the MCP settings file:
{
"mcpServers": {
"gradio": {
"url": "http://127.0.0.1:7860/gradio_api/mcp/sse"
}
}
}- Save the file. You will now see an active MCP server named
gradiowith the toolsCode Analysis ReportandCode Score.
To test this MCP server, you can create a new chat in agent mode of the Cursor using (CTRL +T) and ask for a code analysis report (e.g., "analyze this Python code: print('hello')"). Cursor will ask for permission to run the MCP tool. Approve it.
- Endpoint:
/predict - Description: Accepts a code string and returns a basic analysis report.
- Endpoint:
/predict_1 - Description: Accepts a code string and returns a simple code score.