Skip to main content
Glama
xuj1nfan

terminal_kb

by xuj1nfan

Terminal Knowledge Base

터미널 전용 로컬 지식 베이스로, PDF, Markdown 노트, 논문 작성 근거를 관리합니다. Obsidian이나 Zotero에 의존하지 않으며, CLI, 스크립트, MCP 에이전트를 통해 직접 사용할 수 있습니다.

기능

  • SQLite FTS5 전문 검색, 중국어와 영어 지원

  • PDF를 페이지별로 파싱하여 citekey, 페이지 번호, 원문 발췌를 보존

  • Markdown 노트를 재귀적으로 가져와 안정적인 citekey 유지

  • BibTeX 서지 파일과 연구 초안 디렉터리

  • JSON-RPC over stdio MCP server, Codex와 같은 터미널 에이전트에 연결 가능

  • 선택적 LanceDB + Sentence Transformers 벡터 인덱스

  • 모든 인덱스와 파싱 결과는 로컬에서 재구성 가능한 파일

Related MCP server: search-docs

환경 요구 사항

  • Linux/macOS

  • Python 3.11+

  • pdftotext, pdfinfo, pdftoppm(poppler 설치 권장)

기본 전문 검색에는 추가 Python 의존성이 필요하지 않습니다. Python 3.12 가상 환경과 uv를 권장합니다.

uv python install 3.12
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -e .

선택 의존성:

# 向量检索(CPU 环境)
uv pip install --python .venv/bin/python lancedb sentence-transformers

# 更复杂的 PDF 版面、表格和公式解析
uv pip install --python .venv/bin/python docling

비NVIDIA GPU:

uv pip install --python .venv/bin/python \
  torch==2.6.0+cpu \
  --index-url https://download.pytorch.org/whl/cpu

빠른 시작

./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 5

자주 쓰는 명령:

./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 150

논문 인용 형식은 [@citekey, p. 2]입니다.

기존 디렉터리 가져오기

kb add는 파일을 하나씩 추가할 수 있습니다. 일괄 가져오기에는 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 --force

MCP 에이전트 연동

serve-mcp는 stdin/stdout을 통해 JSON-RPC를 전송하며, 추가 MCP SDK가 필요하지 않습니다:

[mcp_servers.terminal_kb]
command = "/absolute/path/to/knowledge-base/kb"
args = ["--root", "/absolute/path/to/knowledge-base", "serve-mcp"]

제공되는 도구는 다음과 같습니다.

  • search_library: PDF와 Markdown 증거를 검색

  • get_passage: 페이지 번호가 포함된 정확한 발췌문을 가져옴

  • get_document: 문서 메타데이터와 상태 조회

  • get_page_image: PDF 페이지를 렌더링하여 수식, 표, 그래픽을 확인

  • find_evidence: утверждение에 따라 근거를 찾아냄

  • index_status: 인덱스 상태 확인

벡터 검색

벡터 인덱스는 선택 기능이며 .kb/config.toml에서 활성화합니다:

enable_vectors = true
embedding_model = "BAAI/bge-small-zh-v1.5"

그다음 다시 빌드합니다:

./kb index --all --force

첫 실행 시 Hugging Face에서 모델을 다운로드합니다.

검증

./kb doctor
.venv/bin/python -m unittest discover -s tests -v
Install Server
F
license - not found
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to search local Markdown documents using natural language, with automatic indexing and section-level retrieval.
    9
    2
    1
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    A 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
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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