Skip to main content
Glama
hyperb1iss
by hyperb1iss

✨ Lucidez MCP 🔍

Python 3.13+ Licencia Estado Estilo de código Comprobación de tipo

Claridad en el código, confianza en la creación

Lucidity es un servidor de Protocolo de Contexto de Modelo (MCP) diseñado para mejorar la calidad del código generado por IA mediante un análisis inteligente basado en indicaciones. Al proporcionar una guía estructurada a los asistentes de codificación de IA, Lucidity ayuda a identificar y abordar problemas de calidad comunes, lo que resulta en un código más limpio, más fácil de mantener y más robusto.

Antes de comprometerte, ¡pídele a Lucidity que analice los cambios en lugar de codificarte en tu vibración para vivir una pesadilla infernal! 😱 💥 🚫

💫 Características

  • 🔮 Detección integral de problemas : cubre 10 dimensiones de calidad críticas, desde la complejidad hasta las vulnerabilidades de seguridad.

  • 🔄 Análisis contextual : compara los cambios con el código original para identificar modificaciones no deseadas

  • 🌐 Independiente del lenguaje : funciona con cualquier lenguaje de programación que entienda el asistente de IA.

  • 🎯 Análisis enfocado : opción para abordar tipos de problemas específicos según las necesidades del proyecto

  • 📝 Resultados estructurados : guía a la IA para brindar comentarios prácticos con recomendaciones claras

  • 🤖 Integración con MCP : integración perfecta con Claude y otros asistentes de IA compatibles con MCP

  • 🪶 Implementación liviana : diseño de servidor simple con dependencias mínimas

  • 🧩 Marco extensible : es fácil agregar nuevos tipos de problemas o refinar los criterios de análisis

  • 🔀 Transporte flexible : admite tanto stdio para la interacción basada en terminal como SSE para la comunicación basada en red

  • 🔄 Análisis compatible con Git : analiza los cambios directamente desde Git diff, lo que lo hace ideal para revisiones previas a la confirmación.

Related MCP server: CodeAlive MCP

🚀 Instalación

# Clone the repository
git clone https://github.com/hyperbliss/lucidity-mcp.git
cd lucidity-mcp

# Set up a virtual environment with UV
uv venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies with UV
uv sync

📋 Requisitos previos

  • Python 3.13 o superior

  • Git (para analizar cambios de código)

  • Gestor de paquetes UV (recomendado para la gestión de dependencias)

🔮 Inicio rápido

Ejecutar el servidor Lucidity

# Start with stdio transport (for terminal use)
lucidity-mcp

# Start with SSE transport (for network use)
lucidity-mcp --transport sse --host 127.0.0.1 --port 6969

# Run with debug logging
lucidity-mcp --debug

# Run with file logging
lucidity-mcp --log-file lucidity.log

Uso con asistentes de IA

  1. Iniciar Lucidity en modo SSE:

    lucidity-mcp --transport sse
  2. Conecte su asistente de IA utilizando la URI del protocolo MCP:

    sse://localhost:6969/sse
  3. ¡La IA ahora puede invocar la herramienta analyze_changes para obtener comentarios sobre la calidad del código!

🧠 Dimensiones del análisis

Lucidity analiza el código en 10 dimensiones críticas de calidad:

  1. Complejidad innecesaria : identifica algoritmos excesivamente complejos, abstracciones excesivas y lógica complicada.

  2. Abstracciones deficientes : detecta abstracciones defectuosas o inapropiadas y una separación poco clara de las preocupaciones

  3. Eliminación de código no intencionada : detecta la eliminación accidental de funciones o validaciones críticas

  4. Componentes alucinados : encuentra referencias a funciones, clases o API inexistentes

  5. Inconsistencias de estilo : detecta desviaciones de los estándares y convenciones de codificación del proyecto.

  6. Vulnerabilidades de seguridad : identifica posibles problemas de seguridad en los cambios de código

  7. Problemas de rendimiento : detecta algoritmos u operaciones ineficientes que podrían afectar el rendimiento

  8. Duplicación de código : encuentra lógica o funcionalidad repetida que debe refactorizarse

  9. Manejo de errores incompleto : puntos faltantes o manejo inadecuado de excepciones

  10. Brechas de cobertura de pruebas : identifica pruebas faltantes para funcionalidades críticas

📊 Ejemplos de consultas del Asistente de IA

Con un asistente de IA conectado a Lucidity, prueba estas consultas:

  • Analizar la calidad del código en mis últimos cambios de Git.

  • "Comprobar vulnerabilidades de seguridad en mis cambios de JavaScript"

  • "Asegurarme de que mi código Python siga las mejores prácticas"

  • "Identificar cualquier problema de rendimiento en mis cambios de código recientes"

  • "¿Hay algún efecto secundario no deseado en mi reciente refactorización?"

  • "Ayúdame a mejorar las abstracciones en mi código"

  • "Comprobar si he eliminado accidentalmente alguna validación importante"

  • "Encuentra alguna llamada API alucinada en mi última confirmación"

  • "¿Mi gestión de errores es completa y robusta?"

  • "¿Existen lagunas en la cobertura de pruebas en mi nueva función?"

🛠️ Herramientas MCP disponibles

Herramientas

  • analyze_changes : prepara los cambios de Git para su análisis a través de MCP.

    • Parámetros:

      • workspace_root : El directorio raíz del repositorio workspace/git

      • path : Ruta de archivo específica opcional para analizar

