kordoc

Reads, checks, fills and generates Korean HWP, HWPX, PDF and Office documents as Markdown

By 딴짓하는 류주임 (individual) TypeScript Local · stdio ProductivityFiles and storage

90 popularity score ★ 2.9k ↓ 64k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add kordoc -- npx -y kordoc mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "kordoc": {
      "command": "npx",
      "args": [
        "-y",
        "kordoc",
        "mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "kordoc": {
      "command": "npx",
      "args": [
        "-y",
        "kordoc",
        "mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "kordoc": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "kordoc",
        "mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.kordoc]
command = "npx"
args = ["-y", "kordoc", "mcp"]
Gemini CLITerminal
gemini mcp add --scope user kordoc npx -- -y kordoc mcp

Settings 2

KORDOC_ROOT Optional: Directory the MCP server's file access is confined to; no limit when unset.
KORDOC_OFFLINE Optional: Set to 1 (or true/yes/on) to block model downloads and webhooks before they are tried.

What it does

kordoc turns Korean documents (HWP 3.x and 5.x, HWPX, HWPML, PDF, XLS/XLSX, DOCX, PPTX and PNG/JPG/WebP images) into Markdown and structured data. It comes as a JavaScript library, a command-line tool and an MCP server. It reads Hancom files itself, so Hancom Office does not need to be installed.

Start the MCP server with `npx -y kordoc mcp` and you get 22 tools (counted in src/mcp.ts and its six tool modules). Besides parsing whole documents, page ranges, single tables, metadata or RAG chunks, it can diff two documents, read and fill form fields, and write edited Markdown back into the original HWPX or HWP. It also generates HWPX from Markdown, places seals, adds memos, masks personal data, and renders pages to images, SVG, HTML or PDF so the output can be checked. Newer additions are `convert_to_hwpx`, which turns an HWP file into HWPX, and agency packs: `build_agency_pack` learns one office's house style from a few of its HWPX files and saves it as a .kpack that `generate_document` can then write with. `lint_document` checks date, amount and loanword notation on every run, and can also check bullet style, AI-style phrasing, report structure, figures and budget sums when asked.

`npx -y kordoc setup` registers the server in installed clients such as Claude Desktop, Claude Code, Cursor and Codex. OCR for scanned pages runs on the local CPU without an API key. According to src/shared/offline.ts, the only outside traffic is the first download of OCR and formula models from huggingface.co and the CLI's `watch --webhook` URL. KORDOC_OFFLINE=1 blocks both before they are tried, and KORDOC_ROOT confines file access to one directory (no limit when unset).

What it needs

RuntimeNode.js 20+
Runs onmacOS, Windows, Linux

Limits

  • Size cap lint_document checks at most 1,000,000 characters of text and returns at most 500 findings per list; longer documents must be split
  • Not covered Form filling, patching, generation, seals, memos and rendering work on HWPX/HWP; other formats are read as Markdown only
  • Not covered convert_to_hwpx carries over only text and tables from HWP 3.x files, and does not convert distribution (read-only) documents
  • Limit convert_to_hwpx will not overwrite an existing .hwpx at its default path; give output_path to replace it (src/mcp/tools-convert.ts)
  • Limit build_agency_pack takes HWPX samples only (1 to 50); HWP samples must be saved as HWPX in Hancom first
  • Limit OCR and formula OCR models (about 18 MB and 155 MB) are downloaded on first use unless KORDOC_OFFLINE is set and models are side-loaded
  • Platform On Windows, Claude Desktop may need the command written as cmd /c npx -y kordoc mcp

Who it suits

Suits people who work with Korean public-sector or office documents in HWP/HWPX and want an assistant to read, check, fill or draft them on their own machine, without Hancom Office and without sending files to a hosted service. Because it writes files and has no folder limit by default, set KORDOC_ROOT (and KORDOC_OFFLINE on closed networks) before pointing it at a shared disk. If you only need plain-text extraction from common Office formats, a general converter may be lighter; kordoc's value is the Hancom formats and Korean official-document tooling.

Tools 22

10 only read, 12 change things. A ? marks an optional parameter.

parse_document
Convert HWP/HWPX/PDF/XLSX/DOCX and images to Markdown with metadata
detect_format
Identify a file's format from its leading bytes and container layout
parse_metadata
Read only a document's metadata
parse_pages
Parse a chosen page range
parse_table
Extract one table by its number
compare_documents
Diff two documents, including HWP against HWPX
parse_chunks
Split a document into RAG chunks with heading trails and separate table chunks
parse_form
List a form's label and value pairs as JSON
fill_form changes
Write values into a form's blanks, keeping HWPX layout; supports built-in templates
place_seal changes
Place a seal or signature image over an anchor phrase
add_memo changes
Attach a Hancom memo to an anchor phrase and save the result as HWPXfile_path: stringanchor: stringtext: stringauthor?: stringoccurrence?: integeroutput_path: string
patch_document changes
Apply edited Markdown back to the original HWPX/HWP with its formatting
redact_document changes
Find personal data and mask it while keeping formatting
render_document changes
Render HWPX/HWP as laid out to PNG/JPEG, or to SVG/HTML/PDF files
crop_regions changes
Cut tables, images, paragraphs and shapes out of page images into files
extract_tables changes
Classify tables (data, org chart, uncertain) with page and bbox, cropping by policy
extract_profile changes
Save a reference HWPX's table styling as a profile for generate_document
generate_document changes
Build HWPX from Markdown using official-document presets, a sample file or an agency pack
build_agency_pack changes
Build an agency style pack (.kpack) from several HWPX samples of one document kindsample_paths: arrayname: stringkind?: stringoutput_path: stringinto_path?: string
agency_pack_info
Show a .kpack's summary and writing guidepack_path: string
lint_document
Check official-document notation, with opt-in style, structure, figure and budget checks; findings carry line and columntext?: stringfile_path?: stringblocks?: arraymunche?: booleanslop?: booleanlogic?: booleannumbers?: booleanbudget?: booleangate?: booleanpreset?: string
convert_to_hwpx changes
Convert an HWP file to HWPX, keeping HWP 5.x formattingfile_path: stringoutput_path?: stringpassword?: string

Similar servers