Content
# Tool List
Local-first desktop knowledge base for AI Agents. Built with **Tauri v2 + React + Python**, supporting **OpenAI-compatible embedding and reranking models**, **MinerU document parsing**, built-in **MCP Server** for Claude Code integration, and sidebar integration with **LLM conversation (RAG)** module.
[](LICENSE)
[](https://tauri.app/)
[](https://python.org)
[](README_EN.md)
## Features
### Document Management
- **Multi-format support**: PDF, DOCX, PPTX, XLSX, images, HTML, Markdown, plain text
- **Automatic pipeline**: upload → MinerU precise parsing → chunking → vector embedding → indexing — fully automatic
- **Document splitting**: large PDFs (>200 pages) automatically split into manageable chunks, classified under parent documents in file tree
- **File manager**: similar to resource manager style, supporting folder tree, renaming, moving, deleting, opening original files
- **Markdown preview**: complete rendering, supporting LaTeX math formulas (KaTeX), HTML tables with math, section lazy loading, scrolling to chunks
- **Document editing**: supporting editing of parsed Markdown documents, automatically re-indexing after saving
### Knowledge Base Management
- **Multiple knowledge bases**: independent indexing and embedding model binding, overview page statistics
- **Display modes**: card, grid, compact view — supporting sorting and pinning
- **Hybrid search**: dense vector + binary keyword (FTS) + reranking, keyword priority strategy; supporting context window to view adjacent chunks; supporting precise jumping by chunk index
- **Global search**: one-click search across all knowledge bases, configurable search methods and context window
### AI Model Integration (OpenAI-compatible)
- **Embedding models**: OpenAI, Ollama, vLLM, LiteLLM — any `/v1/embeddings` endpoint
- **Reranking**: Jina AI, Cohere, Qwen3-rerank — any compatible endpoint
- **LLM conversation**: supporting any OpenAI-compatible large model, optional knowledge base RAG retrieval enhancement
- **Connection test**: one-click test of various API connections in settings
### LLM Conversation (RAG)
- Sidebar built-in conversation module, supporting multi-turn conversation management
- **Tool calling**: LLM automatically calls search, document list, document reading, chunk retrieval, etc.; chat configurable context window defaults
- **Streaming transmission (SSE)**: real-time character-by-character display of responses, 50ms throttling rendering
- **Multi-knowledge base selection**: supporting simultaneous retrieval of multiple knowledge bases, access isolation
- **Reference annotation**: responses with `[N]` superscript and `[M-N]` range markers, click to preview original chunk, supporting navigation to chunk location
- **Conversation management**: renaming, deleting, regenerating, copying messages
- **Code block copying**, math formula rendering, auto-scrolling switch
### MCP Server
18 tools for AI Agents — packaged as a single executable, requiring the application to be running (or minimized to tray):
| Tool | Description |
|------|------|
| `search_knowledge_base` | Hybrid search (vector + keyword + reranking), supporting context window |
| `search_all_knowledge_bases` | Global search across all knowledge bases, no need to know target knowledge base beforehand |
| `search_document` | Search within a single document, precise after locking target document |
| `list_knowledge_bases` | List all knowledge bases and statistics, detect isolated data |
| `list_documents` | List all documents and metadata in knowledge base |
| `get_document` | Get document content, supporting `max_chars` truncation protection |
| `get_document_summary` | Get document summary (metadata + title outline + chunk preview), no content loading |
| `get_document_chunks` | Get document chunks, supporting `limit` parameter (positive for top N, negative for bottom N, 0 for all) |
| `get_chunk_by_index` | Get single chunk by doc_id + chunk_index |
| `create_knowledge_base` | Create new knowledge base |
| `delete_knowledge_base` | Delete knowledge base and all data |
| `rename_knowledge_base` | Rename knowledge base and update description |
| `add_document` | Import text or parse file (PDF/DOCX/PPTX/XLSX/image/HTML) |
| `delete_document` | Delete document and chunks |
| `rename_document` | Rename document |
| `move_document` | Move document to specified folder path |
| `list_folders` | List all folder paths in knowledge base |
| `clean_orphans` | Clean isolated data (LanceDB tables, documents, backup files) |
### Desktop UI
- Custom frameless window, supporting dark/light/system theme
- English and Chinese internationalization, built-in user guide
- **System tray** — minimize window to tray, backend keeps running for MCP
- **Collapsible sidebar**: knowledge base + conversation record partition, independent scrolling
- Settings panel: navigation tab classification (general/model/conversation/data), configurable tool call limit
- **Data management**: knowledge base ZIP import/export, settings.json configuration import/export, orphan data one-click cleanup
## Quick Start
### Environment Requirements
- **Node.js** ≥ 18, **Rust** ≥ 1.75, **Python** ≥ 3.11, **uv** (Python package manager)
### Installation and Running
```bash
git clone https://github.com/1617110693/Local-Agent-Knowledge-Base.git
cd super-knowledge-base
npm install
cd services/python-backend && uv sync && cd ../..
npm run tauri dev
```
### First Use
First launch will automatically pop up user guide. Core steps:
1. **Settings** → configure embedding model API and MinerU token (required), optional reranking and LLM API configuration
2. Create **knowledge base** → upload documents
3. Search or connect to Claude Code using MCP
4. Configure LLM API → use sidebar conversation module for intelligent Q&A
## MCP Server Configuration
Open application → Settings → click **"Configure Claude Code MCP"** to auto-generate configuration.
**Development mode** (auto-detection):
```json
{
"mcpServers": {
"skb": {
"command": "uv",
"args": ["run", "--directory", "/path/to/services/python-backend", "knowledge-backend", "mcp"],
"env": { "KNOWLEDGE_BASE_DATA_DIR": "~/.super-knowledge-base" }
}
}
}
```
> Application must be running (or minimized to tray) for MCP to work properly. API keys read from `settings.json`, no need to repeat configuration.
## Tech Stack
| Layer | Technology |
|------|------|
| Desktop framework | Tauri v2 (Rust) |
| Frontend | React 18 + TypeScript + Vite + Tailwind CSS |
| Backend | FastAPI + FastMCP (Python) |
| Vector database | LanceDB (embedded) |
| Document parsing | MinerU API (precise parsing) |
| Math rendering | KaTeX + remark-math |
## Project Structure
```
super-knowledge-base/
├── apps/desktop/ # Tauri v2 + React application
│ ├── src-tauri/ # Rust backend
│ └── src/ # React frontend
├── services/python-backend/ # Python backend (REST API + MCP shared executable)
└── scripts/ # Build and deployment scripts
```
## Data Storage
All data stored locally in `~/.super-knowledge-base/`:
```
~/.super-knowledge-base/
├── settings.json # Application configuration
├── knowledge_bases.json # Knowledge base registry
├── kb_{uuid}/ # Knowledge base
│ └── docs/{doc_id}/ # Documents (metadata.json + full.md)
└── lancedb_data/ # Vector index
```
## License
MIT © 2026 SKB Contributors