Analyzes git changes for code quality issues across multiple dimensions
Retrieves a list of files that have been modified in the current git repository
Parses git diff output to extract detailed information about code changes
Lucidity is a powerful code analysis tool that helps AI assistants review code changes more effectively. By analyzing git diffs across multiple quality dimensions including complexity, security vulnerabilities, and error handling, Lucidity provides structured guidance for better code reviews. The tool is designed to work seamlessly with AI coding assistants through the Model Context Protocol (MCP), enabling them to provide more insightful and actionable feedback on code changes before they're committed. With its git-aware analysis capabilities, Lucidity is particularly valuable for pre-commit reviews and maintaining high code quality standards.
Lucidity is a Model Context Protocol (MCP) server designed to enhance the quality of AI-generated code through intelligent, prompt-based analysis. It helps identify and address common quality issues across 10 critical dimensions, resulting in cleaner, more maintainable, and more robust code.
To install Lucidity, follow these steps:
Clone the repository:
git clone https://github.com/hyperb1iss/lucidity-mcp.git
cd lucidity-mcp
Install the package using pip or uv:
# Using pip
pip install -e .
# Or using uv
uv install -e .
Configure your MCP client to use Lucidity by adding the appropriate configuration to your client settings.
Lucidity can be run in two transport modes:
For terminal-based interaction:
lucidity-mcp --transport stdio
For network-based communication:
lucidity-mcp --transport sse --port 8000
Lucidity provides flexible logging options:
# Log to a file (useful for stdio transport)
lucidity-mcp --transport stdio --log-file lucidity.log
# Set log level
lucidity-mcp --log-level DEBUG
When using Lucidity with an AI assistant, you can ask questions like:
The AI assistant will use Lucidity to analyze your git changes and provide structured feedback on various quality dimensions.
Lucidity analyzes code across multiple dimensions:
The analysis is git-aware, focusing specifically on changes rather than entire codebases, making it ideal for pre-commit reviews and continuous integration workflows.