Tree-sitter-powered MCP server for project-scoped structural analysis, lexical retrieval, and semantic description indexing.
- Project registry with explicit project names and root paths
- Project-scoped file parsing and AST skeleton generation
- Symbol extraction with line-accurate spans
- Recursive project ingestion for fast rebuilds
- Lexical search built from indexed document text and terms
- Semantic description pipeline for package, module, file, class, method, and chunk scopes
- Agent abstraction for semantic generation with fake, shell, and library-backed Hermes adapters
- Incremental freshness tracking and service-wide rate limiting for agent calls
- Config-driven logging and runtime behavior
- Hermes harness tooling for deterministic one-file and project-level verification
- File-watcher support for diff-based refresh workflows
- HTTP control plane for project lifecycle, ingestion jobs, and source drill-through
The system is organized as a layered pipeline:
-
Project registry and persistence
project_statestores the per-project metadata.- Each project has its own sqlite database for structural records.
-
Tree-sitter structural layer
filesstores file metadata, parse status, root node spans, and hashes.symbolsstores classes, functions, and methods with precise source ranges.semantic_chunkinguses the AST to split long bodies into meaningful chunks.
-
Lexical retrieval layer
lexical_documentsstores searchable text for project/file/symbol scopes.lexical_termssupports token-level lookup and ranking.
-
Semantic description layer
semantic_agentdefines the description-generation contract.vector_indexcoordinates semantic record creation and indexing.freshnesstracks fresh, dirty, and obsolete semantic state.rate_limitprotects the agent backends from overload.
-
Runtime orchestration
watcherfeeds file-system diffs into the refresh path.hermes_harnessandscripts/hermes_one_file_harness.pysupport repeatable validation.logging_configandconfig.tomlkeep runtime behavior explicit and reproducible.
python scripts/install.pyThe installer validates local prerequisites before syncing dependencies:
- Python 3.11 or newer
uvfswatch- Docker with the Compose plugin
It then runs uv sync --all-extras --locked, starts the local Qdrant container idempotently, and verifies that the core packages import cleanly.
uv sync
uv run agent-code-analyzer
uv run agent-code-analyzer-apiadd_project(project="demo", root_path="/path/to/repo", mode="directory")
parse_source(project="demo", file_path="src/main.py")
ingest_project_tree(project="demo", refresh=true)
Current parsing coverage includes common source and config formats such as:
- Python
- JavaScript / TypeScript
- Java
- Go
- Rust
- PHP
- Ruby
- C / C++ / C#
- Bash
- YAML
- HTML
- CSS
- SQL
Unsupported extensions return a documented fallback instead of failing noisily.
Active planning documents live under docs/plans/, and finished plans are moved to docs/complete/.
Current active plan:
docs/plans/2026-06-21-agent-code-analyzer-instrumentation-control-frontend-plan.md
Superseded drafts merged into the active plan:
docs/plans/2026-06-21-agent-code-analyzer-control-plane-dashboard-plan.mddocs/plans/2026-06-21-agent-code-analyzer-ingestion-recovery-gap-plan.md
add_projectlist_projectssearch_projectsingest_project_tree
parse_sourcegenerate_ast_skeletonlist_code_symbolsdetect_source_languageread_file_excerpt
- semantic description ingestion through the indexing pipeline
- Hermes-backed agent adapters
- freshness and rate-limit controls
- file-watcher driven refreshes