# MarkIndex

> MarkIndex is an open-source MCP server for knowledge and memory. Structure-first search over large Markdown libraries, with no embeddings or vector store. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Repository:** https://github.com/jackjin1997/markindex
- **MCP Registry name:** io.github.jackjin1997/markindex
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-15

## About

Each Markdown file is parsed into a tree of its own sections, then stored with the original lines and a mixed Chinese and English BM25 index in a single SQLite file. An agent walks library, folder, document and section with five read-only tools and reads original text with line numbers, so evidence can be cited as [doc_path, L<start>-<end>].

Indexing is deterministic and does not call a model; LLMs are optional and used only for node summaries, document descriptions and a built-in retrieve() loop through the AI SDK. Keyword search uses Intl.Segmenter segmentation for Chinese and mixed text, with a trigram substring pass. Tool replies are JSON envelopes under a 95,000-character budget, with next-step hints.

It is an independent TypeScript take on the PageIndex idea, unaffiliated with VectifyAI. Requires Node.js 22.12 or newer; index with markindex index ./docs, then serve with markindex mcp ./docs.

## Features

- **Section trees:** Parses headings, preface text and headingless documents so every line belongs to one node.
- **BM25 plus trigram:** Search handles Chinese, English and identifiers like ISO-27001.
- **Citable evidence:** Answers cite document path and line range.
- **Incremental indexing:** Rebuilds only changed files, compared by content hash.
- **Optional summaries:** Add model-written summaries with rate limits you set.
- **Retrieval eval:** Measure retrieval quality on your own questions.

## Good for

- Give an agent access to policy or manual libraries
- Search bilingual Chinese and English documents
- Cite exact lines from long filings or guidelines
- Run an agent over a docs folder without a vector database

## Install

### Claude Code (Terminal)

```sh
claude mcp add markindex -- npx -y markindex
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "markindex": {
      "command": "npx",
      "args": [
        "-y",
        "markindex"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "markindex": {
      "command": "npx",
      "args": [
        "-y",
        "markindex"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "markindex": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "markindex"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "markindex": {
      "command": "npx",
      "args": [
        "-y",
        "markindex"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "markindex": {
      "command": "npx",
      "args": [
        "-y",
        "markindex"
      ]
    }
  }
}
```

## FAQ

### Does it use embeddings?

No. The document's own structure plus BM25 is the index.

### Does indexing call an LLM?

No; LLMs are optional for summaries only.

### What Node version?

Node.js 22.12 or newer.

### Where is the index stored?

In <root>/.markindex/index.db, or a path set with --db; use a local disk.

### Is MarkIndex free?

Yes. MarkIndex is open source, so you can use and self-host it for free.

### How do I add MarkIndex to Claude Code?

Run this command in your terminal: claude mcp add markindex -- npx -y markindex

### What are the best alternatives to MarkIndex?

The closest alternatives to MarkIndex are scree, indexio, jDocmunch MCP, Open Context Engine and Semlith.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [scree](https://ai-powered.com/mcp/scree): scree is an open-source MCP server for knowledge and memory.
- [indexio](https://ai-powered.com/mcp/indexio): indexio is an open-source MCP server for developer tools.
- [jDocmunch MCP](https://ai-powered.com/mcp/jdocmunch-mcp): jDocmunch MCP is an MCP server for developer tools.
- [Open Context Engine](https://ai-powered.com/mcp/open-context-engine): Open Context Engine is an open-source MCP server for developer tools.
- [Semlith](https://ai-powered.com/mcp/semlith): Semlith is a freemium MCP server for developer tools.
- [Devrag](https://ai-powered.com/mcp/devrag): Devrag is an open-source MCP server for developer tools.
- [doc-scraper](https://ai-powered.com/mcp/doc-scraper): doc-scraper is an open-source MCP server for web search and scraping.
- [Markdown Vault MCP](https://ai-powered.com/mcp/markdown-vault-mcp): Markdown Vault MCP is a free MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/markindex
