hwp-mcp
hwp-mcp is an MCP server that enables AI agents to read, modify, and create HWP/HWPX (Hangul Word Processor) documents. Reading is supported for both .hwp and .hwpx files; writing is exclusive to .hwpx.
Read & Extract Content
Extract full document text, tables (as Markdown), headers/footers, footnotes, and equations
List and save embedded images to disk
Metadata & Inspection
Retrieve document info: version, page count, fonts, table/image/footnote/equation counts
Get page layout (paper size, margins, columns) per section
List Hancom fields, get field values, and list BinData entries in
.hwpxarchives
Visual Rendering
Render individual pages or all pages as SVG or HTML
Convert OWPML math equation scripts to SVG
Text Editing (.hwpx only)
Find and replace text, fill
{{placeholder}}templates, set paragraph or cell text, set Hancom field values
Structural Editing (.hwpx only)
Append/delete paragraphs and table rows/columns
Merge cells horizontally or vertically
Insert, replace, or delete embedded images
Insert new OWPML tables (experimental)
Formatting (.hwpx only)
Apply character styles: color, bold, italic, underline, font size
Apply paragraph styles: alignment, indent, line spacing
Document Creation
Create brand-new
.hwpxdocuments from text and table content
Allows extracting tables from HWP and HWPX documents and converting them into Markdown format for structured data representation.
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., "@hwp-mcpRead the content of report.hwp and extract all tables"
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.
hwp-mcp
A server that allows MCP-compatible AIs like Claude, Cursor, and ChatGPT to read, modify, and create Hangul documents (.hwp / .hwpx).
hwp-mcp is a Model Context Protocol (MCP) server that enables AI agents to directly handle Hancom Office documents. It supports not only reading, but also text modification, template filling, and creating new documents.
What is this project?
This project is divided into two parts:
π§ What rhwp did (Core Engine) β Edward Kim's rhwp is an open-source engine that reverse-engineered the closed Hangul formats (HWP 5.0 binary, HWPX/OWPML) and implemented them in Rust + WebAssembly. Parsing, extraction of tables, images, equations, and headers, SVG rendering, and Hancom-compatible Field API β all these core capabilities are provided by rhwp. Without rhwp, this project would not exist.
π€ What
hwp-mcpdid (Agent Adapter) β A thin MCP server layer built on top of@rhwp/core. What we added:Agent-friendly tool signatures like
read_hwp,fill_hwp_template, andreplace_hwp_textβ allowing LLMs like Claude/Cursor to call them in natural language.A scenario-focused traversal walker that dumps body text, tables, images, headers, footers, footnotes, and equations all at once.
Usability layers such as automatic table cell merging and automatic footnote/equation consolidation.
A
.hwpxZIP-level mutation layer to bypass the round-trip limitations of rhwp 0.7.7'sexportHwpx(the key to enabling actual writing).The npm
hwp-mcppackage (one-line installation) + Node.js WASM bootstrap.
Summary: An adapter that allows AI to truly read and write Hangul documents. Please send all gratitude for the open Hangul capabilities to the rhwp project π
Related MCP server: HWP-MCP
Installation
Claude Code
claude mcp add hwp-mcp -- npx -y hwp-mcpClaude Desktop / Cursor / VS Code (settings JSON)
{
"mcpServers": {
"hwp-mcp": {
"command": "npx",
"args": ["-y", "hwp-mcp"]
}
}
}Requires Node.js 20 or higher.
Tool List
These are the 34 MCP tools exposed by hwp-mcp v0.2. Reading/rendering supports both .hwp and .hwpx, while writing is exclusive to .hwpx.
Reading (5)
Tool |
|
| Description |
| β | β | Body + Tables (Markdown) + Image list at once |
| β | β | Integrated text: Body + Headers + Footers + Footnotes + Equations |
| β | β | Tables as GitHub Markdown (with cell merging) |
| β | β | List of embedded images (mime, bytes) |
| β | β | Extract images to disk |
Meta / Query (5)
Tool |
|
| Description |
| β | β | Version, pages, fonts, stats for tables/images/footnotes/equations |
| β | β | Paper size, margins, columns, header/footer margins per section |
| β | β | List of Hancom fields |
| β | β | Query field values |
| β | β | List of |
Visual Rendering (4)
Tool |
|
| Description |
| β | β | Specific page β SVG (inline/file) |
| β | β | Batch SVG for all pages |
| β | β | Page β HTML |
| β | β | OWPML equation script β SVG |
Writing β Text (5)
Tool |
| Description |
| β | Find and replace specific strings |
| β | Multiple placeholders like |
| β | Replace entire text of the Nth paragraph |
| β | Directly set text in a table cell (row, column) |
| β | Set field values |
Writing β Structure (9)
Tool |
| Description |
| β | New paragraph at the end of the body |
| β | Delete the Nth paragraph |
| β | New row at the end of a table |
| β | Delete a table row |
| β | New column at the end of a table (in all rows) |
| β | Delete a table column |
| β | Horizontal cell merge (colSpan) |
| β | Vertical cell merge (rowSpan) |
| β | Replace embedded image |
Writing β Formatting (2)
Tool |
| Description |
| β | Text color, bold, italic, underline, size (adds charPr) |
| β | Paragraph alignment, indentation, line spacing (adds paraPr) |
Writing β Images / Tables / New (4)
Tool |
| Description |
| β | Add new image (BinData + manifest + |
| β | Delete BinData/ entry |
| β οΈ | Insert new OWPML table (experimental β file valid, rhwp recognition incomplete) |
| β | Create new |
Content Extraction Matrix
Content | Extraction | Notes |
Body paragraph text | β |
|
Tables (incl. merged cells) | β |
|
Embedded images | β | Extract PNG/JPG/BMP, etc. |
Headers / Footers | β |
|
Footnotes | β |
|
Equations | β | OWPML script format (e.g., |
Page SVG render | β |
|
Textbox body | β | rhwp's |
Endnotes | β | Not supported by rhwp (footnotes only) |
Charts | β | After v0.3 |
Writing Matrix
Task |
|
| Notes |
Single text replacement | β | β |
|
Fill multiple placeholders | β | β |
|
Replace entire paragraph text | β | β |
|
Direct table cell modification | β | β |
|
Set field value | β | β |
|
Append / Delete paragraph | β | β |
|
Append / Delete table row | β | β |
|
Replace / Delete image | β | β |
|
Create new document (text) | β | β |
|
Create new document (table) | β | β οΈ | Flattened as text rows (real OWPML table in v0.3) |
Insert new image | β | β |
|
Append / Delete table column | β | β |
|
Cell merge (horizontal/vertical) | β | β |
|
Text formatting (color/bold/italic/underline/size) | β | β |
|
Paragraph formatting (align/indent/spacing) | β | β |
|
Insert new table (real OWPML) | β | β οΈ |
|
Insert new header/footer | β | β | v0.3 |
Charts/Bookmarks/Style definitions | β | β | v0.3 |
.hwpbinary writing is not supported in v0.2 due to theexportHwpround-trip limitations of rhwp 0.7.7. Please save as.hwpxin Hancom Office before using writing tools, or wait for the v0.3 release.
Usage Examples
Reading Government Hangul Documents
λ: /Users/me/2026λ
_μνκ³ν.hwpx μ½μ΄μ€
AI: # 2026λ
_μνκ³ν.hwpx
νμ: .HWPX | λ¬Έλ¨: 153κ° | ν: 15κ° | μ΄λ―Έμ§: 2κ°
β
. μΆμ§ λ°°κ²½
β‘ (κΈλ‘λ² νν©) μ μΈκ³ AI μ루μ
μμ₯ κ·λͺ¨λ ...
### ν 9 (7ν x 4μ΄)
| λλ©μΈ | μ
λ ₯ λ°μ΄ν° | νμ΅ λ΄μ© | μ°μ
AI μ루μ
μ μ© κΈ°λ₯ μμ |
| --- | --- | --- | --- |
| κΈ°κ³ | Β· μΌμ λ°μ΄ν° λ‘κ·Έ ... | ... | ... |Filling Templates
λ: /path/to/form.hwpx μμ {{μ΄λ¦}}=λ¨λν, {{νμ¬}}=ν¬ν
λ© μΌλ‘ μ±μμ€
AI: μ μ₯ μλ£ (saved): form_filled.hwpx
μ΄ 2건 μΉν (2 replacements)
'{{μ΄λ¦}}' β 1건
'{{νμ¬}}' β 1건Text Replacement
λ: /path/to/doc.hwpx μ "μ°μ
AI" λ₯Ό "μ°μ
-AI" λ‘ λ°κΏμ€
AI: 'μ°μ
AI' β 'μ°μ
-AI': 18건 κ΅μ²΄ (replaced 18)
μ μ₯ (saved): doc_modified.hwpxCreating a New .hwpx
λ: employees.hwpx μ "μ¬μ λͺ
λΆ" μ "λ λ²μ§Έ μ€" λ μ€μ κ°μ§ λ¬Έμ λ§λ€μ΄μ€
AI: HWPX λ¬Έμ μμ± μλ£ (created): employees.hwpxExtracting Images
λ: /path/to/document.hwpx μμ μ΄λ―Έμ§ λΉΌμ€
AI: μ΄λ―Έμ§ 2κ°λ₯Ό μΆμΆνμ΅λλ€ (extracted 2 images):
μ μ₯ μμΉ: /path/to/document_images
- image_001.bmp
- image_002.bmpRendering Pages to SVG (for visual analysis)
λ: /path/to/document.hwpx μ 첫 νμ΄μ§λ₯Ό SVGλ‘ λ³΄μ¬μ€
AI: <svg xmlns="..." width="793" height="1122" viewBox="...">
<defs>...</defs>
...
</svg>Or save to disk:
λ: /path/to/document.hwpx λͺ¨λ νμ΄μ§ SVGλ‘ μ μ₯ν΄μ€
AI: 9/9 νμ΄μ§ SVG μ μ₯ (rendered 9/9 pages):
μ μ₯ μμΉ: /path/to/document_pages
- page_001.svg
- page_002.svg ...Limitations
Known constraints of hwp-mcp v0.2:
.hwpwriting not supported β Reading works for both.hwp/.hwpx. Writing is.hwpxonly. Calling writing tools on.hwpinput will return a clear error message. Please save as.hwpxin Hancom Office or wait for v0.3.Cross-format saving denied β
.hwpxinput is saved only as.hwpx.Headers/Footers/Footnotes extractable; Textboxes/Endnotes/Equations in v0.3 β In
read_hwp_textresults, headers are marked as--- headers ---, footers as--- footers ---, and footnotes as--- footnotes ---blocks. Textbox body, endnotes, and equation extraction are planned for v0.3.No matching if search term spans two text nodes β e.g., if one
<hp:t>ends in "Industry" and the next starts with "AI", "IndustryAI" will not match. This is the same limitation as Hancom's hwpctl.Tables in
create_hwpx_documentare flattened to text rows in v0.2 β Real OWPML tables will be in v0.3.
How does it work?
Reading:
@rhwp/core(rhwp's Rust+WASM parser) traverses sections, paragraphs, tables (including merged cells), and images.Writing (.hwpx): Directly parses
Contents/section*.xmlinside the ZIP archive, performs search/replace on<hp:t>text nodes, and re-packages (mimetype stored as per spec). This is a layer to bypass rhwp'sexportHwpx()round-trip issues.New Documents: Created using rhwp's
createBlankDocument+insertText, then saved viaexportHwpx(text round-trip is stable).
Credits
rhwp (@edwardkim) β Core parser, renderer, and Field API. All the work that opened up the closed Hangul format is the foundation of this project. If possible, please support that project as well: https://github.com/edwardkim/rhwp
hwp-mcp β A thin MCP adapter built on top of rhwp that turns it into tools that AI agents can call in natural language. All core capabilities belong to rhwp; we are just the wiring that connects it to LLMs.
Coverage
Area | Coverage |
Reading/Extraction | ~90% |
Rendering | ~85% (SVG Β· HTML Β· Equation SVG Β· Canvas excluded as it's for browsers) |
Writing β Text | ~95% |
Writing β Structure | ~90% (Rows Β· Columns Β· Merging Β· 4 types of images) |
Writing β Formatting | ~70% (Text + Paragraph) |
Meta / Fields | ~85% |
Overall Weighted | ~85% |
Remaining major items for v0.3: .hwp binary writing, charts, style definitions/application, textbox body extraction, hwpctl 30 Actions (intentionally excluded).
English
hwp-mcp is an MCP server for reading and writing Korean Hangul (.hwp / .hwpx) documents from Claude / Cursor / ChatGPT and any MCP-compatible client. Read works for both formats; write currently supports .hwpx (find/replace, template fill, create new doc) β .hwp write is planned for v0.3. Built on top of rhwp (Rust + WebAssembly HWP engine by Edward Kim, MIT). Install: claude mcp add hwp-mcp -- npx -y hwp-mcp.
License
MIT.
Maintenance
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
- FlicenseAqualityDmaintenanceAn MCP server that enables LLMs to convert HWP and HWPX documents into Markdown for analysis and processing. It supports document conversion via local file paths or Base64 content across various MCP-compatible clients.2
- FlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that enables AI models to control Hancom Office Hanword (HWP) documents on Windows. It allows for the automated creation, editing, and management of Korean word processor files, including text formatting and table manipulation.
- AlicenseNot gradedqualityDmaintenanceAn MCP server for reading, editing, and creating Hangul Word Processor (.hwpx) files. It enables users to extract text, perform find-and-replace operations, and modify font styles through automated XML patching.67MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for AI-driven editing of HWPX (Korean word processor) documents, providing 132 tools for text, tables, images, and more.MIT
Related MCP Connectors
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
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/treesoop/hwp-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server