💻 Desarrollo

Lucidity utiliza UV para la gestión de dependencias y los flujos de trabajo de desarrollo. UV es un gestor y solucionador de paquetes de Python rápido y fiable.

# Update dependencies
uv sync

# Run tests
pytest

# Run linting
ruff check .

# Run type checking
mypy .

🔧 Comportamiento de registro

Lucidity maneja el registro de manera diferente según el transporte:

  • Transporte SSE : el registro completo de la consola está habilitado

  • Transporte de Stdio con --log-file : todos los registros van al archivo, la consola está deshabilitada

  • Transporte de Stdio sin --log-file : solo las advertencias y los errores van a stderr, los registros de información están deshabilitados

Esto garantiza que la comunicación stdio no se interrumpa por registros que aparecen en stdout.

🎛️ Opciones de línea de comandos

usage: lucidity-mcp [-h] [--debug] [--host HOST] [--port PORT] [--transport {stdio,sse}]
                [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--verbose]
                [--log-file LOG_FILE]

options:
  -h, --help            show this help message and exit
  --debug               Enable debug logging
  --host HOST           Host to bind the server to (use 0.0.0.0 for all interfaces)
  --port PORT           Port to listen on for network connections
  --transport {stdio,sse}
                        Transport type to use (stdio for terminal, sse for network)
  --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Set the logging level
  --verbose             Enable verbose logging for HTTP requests
  --log-file LOG_FILE   Path to log file (required for stdio transport if logs enabled)

🤝 Contribuyendo

¡Agradecemos sus contribuciones! No dude en enviar una solicitud de incorporación de cambios.

  1. Bifurcar el repositorio

  2. Crea tu rama de funciones ( git checkout -b feature/amazing-feature )

  3. Configura tu entorno de desarrollo con UV

  4. Realiza tus cambios

  5. Ejecutar pruebas y linting

  6. Confirme sus cambios ( git commit -m 'Add some amazing feature' )

  7. Empujar a la rama ( git push origin feature/amazing-feature )

  8. Abrir una solicitud de extracción

📝 Licencia

Este proyecto está licenciado bajo la Licencia Apache 2.0: consulte el archivo de LICENCIA para obtener más detalles.


Creado por Stefanie Jane 🌠

Si te resulta útil Lucidity, cómprame un Monster Ultra Violet ⚡️

Available Tools

1 tool
analyze_changesA

Prepare git changes for analysis through MCP.

This tool examines the current git diff, extracts changed code, and prepares structured data with context for the AI to analyze.

The tool doesn't perform analysis itself - it formats the git diff data and provides analysis instructions which get passed back to the AI model through the Model Context Protocol.

Args: workspace_root: The root directory of the workspace/git repository path: Optional specific file path to analyze

Returns: Structured git diff data with analysis instructions for the AI

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
workspace_rootNo

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool 'examines the current git diff' and 'formats the git diff data,' implying it's a read-only operation without side effects. However, it doesn't mention behavioral traits like error handling, performance considerations, or specific constraints (e.g., git repository must be initialized). It adds some context but isn't comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose. It uses bullet points for Args and Returns, which improves structure. However, some sentences could be more concise (e.g., 'through the Model Context Protocol' is slightly redundant), and the overall flow is clear but not maximally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, 0% schema coverage, and no output schema, the description is moderately complete. It covers purpose, parameters, and return value at a high level, but lacks details on error cases, output structure, or operational constraints. For a tool with two parameters and no structured support, it's adequate but has gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains both parameters: 'workspace_root: The root directory of the workspace/git repository' and 'path: Optional specific file path to analyze.' This adds clear meaning beyond the schema's basic titles. However, it doesn't detail format constraints (e.g., absolute vs. relative paths), so it's not a perfect 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'examines the current git diff, extracts changed code, and prepares structured data with context for the AI to analyze.' It specifies the verb (examines, extracts, prepares) and resource (git diff/changed code). However, since there are no sibling tools, it doesn't need to distinguish from alternatives, so it doesn't reach the full 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating 'Prepare git changes for analysis through MCP' and 'The tool doesn't perform analysis itself,' which suggests it's a preprocessing step. However, it lacks explicit guidance on when to use it versus other potential tools (e.g., direct analysis tools) or prerequisites, as there are no siblings to compare against.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedanalyze_changes

TDQS

A3.5/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'analyze_changes' has a clearly defined and distinct purpose of preparing git changes for analysis, making it impossible to confuse with other tools.

Naming Consistency5/5

The single tool name 'analyze_changes' follows a clear verb_noun pattern (analyze + changes). Since there is only one tool, there is no inconsistency to evaluate, and the naming is straightforward and descriptive.

Tool Count2/5

A single tool is too few for most practical server purposes, as it limits functionality and scope. While the tool is well-defined, a server with only one tool feels thin and incomplete for handling git analysis or broader tasks, indicating a mismatch in scope.

Completeness2/5

The server's domain appears to be git change analysis, but with only one tool that prepares data without performing analysis, there are significant gaps. Missing operations like actual analysis, history review, or commit management make the surface severely incomplete for the inferred purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.
    91
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server that helps AI coding assistants identify critical design issues in code, rather than just focusing on cosmetic problems when asked to improve code.
    1
    14 npm
    27
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server providing pre-curated canonical memory, prose/code provenance checking, and benchmark metrics to improve accuracy and reduce costs across AI tools.
    AGPL 3.0