korean-docs-mcp
You can locally index Korean document folders and search/read them through MCP tools.
Index files in a folder, recursively by default, re-parsing only new or changed files and dropping deleted files from the index.
Search indexed documents with Korean morpheme-aware BM25, with optional folder filtering and match-all behavior.
Read indexed documents as Markdown from the start, around a search-hit chunk, or page through long documents using offsets.
List indexed documents with titles, sizes, and chunk counts, optionally filtered by folder.
korean-docs-mcp
An MCP server that lets Claude, Cursor and other agents search a folder of Korean documents (HWP, HWPX, PDF, DOCX, XLSX, PPTX, Markdown, text) on your own machine.
Reads HWP and HWPX directly, along with PDF and Office files. Tables come back as Markdown tables with their rows intact, not as a run of cell text.
Merged cells are filled in. A row under a merged cell repeats its value (
| 교육 | AI 튜터 | 209 |, not| | AI 튜터 | 209 |), so every row a search returns says which group it belongs to.Search that understands Korean. Text is split into morphemes with Kiwi before it is indexed, so
예산을,예산의and국가예산all match예산. Ranking is BM25.Local and zero-config. One SQLite file, no server, no API key, no embeddings to pay for (an optional local embedding model can be added). Documents never leave your machine.
Incremental. Re-indexing a folder only re-reads files that changed and drops files that were deleted.
Design notes and measurements (in Korean): Claude가 내 컴퓨터의 HWP 공문서를 검색하게 만들기.
You: 2027년 예산안에서 디지털 교과서 예산 얼마였는지 찾아줘
Claude: → search("디지털 교과서 예산")
← 2027 예산.hwpx, chunk 0
| 분야 | 사업명 | 예산(억 원) |
| 교육 | 디지털 교과서 | 495 |
디지털 교과서 예산은 495억 원입니다 (2027 예산.hwpx 표 기준).Setup
You need uv
(brew install uv or pipx install uv). The first start installs the
package with its Kiwi model (about 130 MB in total), so it takes a minute;
later starts are immediate.
Claude Code
claude mcp add korean-docs -- uvx korean-docs-mcpClaude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json)
and other clients that take the same format:
{
"mcpServers": {
"korean-docs": {
"command": "uvx",
"args": ["korean-docs-mcp"]
}
}
}Then ask the agent to index a folder, e.g. "~/Documents/공문서 폴더 색인해줘", and search it in plain Korean.
To index folders when the server starts, add them to args:
["korean-docs-mcp", "--index", "/Users/me/Documents/공문서"].
Related MCP server: HWP RAG MCP
Try it on Glama
korean-docs-mcp is listed on Glama. There you can browse its tools, check its quality score, and test it online with MCP Inspector before installing.
Tools
Tool | What it does |
| Index |
| BM25 search over morphemes (plus vectors if enabled). Each hit has the chunk text, its heading, document path and chunk number. |
| Read a document as Markdown, from the start, around a search hit, or from |
| Indexed documents with titles, sizes and chunk counts, paged. |
| Take a document, or every document under a folder, out of the index. Files on disk are never touched. |
Every tool declares MCP annotations (read-only, destructive, idempotent) and describes each parameter in its schema.
Search quality
KorQuAD 1.0 dev: for each of 5,774 questions, find the paragraph it was written from among 964 paragraphs. Every row is SQLite FTS5 with its built-in BM25; only the way text is split into terms changes.
Method | Recall@1 | Recall@5 | Recall@10 | MRR@10 |
FTS5 | 0.761 | 0.887 | 0.911 | 0.816 |
FTS5 | 0.716 | 0.859 | 0.882 | 0.776 |
korean-docs-mcp (Kiwi morphemes) | 0.896 | 0.980 | 0.988 | 0.933 |
Morpheme analysis costs about 0.5 ms per query. Reproduce with
benchmarks/korquad.py.
Indexing 50 real government press releases (HWP and HWPX from korea.kr) takes about 3 seconds, and a search takes under 1 ms.
Optional semantic search
Keyword search over morphemes is the default and needs nothing else. To add an embedding model (run locally with ONNX Runtime, no API key, downloaded once on first use):
{
"mcpServers": {
"korean-docs": {
"command": "uvx",
"args": ["--from", "korean-docs-mcp[embeddings]", "korean-docs-mcp", "--embeddings"]
}
}
}--embeddings uses multilingual-e5-large (a 2.2 GB download). It is the
only model offered that is good at Korean (alone it finds the right KorQuAD
paragraph first 80% of the time, against 34% for the smaller MiniLM), but it
is slow on a CPU: about one second per chunk when indexing, so a folder of a
few hundred documents takes several minutes the first time (later runs only
embed new or changed files). --embeddings minilm (220 MB) is much faster
and much weaker. Turning embeddings on for an existing index embeds the chunks
already there on the next index_documents call.
How the two are combined was decided by measurement. Morpheme BM25 already puts the right KorQuAD paragraph first 90% of the time, and mixing a model's ranking in by reciprocal rank fusion (RRF) disturbs those answers: with MiniLM it made results worse at every weight tried. So the server keeps the keyword ranking as it is and gives the last quarter of the hits to passages the keyword search did not return, such as a paraphrase that shares no word with the text. That can never push a keyword hit out of the top three-quarters, and with e5-large it gives the best Recall@10 of everything tried:
KorQuAD 1.0 dev, 10 hits | Recall@1 | Recall@5 | Recall@10 | MRR@10 |
Keyword (morpheme BM25) | 0.896 | 0.980 | 0.988 | 0.933 |
e5-large alone | 0.800 | 0.959 | 0.979 | 0.869 |
RRF, e5-large at equal weight | 0.878 | 0.984 | 0.994 | 0.924 |
RRF, e5-large at weight 0.1 | 0.897 | 0.984 | 0.990 | 0.935 |
Keyword + reserved slots, e5-large (default) | 0.896 | 0.980 | 0.995 | 0.934 |
MiniLM alone | 0.336 | 0.548 | 0.634 | 0.427 |
RRF, MiniLM at equal weight | 0.573 | 0.815 | 0.916 | 0.678 |
Keyword + reserved slots, MiniLM | 0.896 | 0.980 | 0.988 | 0.933 |
Reproduce with benchmarks/fusion_experiment.py.
How it works
Parse. HWP and HWPX are converted to Markdown with unhwp, which scored best overall in hwp-parser-bench (100% text and 95.5% table cells on public HWPX files); DOCX, XLSX and PPTX with undoc; PDF with unpdf. Tables are requested as HTML, which keeps
rowspan/colspan, and rewritten as Markdown tables with merged cells repeated in every position they cover.Chunk. Paragraphs are grouped into chunks of up to 1,200 characters under their nearest heading. A table is always its own chunk; a long table is split by rows with its header repeated in every piece.
Analyze. kohybrid's
KoreanTokenizerkeeps nouns, numbers, foreign words and dictionary-form verbs and adjectives, and drops particles and endings.Index. The lexemes go into an SQLite FTS5 table. Document titles are indexed with double weight. The original Markdown is stored for display.
The index lives at ~/.local/share/korean-docs-mcp/index.sqlite3. Change it
with --db or the KOREAN_DOCS_DB environment variable.
Limits
Images, charts and scanned pages are not read (no OCR).
PDF text depends on how the file was made: a word broken across a line can come out with a space in it, which a keyword search may miss.
No vector search yet. BM25 over morphemes handles keyword-style questions well; paraphrased questions with no shared words are not found.
Development
git clone https://github.com/RionHwang0/korean-docs-mcp && cd korean-docs-mcp
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytesttests/test_server.py starts the server over stdio and drives it with the
MCP Python client.
License
MIT
Available Tools
5 toolsindex_documentsIndex a folder of documentsAIdempotent
Index the HWP, HWPX, PDF, DOCX, XLSX, PPTX, Markdown and text files in a folder.
Call this once before search can find anything in the folder, and again whenever its files may have changed: only new or modified files are parsed again, and files deleted from the folder are dropped from the index. It reads the files but never changes them; the index is a local SQLite file. The first run over many files takes a while (parsing, and embedding if the server runs with embeddings). Returns how many files were indexed, updated, unchanged or removed, and which files failed to parse and why.
Inputs: folder (required), recursive.
list_documentsList indexed documentsARead-onlyIdempotent
List the documents in the index, sorted by path, with title, size, chunk count and modification time.
Use this to see what has been indexed (for example to check that index_documents covered a folder, or to pick a document to read with read_document). To find content inside documents, use search instead. Results are paged: total is the number of matching documents, and when more remain, call again with offset=next_offset. Read-only.
Inputs: limit, folder, offset.
read_documentRead an indexed documentARead-onlyIdempotent
Read an indexed document as Markdown, from the start, around a search hit, or from an offset.
Use after search, when a hit's passage is not enough and you need the text around it, or to read a whole document page by page: when the result has a next_offset, call again with offset=next_offset. The document must have been indexed; the text comes from the index, so re-run index_documents if the file changed. Read-only.
Inputs: path (required), chunk, offset, max_chars.
remove_documentRemove documents from the indexADestructiveIdempotent
Remove a document, or every document under a folder, from the search index.
Use this when a document should no longer appear in search results, for example a file that was moved out of an indexed folder or a folder that should not be searched any more. It deletes index entries only: the files on disk are never touched, and running index_documents on the folder again adds them back. Returns the paths that were removed.
Inputs: path (required).
searchSearch indexed documentsARead-onlyIdempotent
Find the passages in indexed documents that match a query.
Use this to answer a question from the user's documents; use list_documents instead to see which documents exist. Korean morpheme analysis drops particles and endings, so "예산을" also finds "예산의". Ranking is BM25; with embeddings enabled, the last quarter of the hits are semantic matches the keyword search missed. Each hit has the passage text (a table is returned whole as a Markdown table, with merged cells repeated in every row they span), its heading, the document path and title, and a chunk number; pass the path and chunk to read_document for the surrounding text. Read-only. If nothing matches, try other or fewer words, or check that the folder was indexed.
Inputs: query (required), mode, limit, folder, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct action on the index: list, remove, index, search, and read. The descriptions actively disambiguate by cross-referencing each other (e.g. 'use list_documents instead to see which documents exist', 'use search instead' to find content), leaving no realistic misselection path.
Names follow a clear verb_noun pattern: list_documents, remove_document, index_documents, read_document. The one deviation is 'search', a bare verb with no object, whereas 'search_documents' would complete the pattern; also singular/plural noun forms are mixed but readably so.
Five tools exactly cover the lifecycle of a document index: ingest, query, read, enumerate, and purge. Nothing feels padded or missing at the count level; each tool earns its place.
Index, search, read, list and remove cover the core loop, including a re-index path via index_documents. Minor gaps: indexing is folder-only with no single-file option, and there is no status/stats or 'what changed since last index' tool beyond list_documents output.
Maintenance
Related MCP Connectors
Create Korean HWPX files from Markdown, fill HWP/HWPX forms, render pages and PDFs
Extract text and tables from Korean HWP/HWPX, PDF, Word, Excel and PowerPoint files
Find and fill cells in Korean HWP/HWPX forms from JSON, tick checkboxes, extract Markdown.
Read and search folders on your own computer with explicit consent. Files are never uploaded.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConverts documents (PDF, DOCX, XLSX, PPTX, HTML, TXT, MD) to Markdown and stores them locally with search and retrieval capabilities.-
- AlicenseNot gradedqualityDmaintenanceEnables searching local Korean HWP/HWPX documents via Codex or Claude Code by indexing them with a free multilingual embedding model, keeping documents and indexes locally without requiring an API key.24 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search a Mac's documents by content using a local index, returning ranked paths and matching snippets. It supports formats like PDF, DOCX, HWP, and OCR'd scans, with Korean-aware search, while keeping everything offline and without requiring filesystem access.MIT
- FlicenseNot gradedqualityBmaintenanceEnables fast local hybrid search over a folder of markdown files via MCP, combining BM25 and vector similarity with explicit relevance verdicts and no LLM or network calls at query time.1-