Skip to main content
Glama
atototo

wiki-mcp-hub

by atototo
README.md
# wiki-mcp-hub

`wiki-mcp-hub` is a lightweight TypeScript MCP search server for repo-local
`llm-wiki/` folders.

It is intentionally lexical-only:

- SQLite FTS5 search
- Markdown scanning
- no embeddings
- no reranker
- no LLM dependency
- no API keys

## Quick Start

```bash
npm install
npm run build
cp config/wikis.example.yaml config/wikis.yaml
```

Edit `config/wikis.yaml`, then build the index:

```bash
npm run start -- index
```

Run the HTTP server:

```bash
npm run start -- serve --host 127.0.0.1 --port 38894
```

Search from the CLI:

```bash
npm run start -- search "deployment runbook"
```

Run the MCP stdio server:

```bash
npm run start -- mcp
```

## Codex Plugin

This repository is also a Codex plugin root. The plugin files are:

- `.codex-plugin/plugin.json`
- `.mcp.json`
- `skills/wiki-mcp-hub/SKILL.md`

After installing the plugin, Codex can call:

- `wiki_search`
- `wiki_reindex`
- `wiki_list_sources`
- `wiki_health`

## Configuration

`config/wikis.yaml` is local/private and ignored by git.

```yaml
wikis:
  - name: project-a
    rootPath: /path/to/project-a
    indexedSubdirs: [llm-wiki]

global:
  indexDir: ./.wiki-index
```

Missing wiki roots are skipped by default when `optional: true` is set on a
source.

## HTTP API

- `GET /health`
- `GET /sources`
- `GET /search?q=...&topK=5`
- `POST /index`

## Privacy

The index is local. Do not commit:

- `config/wikis.yaml`
- `.wiki-index/`
- real wiki contents
- `.env`