lmstudio-auditor
✨ Características principales
Crítico local de coste cero: Descarga las iteraciones pesadas de revisión de código a tu GPU local mediante LM Studio sin gastar tokens en la nube.
Centinela AST de submilisegundo: Detecta errores de sintaxis y llamadas de runtime peligrosas (
eval,exec,os.system,subprocess) antes de desperdiciar ciclos de GPU.Contrato determinista: Aplica salidas estructuradas (
APPROVEDvsREJECTEDcon comentarios específicos por línea) para que el agente refactorice el código automáticamente sin intervención humana.Sumidero de datos dual (volante de DPO):
SQLite (
audit_history.db): Registra duración, categorías y métricas.JSON por auditoría (
audit_logs/): Almacena registros de auditoría individuales para crear fácilmente conjuntos de datos de DPO / fine-tuning a partir de intentos emparejados rechazados/aprobados.
Related MCP server: tar-engine
🚀 Inicio rápido
1. Requisitos previos
Python 3.10+
LM Studio ejecutando un servidor local compatible con OpenAI (
http://localhost:1234/v1)Antigravity o cualquier cliente compatible con MCP
Instalación
# Clone the repository
git clone [https://github.com/xTanThaix/mcp-local-auditor.git](https://github.com/xTanThaix/mcp-local-auditor.git)
cd mcp-local-auditor
# Set up virtual environment
python -m venv .venv
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt3. Registrar el servidor MCP
Abre tu archivo de configuración MCP de Antigravity:
Windows:
%USERPROFILE%\.gemini\config\mcp_config.jsonmacOS / Linux:
~/.gemini/config/mcp_config.json
Añade la definición del servidor dentro de mcpServers:
{
"mcpServers": {
"lmstudio-auditor": {
"command": "D:\\Hucdeline\\.venv\\Scripts\\python.exe",
"args": ["D:\\Hucdeline\\auditor_bridge.py"]
}
}
}Nota: Reemplaza
D:\\Hucdelinecon la ruta real de tu directorio del proyecto.
4. Configurar LM Studio
Abre LM Studio y carga cualquier modelo de codificación ajustado por instrucciones (p. ej.,
Qwen-2.5-Coder,DeepSeek-Coder,Llama-3).Ve a la pestaña Servidor local (Developer).
Configura el puerto en
...(e.g.,1234)y haz clic en Iniciar servidor.
🤖 Configuración del bucle del agente (regla / habilidad personalizada)
Añade la siguiente regla a tu agente de Antigravity (mcp-studio-loop):
# Mandatory MCP Code Audit Protocol
Every time code is generated or refactored, you MUST invoke the `audit_submission` tool:
- Arguments: `task_goal`, `output_content`, `strict_rules`
- If STATUS == "REJECTED": Read `ACTIONABLE_FEEDBACK`, refactor the code, and re-submit.
- If STATUS == "APPROVED": Output the final solution to the user.
- Maximum retry limit: 5 attempts before breaking loop.Configurar LM Studio Abre LM Studio y carga cualquier modelo de codificación ajustado por instrucciones (p. ej., Qwen-2.5-Coder, DeepSeek-Coder, Llama-3).
Ve a la pestaña Servidor local.
Configura el puerto en xxxx y haz clic en Iniciar servidor.
🤖 Configuración del bucle del agente (regla / habilidad personalizada) Añade la siguiente regla a tu agente de Antigravity (mcp-studio-loop):
Markdown
Protocolo obligatorio de auditoría de código MCP
Cada vez que se genere o refactorice código, DEBES invocar la herramienta audit_submission:
Argumentos:
task_goal,output_content,strict_rulesSi STATUS == "REJECTED": Lee
ACTIONABLE_FEEDBACK, refactoriza el código y vuelve a enviarlo.Si STATUS == "APPROVED": Muestra la solución final al usuario.
Límite máximo de reintentos: 5 intentos antes de romper el bucle. 🧪 Pruebas Ejecuta la suite de Pytest incluida para verificar las comprobaciones de AST, las migraciones de SQLite y las respuestas simuladas:
Bash pytest test_auditor.py -v
📸 Auditoría real en acción (Ejemplo de uso / Ejemplo de utilización)
Aquí tienes un ejemplo de MCP Local Auditor rechazando una ruta de código no optimizada con comentarios accionables, lo que incita al agente de codificación a autocorregirse y volver a verificar:
Ejemplo de uso: Después de que pasen las pruebas, audita cada archivo modificado uno por uno con la herramienta "lmstudio-auditor".
💖 Soporte y donaciones Si este proyecto te ha ahorrado costes de API y te ha ayudado a optimizar tu flujo de trabajo local con LLM, considera apoyar el desarrollo:
Ko-fi: https://ko-fi.com/xtanthaix
GitHub Sponsors: Haz clic en el botón Sponsor de este repositorio
📄 Licencia Licencia MIT. Gratuita para uso de código abierto y comercial.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityBmaintenanceCaptures code modifications via AST analysis, generates reusable rules, and injects them into AI agent context with version audit and token-budgeted rule retrieval.2810Apache 2.0
- AlicenseNot gradedqualityAmaintenanceAudits AI agent skills for safety using static, semantic, adversarial, and supply-chain analysis, providing scores and risk flags. Can be run via CLI, CI, or as an MCP tool from Claude Code, Cursor, and Codex.2Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to scan code for security vulnerabilities before execution, supporting Python and JavaScript/TypeScript with deterministic AST-based analysis and optional Solana micropayments.
- AlicenseAqualityBmaintenanceEnforces AST-based architectural guardrails on AI-generated code, blocking writes that violate maintainability, security, or complexity rules and prompting immediate refactoring.2MIT
Related MCP Connectors
Deterministic AI code review, with an audit record. Governance inside the agent loop.
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
Agentic code review, no signup to try: reality gates + frontier-model review, with veto.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xTanTHaix/mcp-local-auditor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server