markindex
MarkIndex is a Markdown document retrieval tool for AI agents that takes a "no vectors, structure-first" approach. It parses each Markdown file into a tree made up of its own sections, and stores these trees, the raw lines, and a mixed Chinese-English BM25 index in a single SQLite file. Agents can browse the "library → folder → document → section" hierarchy through five read-only tools and read the original text with line numbers, and every piece of evidence can be cited in the form [doc_path, L<start>-<end>]. The project is inspired by VectifyAI/PageIndex and is an independent, unofficial TypeScript implementation focused on Markdown, with no affiliation with or endorsement from VectifyAI. Index building requires no model calls or embedding steps, and processing 367 SEC filings (1.8 million lines) takes only a few minutes on a laptop CPU. It provides a CLI, an MCP server, and AI SDK integration, and supports incremental indexing, budget-limited tool responses, Chinese word segmentation, and trigram substring indexing.