KnowledgeBase MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KB_VOLUME | No | Knowledge base root directory (the Database folder). | /Volumes/KnowledgeBase/Database |
| KB_CACHE_DIR | No | Location where kb-files caches its tool list. | ~/.cache/kb-mcp |
| KB_FS_GATEWAY | No | Set to 0 to restore the old kb-files startup method. | 1 |
| KB_FS_VERSION | No | Pinned version of the official filesystem service used by setup.sh and npx fallback. | 2.0.1 |
| KB_IMPORT_DIRS | No | Additional directories kb_import_file is allowed to read, separated by ':'. | |
| KB_AUTO_REINDEX | No | Background index scan on startup and re-mount; set to 0 to disable. | 1 |
| KB_PROBE_TIMEOUT | No | Disk check timeout in seconds. | 4 |
| KB_SQLITE_JOURNAL | No | SQLite journal mode for the index database. Changing it back to WAL is not recommended. | DELETE |
| KB_ENABLE_SEMANTIC | No | Set to '1' to enable vector semantic retrieval. Also add --with fastembed to the command args. | |
| KB_FS_START_TIMEOUT | No | Official filesystem service startup timeout in seconds. | 45 |
| KB_REQUIRE_EXTERNAL | No | Require the path to be on an external volume when the path is under /Volumes/. | 1 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| kb_statusA | Report the knowledge-base drive state, index statistics and job progress. Always answers (never errors) within a few seconds. |
| kb_searchA | Search the knowledge base and return the most relevant text chunks. Space-separated words must all appear (if nothing has all of them, chunks with the most words are returned, source="keyword-partial"). File names are matched too (source="filename"). :param query: Keywords or a question, e.g. "预算 硬件 2026". :param top_k: Number of chunks to return (1-30). :param mode: "keyword", "semantic" (needs KB_ENABLE_SEMANTIC) or "hybrid". :param folder: Optional sub-folder to search in, e.g. "02_Books". |
| kb_reindexA | Scan the whole drive and bring the search index up to date. Rarely needed: added/imported/moved files are indexed immediately, and a
catch-up scan runs by itself whenever the drive is plugged in. Use it after
copying many files onto the drive with Finder, or with :param full: When true, re-extract every file instead of only changed ones. :param wait_seconds: How long to wait for completion before returning. |
| kb_read_documentA | Return the extracted plain text of one document (for quoting/summarising). Long documents are paged: when :param relpath: Path relative to the volume root, e.g. |
| kb_add_noteA | Save text in one step: notes, pasted data, a summary, a web clip, a chat excerpt. Writes :param title: Short title; also used for the file name. :param content: The body (Markdown or plain text). :param category: Target folder, e.g. "_Inbox", "03_Notes", "01_Documents/财务" (created if missing). :param tags: Optional tags, e.g. ["预算", "2026"]. :param source: Optional origin: a URL, "微信聊天", a book title ... :param date: Optional YYYY-MM-DD for the file name (default: today). |
| kb_import_fileA | Copy a file or a whole folder from this Mac into the knowledge base. Allowed sources: ~/Downloads, ~/Desktop, ~/Documents, ~/Claude, iCloud
Drive, plus folders listed in KB_IMPORT_DIRS. Text-bearing files (PDF,
Word, PPT, EPUB, Markdown ...) are searchable immediately; other files
(images, video) are stored and listed in INDEX.md. Files whose exact
content is already on the drive are skipped ( :param source_path: Absolute path, e.g. "~/Downloads/报告.pdf" or a folder. :param category: Target folder on the drive (default "_Inbox"). :param new_name: Optional new name (a file's extension is kept if omitted). :param move: Delete the source after a successful copy (default: keep it). :param allow_duplicate: Import even if identical content already exists. |
| kb_list_treeB | List the directory tree under |
| kb_scan_inboxA | List files in Decide a category and a name for each, then move them all with ONE
:func: |
| kb_create_directoryB | Create a directory (and parents) under the volume root. |
| kb_move_fileA | Move (and optionally rename) one file or folder. For many, use kb_organize. Also restores items from _Trash. The search index is kept in sync and INDEX.md refreshes automatically. :param src_rel: Current path, e.g. |
| kb_organizeA | Move/rename many files in ONE call (e.g. everything from kb_scan_inbox). Each item: {"src": "_Inbox/a.pdf", "dest_dir": "02_Books", "new_name": "2026-10-28_书名_作者.pdf"} -- new_name is optional. Items are processed independently; failures are reported per item. Up to 200 items per call. |
| kb_rename_fileA | Rename a file in place (same directory). Index is kept in sync. |
| kb_trashA | Remove a file or folder from the knowledge base -- recoverably. It is moved to :param relpath: e.g. "03_Notes/重复的笔记.md". :param reason: Optional note for the organize log (e.g. "duplicate of ..."). |
| kb_find_duplicatesA | List groups of files with identical content (SHA-256), largest first. Keep one of each group and remove the others with kb_trash. |
| kb_logB | Append a line to the organize log ( |
| kb_update_index_mdA | Regenerate the root Writes atomically (temp file + rename) so an interrupted run never leaves a truncated index. |
| kb_health_checkA | Audit the knowledge base; with Reports: files still in |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| organize_inbox | 扫描 _Inbox,命名归档,一次性移动并汇报 |
| add_to_kb | 把文字、数据或本机文件收进知识库 |
| kb_checkup | 检查硬盘状态、索引、INDEX.md 和重复文件 |
| ask_kb | 在知识库里查资料并注明出处 |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 17 tools
Most tools target clearly distinct actions (read vs search vs list vs status), and descriptions explicitly cross-reference alternatives ("For many, use kb_organize"). The only real overlap is kb_move_file / kb_rename_file / kb_organize, since move_file can also rename, plus some conceptual overlap between kb_reindex, kb_update_index_md and kb_health_check's fix mode — but the descriptions disambiguate each case well.
All names share a kb_ prefix and nearly all follow verb_noun (kb_read_document, kb_import_file, kb_find_duplicates, kb_update_index_md). Minor deviations are noun-only names like kb_status and kb_log, which break the pattern slightly but remain readable and predictable.
17 tools is on the high side of the ideal 3-15 range, but each maps to a real operation in a file-plus-index knowledge base (read, search, import, organize, dedupe, audit). Nothing looks like filler, though a few index-maintenance tools could conceivably be folded together.
The surface covers the full lifecycle: ingest (import/add_note), discover (search/list/scan), organize (move/rename/organize/create_directory), remove (trash/duplicates), and maintain (reindex/index/health/log). The main gap is editing the content of an existing document in place — there is create and read but no update-body operation — which agents would have to work around by adding a new note and trashing the old one.