codeshield-verify-mcp
v0.6.4
Published
MCP server and CLI that prevents LLM hallucinations by verifying code against known libraries and frameworks
Downloads
763
Maintainers
Readme
CodeShield MCP
Prevenir alucinaciones del LLM antes de que genere código.
Estado Actual
Versión: 0.6.2 (ALPHA) - npm package
Modos de Uso
| Modo | Descripción | |------|-------------| | MCP Server | Integración con Claude Code, Claude CLI, Gemini CLI | | CLI | Comandos standalone: verify, scan, explain, audit-deps, context |
Herramientas MCP
| Herramienta | Descripción |
|-------------|-------------|
| analyze_prompt | Analiza prompts, detecta frameworks e intenciones |
| verify_code | Verifica código generado (Python, JS, TS) |
| suggest_similar_name | Sugiere correcciones para typos |
| fix_code | Corrige automáticamente errores |
| index_project | Indexa proyecto con cache en memoria |
| cache_stats | Estadísticas del cache |
| cache_clear | Limpia el cache |
Comandos CLI
| Comando | Descripción |
|---------|-------------|
| codeshield verify <file> | Verificar archivo |
| codeshield scan [dir] | Escanear proyecto completo |
| codeshield audit-deps <file> | Auditar CVEs en requirements.txt |
| codeshield context save/list/restore/delete | Persistencia de contexto |
| codeshield serve | Iniciar servidor MCP |
Instalación
Desde npm
npm install -g codeshield-verify-mcpDesde código fuente
npm install
npm run buildConfiguración MCP (Claude Desktop)
{
"mcpServers": {
"codeshield": {
"command": "npx",
"args": ["codeshield-verify-mcp", "serve"]
}
}
}Seguridad
- Path traversal protection en scanProject() e indexProject()
- CVE database para dependency audit (21 packages, CVEs 2023-2024)
- Input validation (100KB limit en CLI, 1MB en MCP)
- ReDoS prevention con memoization y early exit
- Race condition protection con file locking en context-store
- Atomic writes con temp file + rename
- 14 security tests cubriendo: race conditions, ReDoS, path traversal, input validation
Testing
npm test # 99 tests incluyendo 14 de seguridadLicencia
MIT License - ver LICENSE para detalles.
