hwpx-mcp-server
Enables AI agents to read, search, and modify HWPX documents directly via MCP, without requiring Hancom Word Processor. Supports pure Python, cross-platform operation.
README
<p align="center"> <h1 align="center">๐ hwpx-mcp-server</h1> <p align="center"> <strong>AI ์์ด์ ํธ๊ฐ HWPX ๋ฌธ์๋ฅผ ๋ฐ๋ก ์ฝ๊ณ , ์ฐพ๊ณ , ์์ ํ๊ฒ ๋ง๋๋ MCP ์๋ฒ</strong> </p> <p align="center"> ํ๊ธ ์๋ํ๋ก์ธ์ ์์ด ยท ์์ ํ์ด์ฌ ยท ํฌ๋ก์ค ํ๋ซํผ </p> <p align="center"> <a href="https://pypi.org/project/hwpx-mcp-server/"><img src="https://img.shields.io/pypi/v/hwpx-mcp-server?style=flat-square&color=blue" alt="PyPI"></a> <a href="https://pypi.org/project/hwpx-mcp-server/"><img src="https://img.shields.io/pypi/pyversions/hwpx-mcp-server?style=flat-square" alt="Python"></a> <a href="https://github.com/airmang/hwpx-mcp-server/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License"></a> <a href="https://github.com/airmang/hwpx-mcp-server/actions"><img src="https://img.shields.io/github/actions/workflow/status/airmang/hwpx-mcp-server/test.yml?style=flat-square&label=tests" alt="Tests"></a> </p> </p>
๐งฉ HWPX Stack (3์ข )
| ๊ณ์ธต | ๋ ํฌ | ์ญํ |
|---|---|---|
| ๐ฆ ๋ผ์ด๋ธ๋ฌ๋ฆฌ | python-hwpx |
์์ ํ์ด์ฌ HWPX ํ์ฑยทํธ์งยท์์ฑ ์ฝ์ด |
| ๐ MCP ์๋ฒ | hwpx-mcp-server |
MCP ํด๋ผ์ด์ธํธ(Claude Desktop, VS Code ๋ฑ)์์ HWPX ์กฐ์ |
| ๐ฏ ์์ด์ ํธ ์คํฌ | hwpx-skill |
์์ด์ ํธ๊ฐ HWPX๋ฅผ ๋ฐ๋ก ์ฐ๊ฒ ํด์ฃผ๋ ๊ณต์ ์จ๋ณด๋ฉ ์คํฌ |
hwpx-mcp-server๋ ๋ชจ๋ธ ์ปจํ ์คํธ ํ๋กํ ์ฝ(MCP) ํ์ค์ ๋ฐ๋ฅด๋ ์๋ฒ๋ก, python-hwpx ๊ธฐ๋ฐ์์ HWPX ๋ฌธ์์ ์ด๋ ยท ๊ฒ์ ยท ํธ์ง ยท ์ถ์ถ์ AI ํด๋ผ์ด์ธํธ์์ ์ง์ ์ํํ ์ ์๊ฒ ํฉ๋๋ค.
์ฐธ๊ณ ์ด ์๋ฒ๋ Open XML ๊ธฐ๋ฐ
.hwpxํฌ๋งท์ ์ง์ํฉ๋๋ค. ๋ฐ์ด๋๋ฆฌ.hwpํฌ๋งท์ ์ง์ ํธ์ง ๋์์ด ์๋๋๋ค.
<br>
์ด ์๋ฒ๊ฐ ๋ฐ๋ก ํด๊ฒฐํ๋ ์ผ
- Claude Desktop, VS Code, Gemini CLI ๊ฐ์ MCP ํด๋ผ์ด์ธํธ์์ HWPX๋ฅผ ๋ฐ๋ก ์ฝ๊ธฐ
- ๋ณต์ฌ๋ณธ์ ๋ง๋ ๋ค ์์ ํ๊ฒ ๊ฒ์ยท์นํยทํ ํธ์งยท๋ฌธ๋จ ์ถ๊ฐ ์ํ
- ๋ฌธ์ ๊ฐ์, ํ ๋งต, ํจํค์ง ๊ตฌ์กฐ๋ฅผ AI๊ฐ ์ง์ ์กฐํํ๊ณ ํ์ ์์ ์ผ๋ก ์ฐ๊ฒฐ
- ํ๊ธ ์๋ํ๋ก์ธ์ ์์ด ์๋ฒยทCIยท๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์์ ๊ฐ์ ํ๋ฆ ์ ์ง
- ๊ณ ๊ธ ๋ชจ๋์์ ๊ฒ์ฆ, package inspection, edit planning๊น์ง ํ์ฅ
Claude Desktop 5๋ถ ์ฐ๊ฒฐ
์๋ ์ค์ ํ๋๋ง ๋ฃ์ผ๋ฉด Claude Desktop์์ hwpx MCP ์๋ฒ๋ฅผ ๋ฐ๋ก ์ก๋๋ค.
{
"mcpServers": {
"hwpx": {
"command": "uvx",
"args": ["hwpx-mcp-server"]
}
}
}
Screenshot placeholder: Claude Desktop ์ค์ ํ๋ฉด์์
hwpx์๋ฒ๊ฐ ํ์ฑํ๋ ์ฅ๋ฉด์ ์ฌ๊ธฐ์ ๋ฃ์ ์์ .
์ ํ์ํ๊ฐ?
๊ตญ๋ด ๊ณต๊ณต๊ธฐ๊ดยทํ๊ตยท๊ธฐ์ ์์๋ ํ๊ธ ๋ฌธ์ ๊ธฐ๋ฐ ์ ๋ฌด๊ฐ ๋ง์ง๋ง, ์๋ํ๋ ์ค๋ซ๋์ ์ด์์ฒด์ ์ ํ๋ก๊ทธ๋จ์ ํฌ๊ฒ ์์กดํ์ต๋๋ค.
hwpx-mcp-server๋ ์ด ์ ์ฝ์ ์ค์ด๋ ๋ฐ ์ด์ ์ ๋ก๋๋ค.
- โ ์ด์์ฒด์ ๋ฌด๊ด โ Windows, macOS, Linux์์ ๋์
- โ ํ๊ธ ์๋ํ๋ก์ธ์ ๋ถํ์ โ ์์ ํ์ด์ฌ ๊ธฐ๋ฐ ์ฒ๋ฆฌ
- โ AI ์ฐ๋ ์ค์ฌ โ Claude Desktop, VS Code, Gemini CLI ๋ฑ MCP ํด๋ผ์ด์ธํธ์ ์ง์ ์ฐ๊ฒฐ
- โ ๋ฌธ์ ํธ์ง์ ๋๊ตฌ ํธ์ถ๋ก ํ์คํ โ ์ฝ๊ธฐ, ํธ์ง, ๋ณต์ , ๊ฒ์ฆ์ MCP ๋๊ตฌ ์งํฉ์ผ๋ก ๋ ธ์ถ
- โ ์ค์ ์์ ํ๋ฆ์ ๋ง์ถ ์ค๊ณ โ read, copy, edit, inspect, validate๋ฅผ ํ ์๋ฒ ํ๋ฉด์ผ๋ก ์ ๋ฆฌ
- โ
์ผ๊ด๋ ํธ์ถ ๋ฐฉ์ โ ๋๊ตฌ ํธ์ถ๋ง๋ค
filename์ ๋ช ์ํ๋ stateless ๊ตฌ์กฐ
<br>
์ฌ์ฉ ์ฌ๋ก
- ์ค์ ์ฌ์ฉ ์ฌ๋ก:
docs/use-cases.md - ์ข
ํฉ ํ
์คํธ ๋ฆฌํฌํธ:
tests/hwpx_mcp_report_updated.md
<br>
๋น ๋ฅธ ์์
1. ์ค์น ๋ฐ ์คํ
uv ๊ธฐ์ค:
uvx hwpx-mcp-server
๋๋ pip ์ค์น ํ ์คํ:
pip install hwpx-mcp-server
hwpx-mcp-server
์๊ตฌ ์ฌํญ:
Python >= 3.10python-hwpx >= 2.10.3
ํ์ฌ ์ ์ฅ์ ๊ธฐ์ค ๊ฒ์ฆ ๋ฒ์ ์ python-hwpx 2.10.3์
๋๋ค (2026-06-09 ๊ฒ์ฆ).
์ต์ ์ง์ ๋ฒ์ ์ python-hwpx >= 2.10.3์
๋๋ค.
2. MCP ํด๋ผ์ด์ธํธ ์ค์
HWPX plugin companion launcher
The hwpx-plugins repository builds per-host bundles whose MCP launcher
(plugins/<host>/hwpx-plugin/scripts/hwpx-mcp-server) can run this server. In local development,
set HWPX_MCP_SERVER_REPO=/absolute/path/to/hwpx-mcp-server and
PYTHON_HWPX_REPO=/absolute/path/to/python-hwpx when the repositories are not under a common
parent. The launcher otherwise discovers them by walking up from the bundle directory and uses
uv run --project "$HWPX_MCP_SERVER_REPO" --with-editable "$PYTHON_HWPX_REPO" --with-editable "$HWPX_MCP_SERVER_REPO" hwpx-mcp-server.
<details> <summary><b>Claude Desktop</b></summary>
claude_desktop_config.json
{
"mcpServers": {
"hwpx": {
"command": "uvx",
"args": ["hwpx-mcp-server"]
}
}
}
</details>
<details> <summary><b>Gemini CLI</b></summary>
~/.gemini/settings.json
{
"mcpServers": {
"hwpx": {
"command": "uvx",
"args": ["hwpx-mcp-server"]
}
}
}
</details>
<details> <summary><b>VS Code</b></summary>
.vscode/mcp.json
{
"servers": {
"hwpx": {
"command": "uvx",
"args": ["hwpx-mcp-server"]
}
}
}
</details>
<details> <summary><b>Cursor / Windsurf</b></summary>
๊ฐ ์๋ํฐ์ MCP ์ค์ ํ์ผ์ ๊ฐ์ ๋ธ๋ก์ ์ถ๊ฐํ๋ฉด ๋ฉ๋๋ค.
{
"mcpServers": {
"hwpx": {
"command": "uvx",
"args": ["hwpx-mcp-server"]
}
}
}
</details>
<br>
์์ ๋ณ ๋น ๋ฅธ ๊ฒฝ๋ก
์ฒ์๋ถํฐ ๋ชจ๋ ๋๊ตฌ๋ฅผ ์ธ์ธ ํ์๋ ์๋ค. ๋ณดํต์ ์๋ ๋ค ํ๋ฆ ์ค ํ๋๋ก ์์ํ๋ฉด ๋๋ค.
1. ์ฝ๊ธฐ ์ ์ฉ์ผ๋ก ๋ฌธ์๋ฅผ ํ์ ํ ๋
get_document_infoget_document_outline๋๋get_document_textfind_text,get_table_text,get_table_map๊ฐ์ ์ฝ๊ธฐ ๋๊ตฌ๋ก ํ์ํ ๋ถ๋ถ๋ง ๋ ๋ณธ๋ค.
์ด ํ๋ฆ์ ์๋ณธ์ ์ ์ฅํ์ง ์๋๋ค.
2. ์์ ํ๊ฒ ์์ ํ ๋
copy_document๋ก ์์ ์ฉ ์ฌ๋ณธ์ ๋ง๋ ๋ค.- ์ฝ๊ธฐ ๋๊ตฌ๋ก ์์ ๋์์ ๋ค์ ํ์ธํ๋ค.
search_and_replace,batch_replace,set_table_cell_text,add_paragraph๊ฐ์ ๊ฐ์ฅ ์์ ๋ณ๊ฒฝ ๋๊ตฌ๋ง ์ด๋ค.- ์์ ํ ๋ค์ ์ฝ๊ธฐ ๋๊ตฌ๋ก ๊ฒฐ๊ณผ๋ฅผ ํ์ธํ๋ค.
- ๋ฉํ์ด๋ handoff๊ฐ ํ์ํ๋ฉด ๊ฒํ ๊ฐ ๋๋ ๋ณต์ฌ๋ณธ ํ์ผ์ ๊ทธ๋๋ก ๋๊ธด๋ค.
ํต์ฌ์ copy first, smallest edit, re-read after edits๋ค.
3. ๊ตฌ์กฐ ์ ๊ฒ๊ณผ ๊ฒ์ฆ์ด ๋ชฉ์ ์ผ ๋
- MCP ์ค์ ์์
HWPX_MCP_ADVANCED=1 package_parts,package_get_xml,package_get_text๋ก ๋ด๋ถ ํํธ๋ฅผ ๋ณธ๋ค.validate_structure,lint_text_conventions,plan_edit,preview_edit๋ ๊ธฐ๋ณธ ํธ์ง ํ๋ฆ๊ณผ ์์ง ์๊ณ ์ ๊ฒ/๊ฒ์ฆ ๋จ๊ณ์์๋ง ์ฌ์ฉํ๋ค.
4. ํ์ปด์์ ์ด๋ฆฌ์ง ์๋ HWPX๋ฅผ ๋ณต๊ตฌํ ๋
- ์๋ณธ์ ์ง์ ๋ฎ์ด์ฐ์ง ์๊ณ
repair_hwpx(source_filename, output_filename)๋ก ๋ณต๊ตฌ ๋ณต์ฌ๋ณธ์ ๋ง๋ ๋ค. - ์ผ๋ฐ ZIP open์ด ์คํจํ๊ฑฐ๋ central directory ์์์ด ์์ฌ๋๋ฉด
recover=true๋ฅผ ์ง์ ํ๋ค. - ๋ฐํ๊ฐ์
crcOk,validatePackage.ok,reordered,recovered๋ฅผ ํ์ธํ๋ค. - ์ต์ข handoff ์ ์๋ ๊ฐ๋ฅํ๋ฉด Hancom Office HWP ๋๋ viewer๋ก ์ค์ ์ด๋ํ๋ค.
์์ ํ ์ฌ์ฉ ์์น
์ด ์๋ฒ์ ๊ณต๊ฐ ํ๋ฉด์ ํ์ฌ README์ ์ ํ MCP ๋๊ตฌ ์งํฉ์ด๋ค. ์ํฌํ๋ก ๋ฌธ์๋ ์คํฌ ์์๋ ์ด ๋๊ตฌ๋ค์ ์กฐํฉํ๋ ์ฌ์ฉ ํจํด์ด์ง, ๋ณ๋์ ์ public tool ๊ณ์ฝ์ด ์๋๋ค.
์ค์ ์์๋ ์๋ ์์๊ฐ ๊ฐ์ฅ ์์ ํ๋ค.
- ๋จผ์
get_document_info,get_document_text,find_text๊ฐ์ ์ฝ๊ธฐ ๋๊ตฌ๋ก ๋ฌธ์๋ฅผ ํ์ ํ๋ค. - ์์ ์ ๊ฒฐ๊ณผ๋ฌผ์ ๋ณด์กดํด์ผ ํ๋ฉด
copy_document๋ฅผ ๋จผ์ ํธ์ถํ๋ค. - ์์ ๋๊ตฌ๋ ํธ์ถ ์ฆ์ ์ ์ฅ๋๋ฏ๋ก, ๊ฒํ ์ฉ ๊ฒฝ๋ก๊ฐ ํ์ํ๋ฉด ์๋ณธ ๋์ ๋ณต์ฌ๋ณธ์์ ์์ ํ๋ค.
- ๊ฒฐ๊ณผ๋ฌผ์ ๋ฐ๋ก ๋๊ฒจ์ผ ํ๋ฉด ๊ฒํ ๊ฐ ๋๋ ๋ณต์ฌ๋ณธ ํ์ผ์ handoff ๊ฒฝ๊ณ๋ก ์ฌ์ฉํ๋ค.
- package inspection, edit planning, validation์
HWPX_MCP_ADVANCED=1์ผ ๋๋ง ์ฐ๊ณ , ๊ธฐ๋ณธ ํ๋ฆ๊ณผ ์์ด ์ฐ์ง ์๋๋ค.
์งง๊ฒ ๋งํ๋ฉด:
- read first
- copy before risky edits
- mutating tools persist immediately
- explicit handoff uses the reviewed copy
- advanced mode๋ ์ ๊ฒ/๊ฒ์ฆ์ฉ์ผ๋ก ๋ถ๋ฆฌ
๋๊ตฌ ๋์ ๋น ๋ฅธ ๊ฐ๊ฐ
| ๊ตฌ๋ถ | ๋ํ ๋๊ตฌ | ํน์ง |
|---|---|---|
| ํ์ผ ๊ธฐ๋ฐ ์ฝ๊ธฐ ์ ์ฉ | get_document_info, get_document_text, get_paragraph_text, get_location_text, get_paragraphs_text, find_text, get_table_text, get_table_map, find_cell_by_label, list_styles, list_available_documents |
๊ธฐ์กด .hwpx ํ์ผ์ ์ฝ๊ฑฐ๋ ํ์๋ง ํ๋ค. ์ ์ฅํ์ง ์๋๋ค. |
| ํ์ผ ๊ธฐ๋ฐ ์ฆ์ ์ ์ฅ ์์ฑ/ํธ์ง | create_document, create_document_from_plan, create_proposal_document, search_and_replace, batch_replace, replace_in_paragraph, replace_by_anchor, add_heading, add_paragraph, insert_paragraph, delete_paragraph, add_table, fill_by_path, set_table_cell_text, add_page_break, add_memo, add_memo_by_anchor, remove_memo, format_text, create_custom_style, merge_table_cells, split_table_cell, format_table |
ํธ์ถ ๊ฒฐ๊ณผ๊ฐ ๊ณง ๋์ ํ์ผ ๋ณ๊ฒฝ์ด๋ค. ๊ฒํ ์ฉ์ด๋ฉด ๋จผ์ ๋ณต์ฌ๋ณธ์์ ์์ ํ๋ค. |
| ์ ์ธํ ์์ฑ ๊ฒ์ฆ | validate_document_plan, analyze_document_plan, inspect_document_authoring_quality, inspect_operating_plan_quality, inspect_document_quality, analyze_template_formfit |
agent๊ฐ ๋ง๋ hwpx.document_plan.v1, P6 baseline, ๋๋ ์์ฑ ๊ฒฐ๊ณผ๋ฅผ ๊ฒ์ฆํ๋ค. validate_document_plan, analyze_document_plan, analyze_template_formfit์ ํ์ผ์ ์ฐ์ง ์๋๋ค. |
| repair/recover | repair_hwpx |
์๋ณธ์ ๋ณด์กดํ๊ณ ์ output์ mimetype-first repair-repack ๋๋ Local File Header scan ๋ณต๊ตฌ๋ฅผ ์ํํ๋ค. |
| ๋ณต์ / handoff ๊ฒฝ๊ณ | copy_document |
์๋ณธ ๋ณดํธ์ reviewable working copy ๋ถ๋ฆฌ์ ์ด๋ค. ํ์ฌ FastMCP surface์๋ ๋ณ๋ public save / save_as tool์ด ์๋ค. |
| payload/url ๊ธฐ๋ฐ ์ถ์ถ | hwpx_to_markdown, hwpx_to_html, hwpx_extract_json |
ํ์ผ๋ช ์ ์ง์ ์์ ํ์ง ์๋๋ค. HWPX payload ๋๋ URL์ ์ฝ์ด ๋ณํ ๊ฒฐ๊ณผ๋ง ๋๋ ค์ค๋ค. |
| ๊ณ ๊ธ ์ ๊ฒ/๊ฒ์ฆ | package_parts, package_get_xml, package_get_text, object_find_by_tag, object_find_by_attr, plan_edit, preview_edit, apply_edit, validate_structure, lint_text_conventions |
HWPX_MCP_ADVANCED=1์ผ ๋๋ง ํ์ฑํํ๋ค. package/๊ตฌ์กฐ ์ ๊ฒ์ฉ์ด๋ค. |
์ฃผ์ ๊ธฐ๋ฅ
๊ธฐ๋ณธ ๋ชจ๋์์ 52๊ฐ HWPX ๋๊ตฌ๋ฅผ ์ ๊ณตํ๋ฉฐ, ๊ณ ๊ธ ๋ชจ๋(HWPX_MCP_ADVANCED=1)์์๋ ์ ๊ฒยท๊ฒ์ฆ์ฉ ๋๊ตฌ๊น์ง ์ด 62๊ฐ๊ฐ ํ์ฑํ๋ฉ๋๋ค.
์์น ๊ณ์ฝ
paragraph_index๋ ๋ฌธ์ ๋ณธ๋ฌธ ์ง์ ๋ฌธ๋จ์ 0-based ์ธ๋ฑ์ค๋ค. ํ ์ ๋ฌธ๋จ์ ์ด ์ธ๋ฑ์ค์ ์์ง ์๊ณ location ๊ฐ์ฒด๋ก ์ง์ ํ๋ค. ํ ์
๋ฌธ๋จ location์ {"kind":"table_cell_paragraph","table_index":0,"row":0,"col":1,"cell_paragraph_index":0} ํํ์ด๋ฉฐ, get_table_map๊ณผ find_text๊ฐ ๋ฐํํ ๊ฐ์ get_paragraph_text, get_location_text, add_memo, replace_in_paragraph์ ๊ทธ๋๋ก ๋๊ธธ ์ ์๋ค.
๐ ์ฝ๊ธฐ ๋ฐ ํ์
| ๋๊ตฌ | ์ค๋ช |
|---|---|
get_document_info |
๋ฌธ์ ๋ฉํ๋ฐ์ดํฐ, ์น์ , ๋ฌธ๋จ, ํ ๊ฐ์ ์กฐํ |
get_document_text |
๋ฌธ์ ์ ์ฒด ํ
์คํธ ์ถ์ถ (max_chars ์ง์) |
get_document_outline |
์ ๋ชฉ๊ณผ ๊ฐ์ ๊ตฌ์กฐ ์ถ์ถ |
get_paragraph_text |
๋ณธ๋ฌธ ๋ฌธ๋จ ๋๋ location์ผ๋ก ์ง์ ํ ํ ์
๋ฌธ๋จ ํ
์คํธ ์กฐํ |
get_location_text |
get_table_map/find_text๊ฐ ๋ฐํํ location์ผ๋ก ํ
์คํธ ์กฐํ |
get_paragraphs_text |
๋ฌธ๋จ ๋ฒ์ ์กฐํ |
list_available_documents |
ํด๋ ์์ .hwpx ํ์ผ ๋ชฉ๋ก ์กฐํ |
๐ ๊ฒ์ ๋ฐ ์นํ
find_text๋ ์ฝ๊ธฐ ์ ์ฉ์ด๊ณ , search_and_replace / batch_replace๋ ํธ์ถ ์ฆ์ ์ ์ฅ๋๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
find_text |
ํค์๋ ๊ฒ์๊ณผ ์ฃผ๋ณ ๋ฌธ๋งฅ, ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ location/anchor ๋ฐํ |
search_and_replace |
๋จ์ผ ํ ์คํธ ์นํ |
replace_in_paragraph |
๋ณธ๋ฌธ/ํ ์ ๋ฌธ๋จ ํ๋์์ run ์์์ ์ ์งํ๋ฉฐ ๋ถ๋ถ ์นํ |
replace_by_anchor |
find_text๊ฐ ๋ฐํํ anchor์ ์ ํํ ์์น์์ ๋ถ๋ถ ์นํ |
batch_replace |
์ฌ๋ฌ ์นํ ์์ ์ผ๊ด ์คํ |
โ๏ธ ๋ฌธ์ ํธ์ง
์ด ์นดํ
๊ณ ๋ฆฌ์ ๋๊ตฌ๋ ๋์ฒด๋ก ๋์ ํ์ผ์ ์ฆ์ ๋ฐ์๋๋ค. ๊ตฌ์กฐ ๋ณ๊ฒฝ ์ ์๋ copy_document๋ก ์์
์ฉ ์ฌ๋ณธ์ ๋ง๋ค๊ณ , handoff๋ ๊ฒํ ๊ฐ ๋๋ ๋ณต์ฌ๋ณธ ํ์ผ ๊ธฐ์ค์ผ๋ก ์ก๋ ํธ์ด ์์ ํ๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
add_heading |
์ ๋ชฉ(ํค๋ฉ) ๋ฌธ๋จ ์ถ๊ฐ |
add_paragraph / insert_paragraph / delete_paragraph |
๋ฌธ๋จ ์ถ๊ฐ, ์ฝ์ , ์ญ์ |
add_page_break |
ํ์ด์ง ๋๋๊ธฐ ์ถ๊ฐ |
add_memo / add_memo_by_anchor / remove_memo |
๋ณธ๋ฌธ ๋ฌธ๋จ ๋๋ ํ ์ ๋ฌธ๋จ์ ๋ฉ๋ชจ ์ถ๊ฐ, ๊ฒ์ anchor ๊ธฐ๋ฐ ๋ฉ๋ชจ ์ถ๊ฐ, ์ ๊ฑฐ |
๐งพ ์ ์ธํ ๋ฌธ์ ์์ฑ
hwpx.document_plan.v1์ agent๊ฐ OWPML์ ์ง์ ๋ง์ง์ง ์๊ณ ์ ๋ชฉ, ๋ฌธ๋จ, bullet, ํ, ํ์ง ๊ฒ์ดํธ๋ฅผ ์ ์ธํ๋ ์์ฑ ๊ณ์ฝ์ด๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
validate_document_plan |
plan์ ๊ฒ์ฆํ๊ณ ์ ๊ทํ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํํ๋ค. ํ์ผ์ ์์ฑํ์ง ์๋๋ค. |
analyze_document_plan |
ํ์ผ์ ์ฐ์ง ์๊ณ ์์ฑ ๊ฐ๋ฅ ์ฌ๋ถ, ์ ๊ทํ plan, ์ ํํ ํ์ง ํ๋กํ์ preview๋ฅผ ๋ฐํํ๋ค. |
create_document_from_plan |
plan์ HWPX๋ก ์์ฑํ๊ณ ์ฆ์ ์ ์ฅํ ๋ค reopen/package/schema ๊ฒ์ฆ๊ณผ ํ์ง ํ๋กํ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํํ๋ค. |
inspect_document_authoring_quality |
์์ฑ๋ HWPX์ document-plan ํ์ง ๊ทผ๊ฑฐ๋ฅผ ๋ค์ ์กฐํํ๋ค. quality_profile="operating_plan"์ ์ง์ ํ ์ ์๋ค. |
inspect_operating_plan_quality |
์ด์ ๊ณํ์ ์ ์ถ ํ๋ณด์ ์น์ , ์ผ์ ํ, ์ฌ์ ๋น ๊ทผ๊ฑฐ, ๊ธฐ๋ ํจ๊ณผ, ๋ง๊ฐ ๋ฌธ๊ตฌ, placeholder ์์ฌ๋ฌผ์ ์ง์ ๊ฒ์ฌํ๋ค. |
analyze_template_formfit |
P6 ๊ธฐ์ค์ ๊ธฐ๋ฐ ์์ ๋ณด์กด ์์ฑ ๊ณํ์ ๋นํ๊ดด ๋ถ์ํ๋ค. |
apply_template_formfit |
๋ถ์๋ ๊ณํ์ ์๋ณธ๊ณผ ๋ค๋ฅธ destination ๋ณต์ฌ๋ณธ์๋ง ์ ์ฉํ๊ณ ๊ฒ์ฆํ๋ค. |
create_proposal_document / inspect_document_quality |
์ ์์/๊ธฐํ์ ํนํ ํธํ ๊ฒฝ๋ก |
visual_review_required=true๋ ๊ตฌ์กฐ/ํ์ผ ๊ธฐ๋ฐ ๊ฒ์ฆ์ ํต๊ณผํ์ง๋ง ๋ ๋๋ง๋
์๊ฐ ๋ ์ด์์์ ์์ง ์ฆ๋ช
๋์ง ์์๋ค๋ ๋ป์ด๋ค. ์ด์ ๊ณํ์์ template-formfit
๊ฒฐ๊ณผ๋ฅผ ์ต์ข
์ ์ถ ๊ฐ๋ฅ(submission-ready) ์ํ๋ก ์ฃผ์ฅํ๋ ค๋ฉด
../hwpx-skill/scripts/visual_review.py ๋๋ ComputerUse๋ก ์ด๋ฆฐ ๋ฌธ์๋ฅผ ๊ฒํ ํด
hwpx.visual-review.v1 ์ฆ๊ฑฐ๋ฅผ ๋จ๊ธฐ๊ณ current.status="observed_pass"์ฌ์ผ
ํ๋ค. HWPX viewer๊ฐ ์๋ ํ๊ฒฝ์์๋ fallback ์ฆ๊ฑฐ๋ฅผ
current.status="blocked"๋ก ๊ธฐ๋กํ๊ณ ์์ฌ ์ํ์ ์ ์งํ๋ค.
validate_document_plan ๊ฒฐ๊ณผ๊ฐ ok=false์ด๋ฉด issues[].code,
issues[].path, repairHints[]๋ฅผ ๋ณด๊ณ plan์ ์์ ํ ๋ค ๋ค์ ๊ฒ์ฆํ๋ค.
์ด๋ can_create=false์ด๋ฏ๋ก create_document_from_plan์ ํธ์ถํ์ง ์๋๋ค.
table ์ค๋ฅ๋ columns[].key์ rows[] key๋ฅผ ๋ง์ถ๊ณ , style warning์ ์ง์
token์ผ๋ก ๋ฐ๊พธ๊ฑฐ๋ ์๋ตํ๋ค. ์์ฑ ํ package/schema ์ค๋ฅ๊ฐ ์์ผ๋ฉด
quality.validation.*.issues[]์ quality.recovery.repair_hints[]๋ฅผ ํ์ธํด
์ฌ์ ์ฅ ๋๋ ์ฌ์์ฑํ๋ค.
์ด์ ๊ณํ์ ์์ฑ์ ๋ค์ ์์๋ฅผ ๊ถ์ฅํ๋ค.
validate_document_plan(document_plan)์ผ๋ก schema์ block/table ์ค๋ฅ๋ฅผ ๋จผ์ ๊ณ ์น๋ค.analyze_document_plan(document_plan, quality_profile="operating_plan")์ผ๋ก ํ์ผ ์์ฑ ์์ด ํ์ง preview๋ฅผ ํ์ธํ๋ค.handoff_status="ready"์ด๋ฉดcreate_document_from_plan(filename, document_plan, quality_profile="operating_plan")์ผ๋ก ๋ช ์ํ ๊ฒฝ๋ก์๋ง ์์ฑํ๋ค.handoff_status="needs_revision"์ด๋ฉดquality.gaps[]์quality.profiles.operating_plan.repair_hints[]๋ฅผ ๋ฐ์ํด plan์ ๋ณด๊ฐํ๋ค.- ์์ฑ ํ
get_document_text,get_table_text๋ก ๊ฒฐ๊ณผ๋ฅผ ๋ค์ ์ฝ๋๋ค. visual_review_required=true์ด๋ฉดvisual_review.py๋๋ ์ด๋ฆฐ ๋ฌธ์ ๊ฒํ ๋กhwpx.visual-review.v1์ฆ๊ฑฐ๋ฅผ ์์ฑํ๋ค.current.status="observed_pass"๊ฐ ์๋๋ฉดhandoff_status="ready"๋ฅผ ์ต์ข ์ ์ถ ๊ฐ๋ฅ(submission-ready)์ผ๋ก ์ค๋ช ํ์ง ์๋๋ค.
์น์ธ๋ HWPX ์์์ ๋ณด์กดํด์ผ ํ๋ ๊ฒฝ์ฐ์๋ create_document_from_plan์ผ๋ก ์
๋ฌธ์๋ฅผ ๋ง๋ค์ง ๋ง๊ณ P6 baseline ๊ธฐ๋ฐ form-fit ๊ฒฝ๋ก๋ฅผ ์ฌ์ฉํ๋ค.
analyze_template_formfit(source_filename, baseline, content, destination_filename)์ผ๋ก ์๋ณธ์ด ๋ณ๊ฒฝ๋์ง ์๋์ง์ required anchor ํด์ ์ฌ๋ถ๋ฅผ ํ์ธํ๋ค.unresolved_count > 0์ด๋ฉดunresolved[].reason์ ๋ฐ๋ผ content ๋๋ baseline locator๋ฅผ ๋ณด๊ฐํ๋ค.apply_template_formfit(analysis=..., confirm=true)๋ก ์๋ณธ๊ณผ ๋ค๋ฅธ destination์๋ง ์ ์ฉํ๋ค.source.preserved,validation.validate_package.ok,validation.validate_document.ok,residual_markers.blocking == []๋ฅผ ํ์ธํ๋ค.visual_review_required=true์ด๋ฉดvisual_review.py๋๋ ์ด๋ฆฐ ๋ฌธ์ ๊ฒํ ๋กhwpx.visual-review.v1์ฆ๊ฑฐ๋ฅผ ์์ฑํ๋ค.current.status="observed_pass"๊ฐ ์๋๋ฉดhandoff_status="ready"๋ฅผ ์ต์ข ์ ์ถ ๊ฐ๋ฅ(submission-ready)์ผ๋ก ์ค๋ช ํ์ง ์๋๋ค.
๐งฏ ํจํค์ง ๋ณต๊ตฌ
repair_hwpx๋ ์๋ณธ์ ์ง์ ์์ ํ์ง ์๊ณ ์ output ๊ฒฝ๋ก์ ๋ณต๊ตฌ ๋ณต์ฌ๋ณธ์ ๋ง๋ ๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
repair_hwpx |
recover=false์ด๋ฉด mimetype ์ฒซ ์ํธ๋ฆฌ/ZIP_STORED ์ฌํจํน๊ณผ CRC self-check๋ฅผ ์ํํ๋ค. recover=true์ด๋ฉด central directory ์์ ZIP์ Local File Header scan์ผ๋ก ๋ณต๊ตฌํ ๋ค ์ฌํจํนํ๋ค. |
ํ์ธํ ์๋ต ํ๋๋ crcOk, validatePackage.ok, reordered, recovered, entryCount๋ค.
๊ธฐ๊ณ ๊ฒ์ฆ ํ์๋ ์ ์ถยท๋ฉํ ์ ์๋ ๊ฐ๋ฅํ๋ฉด Hancom Office HWP ๋๋ viewer์์ ์ค์ ์ด๋ํ๋ค.
๐พ ๋ณต์
์ด ์นดํ ๊ณ ๋ฆฌ๋ ์์ ์ํฌํ๋ก์ ์์ ์ฅ์น๋ค. ์๋ณธ ๋ณดํธ์ reviewable working copy ๋ถ๋ฆฌ์ ์ด๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
copy_document |
์๋ณธ์ ๊ฑด๋๋ฆฌ๊ธฐ ์ ์ ์์ ์ฉ ์ฌ๋ณธ ์์ฑ |
๐ ํ ํธ์ง
get_table_text, get_table_map, find_cell_by_label๋ ์ฝ๊ธฐ ์ ์ฉ์ด๋ค. fill_by_path, set_table_cell_text, merge_table_cells, split_table_cell, format_table์ ํธ์ถ ์ฆ์ ์ ์ฅ๋๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
add_table / get_table_text |
ํ ์์ฑ, ์กฐํ |
get_table_map |
ํ๊ฐ ๋ง์ ๋ฌธ์์์ ํ ์์น, ํฌ๊ธฐ, caption/์ง์ ๋ฌธ๋จ ๋ฌธ๋งฅ, ์ ๋ฌธ๋จ location์ ๋น ๋ฅด๊ฒ ํ์ |
find_cell_by_label |
ํ๊ตญ์ด ์์/ํ ํ๋ฆฟ์์ ๋ผ๋ฒจ ์ ๊ธฐ์ค์ผ๋ก ์ ๋ ฅ ๋์ ์ ์ฐพ๊ธฐ |
fill_by_path |
์ฑ๋ช
> right, ์์ > right, ํฉ๊ณ > down > right ๊ฐ์ ๊ฒฝ๋ก ๊ตฌ๋ฌธ์ผ๋ก ์
์ฑ์ฐ๊ธฐ |
set_table_cell_text |
์
ํ
์คํธ ์์ . ๊ธฐ๋ณธ๊ฐ์ ๊ธฐ์กด charPr ์์ ๋ณด์กด์ด๋ฉฐ, split_paragraphs=true๋ก ๋ฉํฐ๋ผ์ธ์ ์ฌ๋ฌ hp:p๋ก ๋ถ๋ฆฌ |
merge_table_cells / split_table_cell |
์ ๋ณํฉ, ๋ถํ |
format_table |
ํ ํค๋ ๋ฑ ๊ธฐ๋ณธ ์์ ์ ์ฉ |
๋ณ๊ฒฝ ๋๊ตฌ๋ ํธ์ถ ์ ์ฆ์ ์ ์ฅ๋ฉ๋๋ค. ๊ฒํ ์ฉ ์ฌ๋ณธ์ด ํ์ํ๋ฉด copy_document๋ฅผ ๋จผ์ ์ฌ์ฉํ๊ณ , ๋ฉํ๋ณธ์ ๊ฒํ ๊ฐ ๋๋ ๋ณต์ฌ๋ณธ ํ์ผ์ ๊ธฐ์ค์ผ๋ก ๊ด๋ฆฌํ์ธ์.
๐จ ์์ ๋ฐ ์คํ์ผ
list_styles๋ ์ฝ๊ธฐ ์ ์ฉ์ด๋ค. format_text, create_custom_style์ ๋ฌธ์๋ฅผ ์ง์ ๊ฐฑ์ ํ๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
format_text |
ํ ์คํธ ๋ฒ์ ์์ ์ ์ฉ |
create_custom_style |
์ปค์คํ ์คํ์ผ ์์ฑ |
list_styles |
๋ฌธ์ ์คํ์ผ ๋ชฉ๋ก ์กฐํ |
์คํ์ผ ์ฐธ์กฐ ํ: add_paragraph(..., style=...)์ insert_paragraph(..., style=...)๋ list_styles์ id, create_custom_style์ด ๋ฐํํ๋ style_id, ์คํ์ผ ์ด๋ฆ์ ๋ชจ๋ ๋ฐ์ ์ ์์ต๋๋ค.
๐ค ์ถ์ถ
์ด ์นดํ ๊ณ ๋ฆฌ๋ filename ๊ธฐ๋ฐ ํธ์ง ๋๊ตฌ๊ฐ ์๋๋ค. HWPX payload ๋๋ URL์ ์ฝ์ด ๋ณํ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํํ๋ค.
| ๋๊ตฌ | ์ค๋ช |
|---|---|
hwpx_to_markdown |
HWPX ๋ฌธ์๋ฅผ Markdown์ผ๋ก ๋ณํ |
hwpx_to_html |
HWPX ๋ฌธ์๋ฅผ HTML๋ก ๋ณํ |
hwpx_extract_json |
HWPX ๋ฌธ์๋ฅผ ๊ตฌ์กฐํ๋ JSON์ผ๋ก ์ถ์ถ |
๐ฌ ๊ณ ๊ธ ๋๊ตฌ
HWPX_MCP_ADVANCED=1์ผ ๋ ํ์ฑํ:
| ๋๊ตฌ | ์ค๋ช |
|---|---|
package_parts |
OPC ํํธ ๋ชฉ๋ก ์กฐํ |
package_get_xml / package_get_text |
ํํธ XML ๋๋ ํ ์คํธ ์กฐํ |
object_find_by_tag / object_find_by_attr |
XML ์์ ๊ฒ์ |
plan_edit / preview_edit / apply_edit |
ํธ์ง ๊ณํ, ๋ฏธ๋ฆฌ๋ณด๊ธฐ, ์ ์ฉ |
validate_structure / lint_text_conventions |
๊ตฌ์กฐ ๊ฒ์ฆ, ํ ์คํธ ๊ท์น ์ ๊ฒ |
๐ฉบ ์๋ฒ ์ง๋จ
| ๋๊ตฌ | ์ค๋ช |
|---|---|
mcp_server_health |
transport, timeout, sandbox ๊ฒฝ๋ก ์๋ด, ๋์ฉ๋ ๋ฌธ์/์ ํด stdio/์๊ฒฉ fetch timeout ๊ฐ์ disconnect ๊ฐ๋ฅ ์กฐ๊ฑด๊ณผ keepalive ์ ๊ฒ ์ ๋ณด๋ฅผ ๋ฐํ |
<br>
ํ๊ฒฝ ๋ณ์
| ๋ณ์ | ์ค๋ช | ๊ธฐ๋ณธ๊ฐ |
|---|---|---|
HWPX_MCP_MAX_CHARS |
ํ ์คํธ ๋ฐํ ๋๊ตฌ ๊ธฐ๋ณธ ์ต๋ ๊ธธ์ด | 10000 |
HWPX_MCP_AUTOBACKUP |
1์ด๋ฉด ์ ์ฅ ์ .bak ๋ฐฑ์
์์ฑ |
1 |
HWPX_MCP_ADVANCED |
1์ด๋ฉด ๊ณ ๊ธ ๋๊ตฌ ํ์ฑํ |
0 |
HWPX_MCP_SANDBOX_ROOT |
์ค์ ์ ์ด root ๋ด๋ถ ์๋๊ฒฝ๋ก ๋๋ ๋ด๋ถ ์ ๋๊ฒฝ๋ก๋ง ํ์ฉ | unset |
HWPX_MCP_FETCH_TIMEOUT_SECONDS |
URL ๊ธฐ๋ฐ HWPX fetch timeout | 20.0 |
LOG_LEVEL |
๋ก๊ทธ ๋ ๋ฒจ | INFO |
ํ๊ฒฝ ๋ณ์ ํฌํจ MCP ์ค์ ์์:
{
"mcpServers": {
"hwpx": {
"command": "uvx",
"args": ["hwpx-mcp-server"],
"env": {
"HWPX_MCP_MAX_CHARS": "12000",
"HWPX_MCP_AUTOBACKUP": "1",
"HWPX_MCP_ADVANCED": "0",
"LOG_LEVEL": "INFO"
}
}
}
}
<br>
ํ ์คํธ
# ํ
์คํธ ์์กด์ฑ ์ค์น
python -m pip install -e ".[test]"
# ์ ์ฒด ํ
์คํธ
python -m pytest -q
์ถ๊ฐ ์ฐธ๊ณ :
- ์ฌ์ฉ ์ฌ๋ก:
docs/use-cases.md - ์ข
ํฉ ๋ฆฌํฌํธ:
tests/hwpx_mcp_report_updated.md - ์คํฌ ๊ธฐ๋ฐ ์ํฌํ๋ก:
docs/skill-first-workflows.md
<br>
License
Apache License 2.0. See LICENSE and NOTICE.
<br>
์์ฑ์
๊ณ ๊ทํ โ ๊ด๊ต๊ณ ๋ฑํ๊ต ์ ๋ณดยท์ปดํจํฐ ๊ต์ฌ
- ์ด๋ฉ์ผ: kokyuhyun@hotmail.com
- GitHub: @airmang
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.