Skip to main content
Glama
admin0330

KnowledgeBase MCP

by admin0330

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
KB_VOLUMENoKnowledge base root directory (the Database folder)./Volumes/KnowledgeBase/Database
KB_CACHE_DIRNoLocation where kb-files caches its tool list.~/.cache/kb-mcp
KB_FS_GATEWAYNoSet to 0 to restore the old kb-files startup method.1
KB_FS_VERSIONNoPinned version of the official filesystem service used by setup.sh and npx fallback.2.0.1
KB_IMPORT_DIRSNoAdditional directories kb_import_file is allowed to read, separated by ':'.
KB_AUTO_REINDEXNoBackground index scan on startup and re-mount; set to 0 to disable.1
KB_PROBE_TIMEOUTNoDisk check timeout in seconds.4
KB_SQLITE_JOURNALNoSQLite journal mode for the index database. Changing it back to WAL is not recommended.DELETE
KB_ENABLE_SEMANTICNoSet to '1' to enable vector semantic retrieval. Also add --with fastembed to the command args.
KB_FS_START_TIMEOUTNoOfficial filesystem service startup timeout in seconds.45
KB_REQUIRE_EXTERNALNoRequire 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
kb_statusA

Report the knowledge-base drive state, index statistics and job progress.

Always answers (never errors) within a few seconds. state is one of: ok, not_mounted, phantom_dir, kb_dir_missing, permission_denied, read_only, disk_full, unresponsive, io_error. When it is not ok, hint says what the user should do.

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 full=True to rebuild. Runs in the background; this call waits up to wait_seconds (0-50) and otherwise returns progress -- follow it with kb_status.

: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 next_start_char is present, call again with start_char set to it to continue reading.

:param relpath: Path relative to the volume root, e.g. 02_Books/foo.pdf. :param max_chars: Maximum characters to return (1-50000). :param start_char: Offset to start from (for paging through long texts).

kb_add_noteA

Save text in one step: notes, pasted data, a summary, a web clip, a chat excerpt.

Writes <category>/<YYYY-MM-DD>_<title>.md with a small YAML header, makes it searchable immediately and refreshes INDEX.md. If a note with the same content already exists, nothing is written and its path is returned (duplicate: true) unless allow_duplicate is set.

: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 (skipped_duplicates).

: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 subdir (depth-limited, max 600 lines).

kb_scan_inboxA

List files in _Inbox with a short content preview for triage.

Decide a category and a name for each, then move them all with ONE :func:kb_organize call. Returns at most limit items per call.

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. _Inbox/report.pdf or a folder. :param dest_dir_rel: Target directory, e.g. 01_Documents. :param new_name: Optional new filename; the extension is kept if omitted.

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 _Trash/<today>/ (not indexed, not in INDEX.md). Restore with kb_move_file; empty _Trash in Finder when you are sure.

: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 (.mcp_meta/organize.log).

kb_update_index_mdA

Regenerate the root INDEX.md now (it also refreshes automatically).

Writes atomically (temp file + rename) so an interrupted run never leaves a truncated index.

kb_health_checkA

Audit the knowledge base; with fix=True also repair what it can.

Reports: files still in _Inbox (backlog), files missing from INDEX.md (orphans), INDEX.md links to missing files (dead links) and text files not yet in the search index. fix=True indexes the missing files and rewrites INDEX.md, then reports again. The inbox backlog is left for you to organise.

Prompts

Interactive templates invoked by user choice

NameDescription
organize_inbox扫描 _Inbox,命名归档,一次性移动并汇报
add_to_kb把文字、数据或本机文件收进知识库
kb_checkup检查硬盘状态、索引、INDEX.md 和重复文件
ask_kb在知识库里查资料并注明出处

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 17 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count4/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues