terminal_kb
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@terminal_kbsearch my library for retrieval augmented generation and show cited passages"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Terminal Knowledge Base
A terminal-only local knowledge base for managing PDFs, Markdown notes, and evidence for paper writing. It does not rely on Obsidian or Zotero and can be used directly through the CLI, scripts, and MCP agents.
Features
SQLite FTS5 full-text search, supporting Chinese and English
PDFs parsed page by page, returning
citekey, page numbers, and original text passagesRecursive import of Markdown notes, preserving stable citekeys
BibTeX bibliography files and research draft directories
JSON-RPC over stdio MCP server, connectable to terminal agents such as Codex
Optional LanceDB + Sentence Transformers vector indexes
All indexes and parse results are local, rebuildable files
Related MCP server: search-docs
Environment Requirements
Linux/macOS
Python 3.11+
pdftotext,pdfinfo,pdftoppm(installingpoppleris recommended)
Basic full-text search requires no additional Python dependencies. A Python 3.12 virtual environment with uv is recommended.
uv python install 3.12
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -e .Optional dependencies:
# 向量检索(CPU 环境)
uv pip install --python .venv/bin/python lancedb sentence-transformers
# 更复杂的 PDF 版面、表格和公式解析
uv pip install --python .venv/bin/python doclingNon-NVIDIA GPUs:
uv pip install --python .venv/bin/python \
torch==2.6.0+cpu \
--index-url https://download.pytorch.org/whl/cpuQuick Start
./kb init
./kb add ~/Books/paper.pdf --title "Paper title" --author "Doe, Jane" --year 2024
./kb add ~/notes/method.md --title "Method notes"
./kb index --all
./kb search "retrieval augmented generation" --limit 5Common commands:
./kb status
./kb doctor
./kb show <citekey> --page 2
./kb passage --citekey <citekey> --page 2
./kb cite <citekey> --page 2
./kb page-image <citekey> 2 --dpi 150The paper citation format is: [@citekey, p. 2].
Importing Existing Directories
kb add adds files one at a time. For batch imports, you can use the shell:
find ~/Books/final -type f \( -iname '*.pdf' -o -iname '*.md' \) -print0 |
while IFS= read -r -d '' file; do
./kb add "$file"
done
./kb index --all --forceMCP Agent Integration
serve-mcp uses stdin/stdout for JSON-RPC transport and requires no additional MCP SDK:
[mcp_servers.terminal_kb]
command = "/absolute/path/to/knowledge-base/kb"
args = ["--root", "/absolute/path/to/knowledge-base", "serve-mcp"]The tools provided include:
search_library: search PDF and Markdown evidenceget_passage: fetch a precise passage with its page numberget_document: view document metadata and statusget_page_image: render PDF pages to verify formulas, tables, and figuresfind_evidence: find evidence by claimindex_status: view indexing status
Vector Retrieval
The vector index is an optional feature, enabled in .kb/config.toml:
enable_vectors = true
embedding_model = "BAAI/bge-small-zh-v1.5"Then rebuild:
./kb index --all --forceThe first run downloads the model from Hugging Face.
Verification
./kb doctor
.venv/bin/python -m unittest discover -s tests -vMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and query PDF documents through a local RAG system with vector embeddings. Provides semantic document search capabilities while keeping all data stored locally without external dependencies.
- AlicenseAqualityAmaintenanceEnables AI agents to search local Markdown documents using natural language, with automatic indexing and section-level retrieval.921MIT
- FlicenseAqualityBmaintenanceA local-first document retrieval engine that mounts as an MCP tool for agents to index files, search for relevant passages, and let the agent's own LLM answer.4
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search, read, and traverse a local knowledge base of Markdown files using full-text search and relationship graph, reducing token usage.MIT
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Token-efficient search for coding agents over public and private documentation.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xuj1nfan/knowledge_base'
If you have feedback or need assistance with the MCP directory API, please join our Discord server