korean-docs-mcp
An MCP server that lets Claude, Cursor and other agents search a folder of Korean documents (HWP, HWPX, Markdown, text) on your own machine.
- Reads HWP and HWPX directly. Tables come back as Markdown tables with their rows intact, not as a run of cell text.
- 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. 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-mcp
Claude 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/공문서"].
Tools
| Tool | What it does |
|---|---|
index_documents(folder, recursive=True) |
Index .hwp, .hwpx, .md, .txt files under a folder. Only new or changed files are parsed. |
search(query, limit=8, folder=None, match_all=False) |
BM25 search over morphemes. Each hit has the chunk text, its heading, document path and chunk number. |
read_document(path, chunk=None, max_chars=6000) |
Read a document as Markdown, from the start or around a search hit. Long documents page with next_offset. |
list_documents(folder=None) |
Indexed documents with titles and sizes. |
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 unicode61 (SQLite default) |
0.761 | 0.887 | 0.911 | 0.816 |
FTS5 trigram |
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.
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).
- 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
- Merged table cells are left empty in all but their first row, as the parser emits them; a search for a row's group label may miss later rows.
- Images, charts and scanned pages are not read.
- 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]"
pytest
tests/test_server.py starts the server over stdio and drives it with the
MCP Python client.
License
MIT
Metadata
Release files for korean-docs-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| korean_docs_mcp-0.1.1.tar.gz | 37.2 kB | With provenance | Details for korean_docs_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| korean_docs_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for korean_docs_mcp-0.1.1-py3-none-any.whl |
Total release size: 52.1 kB
Release files / korean_docs_mcp-0.1.1.tar.gz
| Download URL | korean_docs_mcp-0.1.1.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d9ebef2731f9790612d1560f5390003592aea03fcbf496b82b6b6ef5579d241
|
|
BLAKE2b-256 checksum How to use checksums |
e2fef8bac72eb5e5f743b335abd9dd82803f6feb88fbaf3e7198d1f1212f9351
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logRelease files / korean_docs_mcp-0.1.1-py3-none-any.whl
| Download URL | korean_docs_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00ac26ee518bf01e07e0fa50ad9d13db3d0885794c97761785cf68a958f08c89
|
|
BLAKE2b-256 checksum How to use checksums |
08d8be756e3dcad6857b81cb21d1a964cc13501c4b9ee0d5e336ed13eff7af0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logSecurity for korean-docs-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for korean_docs_mcp-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.