Skip to content

zikazama/sonar-mcp-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SonarQube FastAPI MCP Server

This project provides a FastAPI-based MCP (Machine Control Protocol) server for interacting with SonarQube. It allows tools like Qwen, Cursor, and Claude to access SonarQube data through MCP protocol.

Features

  • Get all projects from SonarQube
  • Retrieve coverage metrics for projects
  • Get duplication rates
  • Access project issues
  • Obtain uncovered lines information
  • Health check endpoint

Author

Fauzi Fadhlurrohman

Installation

  1. Clone the repository
  2. Install dependencies: pip install -r requirements.txt
  3. Configure environment variables in .env file
  4. Run the server: python mcp_server.py

Docker Deployment

The project includes multiple Docker Compose configurations:

  1. Development (default):

    docker-compose up
    docker-compose down
  2. Production:

    docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
    docker-compose -f docker-compose.yml -f docker-compose.prod.yml down
  3. MCP Server:

    docker-compose -f docker-compose.mcp.yml up -d
    docker-compose -f docker-compose.mcp.yml down

MCP Configuration

To use this server with AI tools like Qwen, Cursor, or Claude, configure the MCP settings as follows:

{
  "sonarqube-mcp": {
    "command": "docker-compose",
    "args": [
      "-f",
      "docker-compose.mcp.yml",
      "exec",
      "-T",
      "sonarqube-mcp",
      "python",
      "mcp_server.py"
    ],
    "cwd": "H:\\fauzi\\project\\sonarqube-fastapi-mcp"
  }
}

Usage

The server implements MCP protocol and can be used with compatible AI tools like Qwen, Cursor, and Claude.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published