Knowerage
Knowerage — Gestión de cobertura de análisis mediante IA
Servidor MCP local que realiza un seguimiento de la cobertura y la frescura del análisis de código heredado.
Fuente: github.com/MTimma/knowerage
Inicio rápido
Requisitos: Node.js 18 o superior — npx debe estar en tu PATH (viene con npm, que se incluye con Node).
Related MCP server: Atlas
Configuración del servidor MCP
Registra Knowerage donde tu host MCP espere las definiciones del servidor (por ejemplo, algunos clientes usan .cursor/mcp.json o .vscode/mcp.json; otros usan variables de entorno o una interfaz de usuario; sigue la documentación de tu host). Usa la misma estructura de entrada del servidor:
{
"mcpServers": {
"knowerage": {
"command": "npx",
"args": ["@mtimma/knowerage"],
"env": {
"KNOWERAGE_WORKSPACE_ROOT": "${workspaceFolder}",
"KNOWERAGE_AUTO_FULL_RECONCILE": "true"
}
}
}
}Reemplaza ${workspaceFolder} con la raíz de tu proyecto si tu host no expande esa variable.
KNOWERAGE_AUTO_FULL_RECONCILE es opcional: cuando no está configurado, está vacío o no tiene un valor verdadero, el observador de archivos está desactivado por defecto. Configúralo en 1, true, yes o on (recortado, sin distinguir entre mayúsculas y minúsculas) para activarlo. Cuando está activado, el servidor observa knowerage/ y, tras un breve periodo de espera, ejecuta knowerage_reconcile_all ante cambios en el sistema de archivos. Eso no es lo mismo que ejecutar una reconciliación completa después de cada llamada a una herramienta MCP; solo reacciona a los cambios de archivo en knowerage/. Las escrituras del registro en registry.json son ignoradas por el observador para que los guardados no entren en bucle.
Cómo usar Knowerage
Una vez configurado el servidor MCP, hablas con tu asistente en frases normales. No necesitas memorizar nombres de herramientas.
Analizar o documentar código
Señala los archivos, clases o comportamientos que te interesen. Por ejemplo:
Usando Knowerage, analiza el flujo de trabajo del algoritmo lógico en
main.java.Analiza la lógica de reconciliación y control de versiones de entidades de datos en el servicio ETL.
El asistente crea o actualiza archivos markdown en knowerage/analysis/ y registra la cobertura en knowerage/registry.json (consulta Cómo funciona a continuación).
Cobertura y brechas (mismo proyecto, chat posterior u otro agente)
Cuando ya tienes análisis en el árbol, puedes preguntar:
En porcentaje, ¿cuánto del código ha cubierto nuestro análisis?
¿Qué parte de este repositorio de código aún no se ha analizado?
Knowerage responde a esto a partir del registro y los asistentes de cobertura (por ejemplo, resumen, estado por archivo y listas de elementos obsoletos), no mediante suposiciones sobre el repositorio.
Enfoques alternativos
Instalar mediante npm
npx @mtimma/knowerageO compilar desde el código fuente
cargo build --release
./target/release/knowerage-mcpCómo funciona
El agente de IA crea archivos de análisis
.mdcon frontmatter YAML que declara el archivo fuente y los rangos de líneas cubiertosEl registro (
knowerage/registry.json) realiza un seguimiento de los registros de análisis con hashes SHA-256 para verificar la frescuraLas herramientas MCP exponen operaciones de creación, reconciliación, consulta y exportación
El agente dice "analiza X" → el flujo de trabajo completo se ejecuta automáticamente (crear → reconciliar → registrar)
Estructura del archivo de registro (knowerage/registry.json)
El formato en disco es un objeto JSON cuyas claves son rutas de análisis (cadenas). Cada valor es un registro (consulta contracts/contracts.md). Un ejemplo completo con dos registros se encuentra en examples/registry.sample.json.
flowchart TB
subgraph file["knowerage/registry.json"]
O["Top-level JSON object"]
O --> K["Each key: analysis markdown path, e.g. knowerage/analysis/.../topic.md"]
K --> V["Value: one RegistryRecord"]
end
subgraph rec["RegistryRecord fields"]
ap["analysis_path · source_path"]
cr["covered_ranges: [[start,end], ...]"]
h["analysis_hash · source_hash (sha256:… )"]
t["record_created_at · record_updated_at (ISO 8601)"]
st["status: fresh | stale_doc | stale_src | missing_src | dangling_doc"]
end
V --> recEl frontmatter para los archivos de análisis .md se especifica por separado en el documento de contratos (esquema de metadatos), no dentro de registry.json.
Herramientas MCP
Herramienta | Propósito |
| Crear/actualizar documento de análisis |
| Analizar y validar frontmatter |
| Reconciliar un registro de análisis |
| Reescaneo/reconstrucción completa |
| Rangos analizados vs. faltantes |
| Listar registros obsoletos/problemáticos |
| Instantánea completa del registro (misma forma que |
| Cobertura en árbol/agrupada |
| Exportar instantánea (JSON/YAML/TXT/HTML) |
| Exportación fragmentada de análisis seleccionados ( |
Estructura del proyecto
knowerage/ # Created per-project
├── analysis/ # Analysis markdown files
│ └── **/*.md
└── registry.json # Coverage registry
src/ # Rust MCP server
├── main.rs
├── lib.rs
├── types.rs
├── parser.rs
├── registry.rs
├── mcp.rs
├── security.rs
└── export.rsDocumentación
Onboarding del usuario — Configuración, ajustes, uso típico
INSTRUCTIONS.md — Instrucciones para el agente MCP
Contratos — Esquemas y contratos de API (registro + frontmatter)
Ejemplo de registro JSON — Contenido de ejemplo de
registry.json
Seguridad
Todas las rutas validadas contra la raíz del espacio de trabajo
Recorrido de rutas (
..) rechazadoEscrituras atómicas para el registro (a prueba de fallos)
Sin secretos en archivos de análisis o informes
Frescura basada en hash SHA-256 (sobrevive a git pull)
Licencia
MIT — copyright Martins Timma.
Partes de este proyecto fueron escritas o refinadas con asistentes de codificación de IA generativa. La revisión humana se aplica al diseño, al comportamiento sensible a la seguridad y a las versiones.
Available Tools
11 toolsknowerage_coverage_overviewA
Batch coverage overview for all source files. Returns per-source coverage percentage, analyzed/missing ranges, range attribution, stale records, and project-wide file/line totals. Uses fresh records only for coverage calculation. Optional extensions filter applies to sources, stale list, and project scan.
Inputs: extensions.
knowerage_create_or_update_docA
PRIMARY tool for persisting legacy/source code analysis: create or update an analysis markdown file under knowerage/analysis/ with YAML frontmatter (source path, covered line ranges, dates). Use this whenever the user asks to analyze, document, or explain a source file and Knowerage is in the tool list—do not use generic file-write tools alone for knowerage analysis paths, or the registry will not stay consistent. Follow with knowerage_reconcile_record on the same analysis_path.
Inputs: analysis_path (required), content (required), covered_lines (required), source_path (required).
knowerage_generate_bundleA
Export selected analysis markdown files into chunked NotebookLM-style bundles under output_dir: writes toc.md + combined.md for part 1, toc_N.md + combined_N.md for further parts when size limits require splitting, plus manifest.json (files, errors, part metadata). Every analysis_paths entry is validated under the workspace (no traversal). Per-file and per-part size limits apply (see contracts).
Inputs: analysis_paths (required), output_dir (required).
knowerage_get_file_statusA
Per-source coverage: total lines, analyzed vs missing ranges, and which analysis paths claim them. Prefer this over guessing from open files when answering 'what is documented for this source?' while Knowerage is enabled.
Inputs: source_path (required).
knowerage_get_treeC
Get a tree view of analysis records grouped by directory
Inputs: group_by, root.
knowerage_list_registryA
Return the full analysis coverage registry in one structured JSON response. USE THIS when you need an inventory of which source files are documented, where the analysis markdown lives, which line ranges are claimed, and freshness (fresh/stale_doc/stale_src/missing_src/dangling_doc). The records object is the same shape as the entire knowerage/registry.json file (sorted keys for stable reading). Call early when planning documentation work, finding gaps, or mapping analysis paths to sources—instead of opening registry.json by hand. Optional filters: analysis_path_prefix narrows by analysis key; statuses limits to given status values (same strings as in each record). After reconcile_record/reconcile_all, call again if you need the latest snapshot.
Inputs: analysis_path_prefix, statuses.
knowerage_list_staleB
List registry records filtered by staleness status
Inputs: statuses.
knowerage_parse_doc_metadataB
Parse YAML frontmatter from an analysis markdown file
Inputs: analysis_path (required).
knowerage_reconcile_allA
Rescan all analysis markdown files matching the glob and rebuild registry entries. Use after git pull, bulk edits, or when the registry may be empty or out of date; prefer reconcile_record when only one file changed.
Inputs: analysis_glob.
knowerage_reconcile_recordA
MANDATORY after every create_or_update_doc (or manual edit) to one analysis file: reconciles that analysis into knowerage/registry.json (hashes, covered_ranges, freshness). Call immediately after writing analysis content so coverage is recorded; skipping this leaves the registry wrong or stale.
Inputs: analysis_path (required).
registry_export_reportB
Export the registry as a report file in json, yaml, txt, or html format
Inputs: format (required), output_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct operation: coverage overview per batch, per-source status, registry listing with filters, doc creation/update, reconciliation, bundle generation, tree view, metadata parsing, stale listing, and export. Even overlapping tools like list_registry and list_stale are clearly differentiated by filters and purpose.
All tools use the 'knowerage_' prefix except for 'registry_export_report', which breaks the pattern. Within the prefixed group, naming follows a consistent verb_noun style (e.g., get_file_status, create_or_update_doc, reconcile_record). The one outlier lowers the score.
With 11 tools, the server covers the core operations of a documentation coverage system (CRUD-like, reconciliation, reporting, exploration) without being excessive. Each tool serves a clear purpose and none feel redundant.
The tool surface covers creation/update, reconciliation (single and bulk), listing, coverage overview, bundle generation, metadata parsing, and export. Missing a direct delete tool for docs, but the create_or_update tool may handle updates. Overall, agents can perform most tasks without dead ends.
Related MCP Connectors
MCP Server for an Agent Task Marketplace
MCP server for querying Forkast documentation
Repository knowledge graph MCP server for codebase understanding and debugging.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceMCP server for collecting code from files and directories into a single markdown document.28MIT
- AlicenseNot gradedqualityCmaintenanceLocal-first MCP server for querying multi-repo engineering documentation artifacts from a SQLite corpus.5 npmAGPL 3.0
- AlicenseNot gradedqualityCmaintenanceLocal-first MCP server that provides project context, verification gates, and structured tools for coding agents to discover knowledge, run diagnostics, and execute allowlisted commands within a repository.MIT
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that indexes documentation from URLs/files into a vector database, enabling coding agents to search and use up-to-date library and API documentation.1-