HWPX MCP Server

HWPX MCP Server

Enables AI models to read, create, and edit Korean HWPX documents with advanced support for tables, paragraphs, styles, and images. It features enhanced stability through atomic file writing and smart layout recalculation to prevent document corruption.

Category
Visit Server

README

HWPX MCP Server - Enhanced Edition

GitHub Fork

๐Ÿš€ Original ํ”„๋กœ์ ํŠธ๋ฅผ Forkํ•˜์—ฌ ์•ˆ์ •์„ฑ๊ณผ ๊ธฐ๋Šฅ์„ ๋Œ€ํญ ๊ฐœ์„ ํ•œ ๋ฒ„์ „์ž…๋‹ˆ๋‹ค.

AI ๋„๊ตฌ(Claude ๋“ฑ)์™€ ์—ฐ๋™ํ•˜์—ฌ ํ•œ๊ธ€(HWPX) ๋ฌธ์„œ๋ฅผ ์ž๋™์œผ๋กœ ํŽธ์ง‘ํ•  ์ˆ˜ ์žˆ๋Š” MCP(Model Context Protocol) ์„œ๋ฒ„์ž…๋‹ˆ๋‹ค.


๐ŸŒ Cross-Platform Support

๋ชจ๋“  ์šด์˜์ฒด์ œ์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค!

OS MCP ์„œ๋ฒ„ HWPX ํŽธ์ง‘ ๊ฒฐ๊ณผ๋ฌผ ํ™•์ธ
โœ… Windows โœ… โœ… ํ•œ์ปด์˜คํ”ผ์Šค
โœ… macOS โœ… โœ… ํ•œ์ปด์˜คํ”ผ์Šค Mac
โœ… Linux โœ… โœ… ํ•œ์ปด์˜คํ”ผ์Šค Linux / LibreOffice*

์™œ ๊ฐ€๋Šฅํ•œ๊ฐ€์š”? HWPX ํŒŒ์ผ์€ ZIP + XML ๊ตฌ์กฐ์ž…๋‹ˆ๋‹ค. ํ•œ๊ธ€ ํ”„๋กœ๊ทธ๋žจ ์—†์ด๋„ Node.js๋งŒ์œผ๋กœ ์™„๋ฒฝํ•˜๊ฒŒ ์ฝ๊ณ  ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

*LibreOffice๋Š” HWPX๋ฅผ ์ œํ•œ์ ์œผ๋กœ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์™„๋ฒฝํ•œ ํ˜ธํ™˜์„ ์œ„ํ•ด ํ•œ์ปด์˜คํ”ผ์Šค ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.


โœจ Enhanced Features (๊ฐœ์„ ๋œ ๊ธฐ๋Šฅ)

์›๋ณธ ํ”„๋กœ์ ํŠธ ๋Œ€๋น„ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ•ต์‹ฌ ๋ฌธ์ œ๋“ค์„ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค:

๐Ÿ”ง Critical Bug Fixes

๋ฌธ์ œ ์›๋ณธ ์ƒํƒœ ๊ฐœ์„  ํ›„
ํ…Œ์ด๋ธ” ์ €์žฅ ์‹คํŒจ ์…€ ์ˆ˜์ • ํ›„ ์ €์žฅํ•ด๋„ ๋ณ€๊ฒฝ์‚ฌํ•ญ ์‚ฌ๋ผ์ง โœ… ์™„๋ฒฝํ•˜๊ฒŒ ์ €์žฅ๋จ
ํ…์ŠคํŠธ ๊ฒน์นจ ํ˜„์ƒ ์ €์žฅ ํ›„ ํ•œ๊ธ€์—์„œ ์—ด๋ฉด ๊ธ€์ž๊ฐ€ ๊ฒน์ณ ํ‘œ์‹œ โœ… ์ •์ƒ ํ‘œ์‹œ
ํŒŒ์ผ ์†์ƒ ์ €์žฅ ์‹œ ๊ฐ€๋” ํŒŒ์ผ์ด ์†์ƒ๋จ โœ… ์›์ž์  ์“ฐ๊ธฐ๋กœ 100% ์•ˆ์ „
๋‹ค์ค‘ ์…€ ์†์ƒ ๊ฐ™์€ ํ–‰์— ์—ฌ๋Ÿฌ ์…€ ์ˆ˜์ • ์‹œ XML ์†์ƒ โœ… ์ธ๋ฑ์Šค ๊ด€๋ฆฌ๋กœ ์•ˆ์ „
์ž๊ฐ„/์ค„๊ฐ„๊ฒฉ ์†์‹ค ์ €์žฅ ํ›„ ์Šคํƒ€์ผ ์ •๋ณด ์œ ์‹ค โœ… ๋ชจ๋“  ์Šคํƒ€์ผ ๋ณด์กด

๐Ÿ›  Technical Improvements

  1. Atomic File Writing (์›์ž์  ํŒŒ์ผ ์“ฐ๊ธฐ)

    • ์ž„์‹œ ํŒŒ์ผ โ†’ ZIP ๊ฒ€์ฆ โ†’ ์›์ž์  ์ด๋™
    • ์ €์žฅ ์ค‘ ์˜ค๋ฅ˜ ๋ฐœ์ƒํ•ด๋„ ์›๋ณธ ํŒŒ์ผ ๋ณดํ˜ธ
  2. Smart Lineseg Reset (์Šค๋งˆํŠธ ์ค„ ๋ ˆ์ด์•„์›ƒ ์ดˆ๊ธฐํ™”)

    • ํ…์ŠคํŠธ ์ˆ˜์ • ์‹œ lineseg ์ž๋™ ์ดˆ๊ธฐํ™”
    • ํ•œ๊ธ€ ํ”„๋กœ๊ทธ๋žจ์ด ์—ด ๋•Œ ์ž๋™์œผ๋กœ ์ค„๋ฐ”๊ฟˆ ์žฌ๊ณ„์‚ฐ
    • ํ…์ŠคํŠธ ๊ฒน์นจ ํ˜„์ƒ ์™„์ „ ํ•ด๊ฒฐ
  3. Depth-based XML Parsing (๊นŠ์ด ๊ธฐ๋ฐ˜ XML ํŒŒ์‹ฑ)

    • ๊ธฐ์กด lazy regex์˜ ์ค‘์ฒฉ ๊ตฌ์กฐ ์˜ค์ธ์‹ ๋ฌธ์ œ ํ•ด๊ฒฐ
    • ๋ณต์žกํ•œ ํ…Œ์ด๋ธ”(์ค‘์ฒฉ ํ…Œ์ด๋ธ”, subList ๋“ฑ) ์™„๋ฒฝ ์ง€์›
  4. Complete Style Preservation (์Šคํƒ€์ผ ์™„์ „ ๋ณด์กด)

    • charPr, spacing ๋“ฑ ์›๋ณธ ์Šคํƒ€์ผ 100% ์œ ์ง€
    • ๋ถˆ์™„์ „ํ•œ ์ง๋ ฌํ™” ๋กœ์ง ์ œ๊ฑฐ๋กœ ๋ฐ์ดํ„ฐ ๋ฌด๊ฒฐ์„ฑ ๋ณด์žฅ
  5. Safe Multi-Cell Updates (์•ˆ์ „ํ•œ ๋‹ค์ค‘ ์…€ ์—…๋ฐ์ดํŠธ)

    • ๊ฐ™์€ ํ–‰(row)์˜ ์—ฌ๋Ÿฌ ์…€์„ ๋™์‹œ์— ์ˆ˜์ •ํ•ด๋„ ์•ˆ์ „
    • ํ–‰๋ณ„ ๊ทธ๋ฃนํ™” + ์—ญ์ˆœ ์ฒ˜๋ฆฌ๋กœ ์ธ๋ฑ์Šค ์†์ƒ ๋ฐฉ์ง€

๐Ÿ“ฆ Installation

1. MCP ์„œ๋ฒ„ ์„ค์น˜

git clone https://github.com/Dayoooun/hwpx-mcp.git
cd hwpx-mcp/mcp-server
npm install
npm run build

2. MCP ํด๋ผ์ด์–ธํŠธ ์„ค์ •

์•„๋ž˜์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํด๋ผ์ด์–ธํŠธ๋ฅผ ์„ ํƒํ•˜์„ธ์š”.


๐Ÿ–ฅ๏ธ Claude Desktop

์„ค์ • ํŒŒ์ผ ์œ„์น˜:

OS ๊ฒฝ๋กœ
Windows %APPDATA%\Claude\claude_desktop_config.json
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

์„ค์ • ๋‚ด์šฉ:

{
  "mcpServers": {
    "hwpx-mcp": {
      "command": "node",
      "args": ["C:/path/to/hwpx-mcp/mcp-server/dist/index.js"]
    }
  }
}

โš ๏ธ Windows์—์„œ๋Š” ๊ฒฝ๋กœ์— \\ ๋˜๋Š” / ์‚ฌ์šฉ (์˜ˆ: C:/Users/username/hwpx-mcp/...)


๐Ÿ’ป Claude Code (CLI)

๋ฐฉ๋ฒ• 1: ํ”„๋กœ์ ํŠธ๋ณ„ ์„ค์ • (.mcp.json ํŒŒ์ผ์„ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์— ์ƒ์„ฑ)

{
  "mcpServers": {
    "hwpx-mcp": {
      "command": "node",
      "args": ["/path/to/hwpx-mcp/mcp-server/dist/index.js"]
    }
  }
}

๋ฐฉ๋ฒ• 2: ์ „์—ญ ์„ค์ • (~/.claude/settings.json)

{
  "mcpServers": {
    "hwpx-mcp": {
      "command": "node",
      "args": ["/path/to/hwpx-mcp/mcp-server/dist/index.js"]
    }
  }
}

๋ฐฉ๋ฒ• 3: CLI ๋ช…๋ น์–ด๋กœ ์ถ”๊ฐ€

claude mcp add hwpx-mcp node /path/to/hwpx-mcp/mcp-server/dist/index.js

๐Ÿ”ท Cursor

์„ค์ • ํŒŒ์ผ: ~/.cursor/mcp.json (์—†์œผ๋ฉด ์ƒ์„ฑ)

{
  "mcpServers": {
    "hwpx-mcp": {
      "command": "node",
      "args": ["/path/to/hwpx-mcp/mcp-server/dist/index.js"]
    }
  }
}

๋˜๋Š” Cursor Settings > MCP ์—์„œ ์ง์ ‘ ์ถ”๊ฐ€ ๊ฐ€๋Šฅ


๐Ÿ†š VS Code (MCP ํ™•์žฅ ์‚ฌ์šฉ ์‹œ)

์„ค์ • ํŒŒ์ผ: .vscode/mcp.json (ํ”„๋กœ์ ํŠธ ํด๋” ๋‚ด)

{
  "servers": {
    "hwpx-mcp": {
      "command": "node",
      "args": ["${workspaceFolder}/../hwpx-mcp/mcp-server/dist/index.js"]
    }
  }
}

${workspaceFolder} ๋ณ€์ˆ˜๋ฅผ ํ™œ์šฉํ•˜๋ฉด ์ƒ๋Œ€ ๊ฒฝ๋กœ ์ง€์ • ๊ฐ€๋Šฅ


๐Ÿ› ๏ธ ๊ธฐํƒ€ MCP ํด๋ผ์ด์–ธํŠธ

์ผ๋ฐ˜์ ์ธ MCP ์„ค์ • ํ˜•์‹:

{
  "mcpServers": {
    "hwpx-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/hwpx-mcp/mcp-server/dist/index.js"]
    }
  }
}

๊ฒฝ๋กœ ์˜ˆ์‹œ:

OS ๊ฒฝ๋กœ ์˜ˆ์‹œ
Windows C:/Users/username/hwpx-mcp/mcp-server/dist/index.js
macOS /Users/username/hwpx-mcp/mcp-server/dist/index.js
Linux /home/username/hwpx-mcp/mcp-server/dist/index.js

3. ์„ค์น˜ ํ™•์ธ

ํด๋ผ์ด์–ธํŠธ ์žฌ์‹œ์ž‘ ํ›„ MCP ๋„๊ตฌ ๋ชฉ๋ก์—์„œ hwpx-mcp ์„œ๋ฒ„์™€ 77๊ฐœ ๋„๊ตฌ๊ฐ€ ํ‘œ์‹œ๋˜๋ฉด ์„ฑ๊ณต!


๐Ÿ”Œ MCP Tools (77๊ฐœ)

๐Ÿ“ ๋ฌธ์„œ ๊ด€๋ฆฌ (Document Management) - 5๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
create_document ์ƒˆ ๋นˆ HWPX ๋ฌธ์„œ ์ƒ์„ฑ title?, creator?
open_document HWPX ๋ฌธ์„œ ์—ด๊ธฐ file_path
close_document ์—ด๋ฆฐ ๋ฌธ์„œ ๋‹ซ๊ธฐ doc_id
save_document ๋ฌธ์„œ ์ €์žฅ (๋ฐฑ์—…/๋ฌด๊ฒฐ์„ฑ ๊ฒ€์ฆ ์ง€์›) doc_id, output_path?, create_backup?, verify_integrity?
list_open_documents ํ˜„์žฌ ์—ด๋ฆฐ ๋ฌธ์„œ ๋ชฉ๋ก ์กฐํšŒ -

๐Ÿ“„ ๋ฌธ์„œ ์ •๋ณด (Document Info) - 5๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_document_text ๋ฌธ์„œ ์ „์ฒด ํ…์ŠคํŠธ ์ถ”์ถœ doc_id
get_document_structure ๋ฌธ์„œ ๊ตฌ์กฐ ์กฐํšŒ (์„น์…˜/๋‹จ๋ฝ/ํ…Œ์ด๋ธ”/์ด๋ฏธ์ง€ ์ˆ˜) doc_id
get_document_metadata ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ์กฐํšŒ (์ œ๋ชฉ, ์ €์ž, ๋‚ ์งœ ๋“ฑ) doc_id
set_document_metadata ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ์ˆ˜์ • doc_id, title?, creator?, subject?, description?
get_word_count ๊ธ€์ž์ˆ˜/๋‹จ์–ด์ˆ˜ ํ†ต๊ณ„ doc_id

๐Ÿ“ ๋‹จ๋ฝ (Paragraphs) - 8๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_paragraphs ๋‹จ๋ฝ ๋ชฉ๋ก ์กฐํšŒ (ํ…์ŠคํŠธ/์Šคํƒ€์ผ ํฌํ•จ) doc_id, section_index?
get_paragraph ํŠน์ • ๋‹จ๋ฝ ์ƒ์„ธ ์ •๋ณด doc_id, section_index, paragraph_index
insert_paragraph ์ƒˆ ๋‹จ๋ฝ ์‚ฝ์ž… doc_id, section_index, after_index, text
delete_paragraph ๋‹จ๋ฝ ์‚ญ์ œ doc_id, section_index, paragraph_index
update_paragraph_text ๋‹จ๋ฝ ํ…์ŠคํŠธ ๋‚ด์šฉ ์ˆ˜์ • doc_id, section_index, paragraph_index, text, run_index?
append_text_to_paragraph ๊ธฐ์กด ๋‹จ๋ฝ์— ํ…์ŠคํŠธ ์ถ”๊ฐ€ doc_id, section_index, paragraph_index, text
copy_paragraph ๋‹จ๋ฝ์„ ๋‹ค๋ฅธ ์œ„์น˜๋กœ ๋ณต์‚ฌ doc_id, source_section, source_paragraph, target_section, target_after
move_paragraph ๋‹จ๋ฝ์„ ๋‹ค๋ฅธ ์œ„์น˜๋กœ ์ด๋™ doc_id, source_section, source_paragraph, target_section, target_after

๐ŸŽจ ํ…์ŠคํŠธ ์Šคํƒ€์ผ (Text Styling) - 4๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_text_style ๊ธ€์ž ์„œ์‹ ์กฐํšŒ (ํฐํŠธ/ํฌ๊ธฐ/์ƒ‰์ƒ ๋“ฑ) doc_id, section_index, paragraph_index, run_index?
set_text_style ๊ธ€์ž ์„œ์‹ ์„ค์ • doc_id, section_index, paragraph_index, bold?, italic?, underline?, strikethrough?, font_name?, font_size?, font_color?, background_color?
get_paragraph_style ๋ฌธ๋‹จ ์„œ์‹ ์กฐํšŒ (์ •๋ ฌ/์ค„๊ฐ„๊ฒฉ/์—ฌ๋ฐฑ ๋“ฑ) doc_id, section_index, paragraph_index
set_paragraph_style ๋ฌธ๋‹จ ์„œ์‹ ์„ค์ • doc_id, section_index, paragraph_index, align?, line_spacing?, margin_*?, first_line_indent?

๐Ÿ” ๊ฒ€์ƒ‰/์น˜ํ™˜ (Search & Replace) - 4๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
search_text ๋ฌธ์„œ ๋‚ด ํ…์ŠคํŠธ ๊ฒ€์ƒ‰ (์ •๊ทœ์‹ ์ง€์›, ํ…Œ์ด๋ธ” ์…€ ํฌํ•จ) doc_id, query, case_sensitive?, regex?, include_tables?
replace_text ํ…์ŠคํŠธ ์ฐพ์•„ ๋ฐ”๊พธ๊ธฐ doc_id, old_text, new_text, case_sensitive?, regex?, replace_all?
replace_text_in_cell ํŠน์ • ํ…Œ์ด๋ธ” ์…€ ๋‚ด ํ…์ŠคํŠธ ์น˜ํ™˜ doc_id, section_index, table_index, row, col, old_text, new_text
batch_replace ์—ฌ๋Ÿฌ ํ…์ŠคํŠธ ์ผ๊ด„ ์น˜ํ™˜ doc_id, replacements[] (old_text, new_text ์Œ ๋ฐฐ์—ด)

๐Ÿ“Š ํ…Œ์ด๋ธ” (Tables) - 12๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_tables ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ํ…Œ์ด๋ธ” ๋ชฉ๋ก doc_id
get_table ํŠน์ • ํ…Œ์ด๋ธ” ์ „์ฒด ๋ฐ์ดํ„ฐ ์กฐํšŒ doc_id, section_index, table_index
get_table_cell ํŠน์ • ์…€ ๋‚ด์šฉ ์กฐํšŒ doc_id, section_index, table_index, row, col
update_table_cell ์…€ ๋‚ด์šฉ ์ˆ˜์ • (์Šคํƒ€์ผ ๋ณด์กด) doc_id, section_index, table_index, row, col, text, char_shape_id?
set_cell_properties ์…€ ์†์„ฑ ์„ค์ • (ํฌ๊ธฐ/๋ฐฐ๊ฒฝ์ƒ‰/์ •๋ ฌ) doc_id, section_index, table_index, row, col, width?, height?, background_color?, vertical_align?
insert_table ์ƒˆ ํ…Œ์ด๋ธ” ์‚ฝ์ž… doc_id, section_index, after_index, rows, cols, width?
insert_table_row ํ…Œ์ด๋ธ”์— ํ–‰ ์‚ฝ์ž… doc_id, section_index, table_index, after_row, cell_texts?
delete_table_row ํ…Œ์ด๋ธ”์—์„œ ํ–‰ ์‚ญ์ œ doc_id, section_index, table_index, row_index
insert_table_column ํ…Œ์ด๋ธ”์— ์—ด ์‚ฝ์ž… doc_id, section_index, table_index, after_col
delete_table_column ํ…Œ์ด๋ธ”์—์„œ ์—ด ์‚ญ์ œ doc_id, section_index, table_index, col_index
insert_nested_table ์…€ ์•ˆ์— ์ค‘์ฒฉ ํ…Œ์ด๋ธ” ์‚ฝ์ž… (ํ‘œ ์•ˆ์— ํ‘œ) doc_id, section_index, parent_table_index, row, col, nested_rows, nested_cols, data?
get_table_as_csv ํ…Œ์ด๋ธ”์„ CSV ํ˜•์‹์œผ๋กœ ์ถ”์ถœ doc_id, section_index, table_index, delimiter?

๐Ÿ“ ํŽ˜์ด์ง€ ์„ค์ • (Page Settings) - 2๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_page_settings ํŽ˜์ด์ง€ ์„ค์ • ์กฐํšŒ (์šฉ์ง€ ํฌ๊ธฐ/์—ฌ๋ฐฑ) doc_id, section_index?
set_page_settings ํŽ˜์ด์ง€ ์„ค์ • ๋ณ€๊ฒฝ doc_id, section_index?, width?, height?, margin_*?, orientation?

๐Ÿ–ผ๏ธ ์ด๋ฏธ์ง€ (Images) - 5๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_images ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ์ด๋ฏธ์ง€ ๋ชฉ๋ก doc_id
insert_image ์ด๋ฏธ์ง€ ํŒŒ์ผ ์‚ฝ์ž… (BinData ์ž๋™ ๋“ฑ๋ก) doc_id, section_index, after_index, image_path, width?, height?
update_image_size ๊ธฐ์กด ์ด๋ฏธ์ง€ ํฌ๊ธฐ ๋ณ€๊ฒฝ doc_id, section_index, image_index, width, height
delete_image ์ด๋ฏธ์ง€ ์‚ญ์ œ doc_id, section_index, image_index
render_mermaid Mermaid ๋‹ค์ด์–ด๊ทธ๋žจ์„ ์ด๋ฏธ์ง€๋กœ ์‚ฝ์ž… doc_id, mermaid_code, after_index, section_index?, width?, height?, theme?, background_color?

โœ๏ธ ๋„ํ˜• (Shapes) - 3๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
insert_line ์„  ๋„ํ˜• ์‚ฝ์ž… doc_id, section_index, after_index, x1, y1, x2, y2, stroke_color?, stroke_width?
insert_rect ์‚ฌ๊ฐํ˜• ๋„ํ˜• ์‚ฝ์ž… doc_id, section_index, after_index, x, y, width, height, fill_color?, stroke_color?
insert_ellipse ํƒ€์› ๋„ํ˜• ์‚ฝ์ž… doc_id, section_index, after_index, cx, cy, rx, ry, fill_color?, stroke_color?

๐Ÿ“‘ ๋จธ๋ฆฌ๊ธ€/๋ฐ”๋‹ฅ๊ธ€ (Header/Footer) - 4๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_header ๋จธ๋ฆฌ๊ธ€ ๋‚ด์šฉ ์กฐํšŒ doc_id, section_index?
set_header ๋จธ๋ฆฌ๊ธ€ ์„ค์ • doc_id, text, section_index?, apply_page_type? (both/even/odd)
get_footer ๋ฐ”๋‹ฅ๊ธ€ ๋‚ด์šฉ ์กฐํšŒ doc_id, section_index?
set_footer ๋ฐ”๋‹ฅ๊ธ€ ์„ค์ • doc_id, text, section_index?, apply_page_type? (both/even/odd)

๐Ÿ“Œ ๊ฐ์ฃผ/๋ฏธ์ฃผ (Footnotes/Endnotes) - 4๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_footnotes ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ๊ฐ์ฃผ ๋ชฉ๋ก doc_id
insert_footnote ํŠน์ • ์œ„์น˜์— ๊ฐ์ฃผ ์‚ฝ์ž… doc_id, section_index, paragraph_index, text
get_endnotes ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ๋ฏธ์ฃผ ๋ชฉ๋ก doc_id
insert_endnote ํŠน์ • ์œ„์น˜์— ๋ฏธ์ฃผ ์‚ฝ์ž… doc_id, section_index, paragraph_index, text

๐Ÿ”— ๋ถ๋งˆํฌ/ํ•˜์ดํผ๋งํฌ (Bookmarks/Hyperlinks) - 4๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_bookmarks ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ๋ถ๋งˆํฌ ๋ชฉ๋ก doc_id
insert_bookmark ํŠน์ • ์œ„์น˜์— ๋ถ๋งˆํฌ ์‚ฝ์ž… doc_id, section_index, paragraph_index, name
get_hyperlinks ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ํ•˜์ดํผ๋งํฌ ๋ชฉ๋ก doc_id
insert_hyperlink ํ•˜์ดํผ๋งํฌ ์‚ฝ์ž… doc_id, section_index, paragraph_index, url, text

โž— ์ˆ˜์‹ (Equations) - 2๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_equations ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ์ˆ˜์‹ ๋ชฉ๋ก doc_id
insert_equation ์ˆ˜์‹ ์‚ฝ์ž… (HWP ์ˆ˜์‹ ์Šคํฌ๋ฆฝํŠธ ํ˜•์‹) doc_id, section_index, after_index, script

๐Ÿ’ฌ ๋ฉ”๋ชจ (Memos/Comments) - 3๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_memos ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ๋ฉ”๋ชจ/์ฃผ์„ ๋ชฉ๋ก doc_id
insert_memo ๋ฉ”๋ชจ/์ฃผ์„ ์‚ฝ์ž… doc_id, section_index, paragraph_index, content, author?
delete_memo ๋ฉ”๋ชจ/์ฃผ์„ ์‚ญ์ œ doc_id, memo_id

๐Ÿ“š ์„น์…˜ (Sections) - 5๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_sections ๋ฌธ์„œ ๋‚ด ๋ชจ๋“  ์„น์…˜ ๋ชฉ๋ก doc_id
insert_section ์ƒˆ ์„น์…˜ ์‚ฝ์ž… doc_id, after_index
delete_section ์„น์…˜ ์‚ญ์ œ doc_id, section_index
get_section_xml ์„น์…˜ Raw XML ์กฐํšŒ (AI ๋ฌธ์„œ ์กฐ์ž‘์šฉ) doc_id, section_index?
set_section_xml ์„น์…˜ Raw XML ๊ต์ฒด (HWPML ํ˜•์‹ ํ•„์ˆ˜) doc_id, xml, section_index?, validate?

๐ŸŽญ ์Šคํƒ€์ผ ์ •์˜ (Style Definitions) - 4๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_styles ๋ฌธ์„œ์— ์ •์˜๋œ ์Šคํƒ€์ผ ๋ชฉ๋ก doc_id
get_char_shapes ๊ธ€์ž ๋ชจ์–‘(CharShape) ์ •์˜ ๋ชฉ๋ก doc_id
get_para_shapes ๋ฌธ๋‹จ ๋ชจ์–‘(ParaShape) ์ •์˜ ๋ชฉ๋ก doc_id
apply_style ๋‹จ๋ฝ์— ์Šคํƒ€์ผ ์ ์šฉ doc_id, section_index, paragraph_index, style_id

๐Ÿ“ฐ ๋‹จ ์„ค์ • (Column Layout) - 2๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
get_column_def ๋‹จ(Column) ์„ค์ • ์กฐํšŒ doc_id, section_index?
set_column_def ๋‹จ ์„ค์ • ๋ณ€๊ฒฝ (๋‹ค๋‹จ ํŽธ์ง‘) doc_id, count, section_index?, type?, same_size?, gap?

๐Ÿ“ค ๋‚ด๋ณด๋‚ด๊ธฐ (Export) - 2๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
export_to_text ๋ฌธ์„œ๋ฅผ ํ…์ŠคํŠธ ํŒŒ์ผ๋กœ ๋‚ด๋ณด๋‚ด๊ธฐ doc_id, output_path
export_to_html ๋ฌธ์„œ๋ฅผ HTML ํŒŒ์ผ๋กœ ๋‚ด๋ณด๋‚ด๊ธฐ doc_id, output_path

โ†ฉ๏ธ ์‹คํ–‰ ์ทจ์†Œ (Undo/Redo) - 2๊ฐœ

Tool ์„ค๋ช… ์ฃผ์š” ํŒŒ๋ผ๋ฏธํ„ฐ
undo ๋งˆ์ง€๋ง‰ ๋ณ€๊ฒฝ ์‹คํ–‰ ์ทจ์†Œ doc_id
redo ์‹คํ–‰ ์ทจ์†Œํ•œ ๋ณ€๊ฒฝ ๋‹ค์‹œ ์‹คํ–‰ doc_id

์‚ฌ์šฉ ์˜ˆ์‹œ

// ๋ฌธ์„œ ์—ด๊ธฐ
await mcp.open_document({ file_path: "report.hwpx" })

// ํ…Œ์ด๋ธ” ์…€ ์ˆ˜์ •
await mcp.update_table_cell({
  doc_id: "...",
  section_index: 0,
  table_index: 0,
  row: 0,
  col: 1,
  text: "์ˆ˜์ •๋œ ๋‚ด์šฉ"
})

// ์ค‘์ฒฉ ํ…Œ์ด๋ธ” ์‚ฝ์ž… (ํ‘œ ์•ˆ์— ํ‘œ)
await mcp.insert_nested_table({
  doc_id: "...",
  section_index: 0,
  parent_table_index: 0,
  row: 1,
  col: 2,
  nested_rows: 2,
  nested_cols: 2,
  data: [["A1", "A2"], ["B1", "B2"]]
})

// Mermaid ๋‹ค์ด์–ด๊ทธ๋žจ ์‚ฝ์ž…
await mcp.render_mermaid({
  doc_id: "...",
  mermaid_code: "graph TD; A-->B; B-->C;",
  after_index: 0,
  theme: "default"
})

// ์ €์žฅ
await mcp.save_document({ doc_id: "..." })

ํ…Œ์ด๋ธ” ์…€ ๊ฒ€์ƒ‰/์น˜ํ™˜ ์›Œํฌํ”Œ๋กœ์šฐ

๋™์ผํ•œ ํ…์ŠคํŠธ๊ฐ€ ์—ฌ๋Ÿฌ ๊ณณ์— ์žˆ์„ ๋•Œ ํŠน์ • ์œ„์น˜๋งŒ ์ˆ˜์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•:

// 1. ํ…Œ์ด๋ธ” ํฌํ•จ ๊ฒ€์ƒ‰์œผ๋กœ ์œ„์น˜ ํŒŒ์•…
const results = await mcp.search_text({
  doc_id: "...",
  query: "์ˆ˜์ •๋Œ€์ƒ",
  include_tables: true  // ํ…Œ์ด๋ธ” ์…€ ํฌํ•จ
})
// ๊ฒฐ๊ณผ: [{ text: "์ˆ˜์ •๋Œ€์ƒ", location: { type: "table", tableIndex: 2, row: 3, col: 1 } }, ...]

// 2. ์›ํ•˜๋Š” ์œ„์น˜์˜ ์…€๋งŒ ์ •๋ฐ€ ์น˜ํ™˜
await mcp.replace_text_in_cell({
  doc_id: "...",
  section_index: 0,
  table_index: 2,  // ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ์—์„œ ํ™•์ธํ•œ ์œ„์น˜
  row: 3,
  col: 1,
  old_text: "์ˆ˜์ •๋Œ€์ƒ",
  new_text: "์ƒˆ๋กœ์šด๋‚ด์šฉ"
})

๐Ÿ“‹ Supported Format

ํฌ๋งท ํ™•์žฅ์ž ์ฝ๊ธฐ ์“ฐ๊ธฐ
HWPX .hwpx โœ… โœ…
HWP .hwp โŒ โŒ

Note: HWP(๋ฐ”์ด๋„ˆ๋ฆฌ) ํŒŒ์ผ์€ ์ง€์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•œ์ปด์˜คํ”ผ์Šค์—์„œ HWPX๋กœ ๋ณ€ํ™˜ ํ›„ ์‚ฌ์šฉํ•˜์„ธ์š”.


๐Ÿ“ Release Notes

v0.4.0 (Enhanced Search & Diagram Support)

  • ๐Ÿ†• New Feature: search_text์— include_tables ์˜ต์…˜ ์ถ”๊ฐ€ - ํ…Œ์ด๋ธ” ์…€ ๋‚ด ํ…์ŠคํŠธ๋„ ๊ฒ€์ƒ‰
  • ๐Ÿ†• New Feature: replace_text_in_cell - ํŠน์ • ํ…Œ์ด๋ธ” ์…€ ๋‚ด ํ…์ŠคํŠธ๋งŒ ์ •๋ฐ€ ์น˜ํ™˜
  • ๐Ÿ†• New Feature: render_mermaid - Mermaid ๋‹ค์ด์–ด๊ทธ๋žจ์„ ์ด๋ฏธ์ง€๋กœ ๋ฌธ์„œ์— ์‚ฝ์ž…
    • Flowchart, Sequence, Class Diagram ๋“ฑ ๋ชจ๋“  Mermaid ๋ฌธ๋ฒ• ์ง€์›
    • ํ…Œ๋งˆ ์„ ํƒ ๊ฐ€๋Šฅ (default, dark, forest, neutral)
  • ๐Ÿ†• New Feature: get_section_xml / set_section_xml - ์„น์…˜ Raw XML ์ง์ ‘ ์กฐ์ž‘
    • AI ๊ธฐ๋ฐ˜ ๊ณ ๊ธ‰ ๋ฌธ์„œ ํŽธ์ง‘ ์‹œ๋‚˜๋ฆฌ์˜ค ์ง€์›
  • ๐Ÿ”ง Improvement: insert_image ์™„์ „ ๊ฐœ์„ 
    • BinData ํด๋”์— ์ด๋ฏธ์ง€ ์ž๋™ ์ €์žฅ
    • content.hpf ๋งค๋‹ˆํŽ˜์ŠคํŠธ ์ž๋™ ๋“ฑ๋ก
    • ํŒŒ์ผ ์†์ƒ ์—†์ด ์ด๋ฏธ์ง€ ์‚ฝ์ž… ๋ณด์žฅ

v0.3.0 (Nested Table Support)

  • ๐Ÿ†• New Feature: insert_nested_table - ํ…Œ์ด๋ธ” ์…€ ์•ˆ์— ์ค‘์ฒฉ ํ…Œ์ด๋ธ” ์‚ฝ์ž… ๊ธฐ๋Šฅ
    • ๋ถ€๋ชจ ํ…Œ์ด๋ธ”์˜ ํŠน์ • ์…€์— ์ƒˆ ํ…Œ์ด๋ธ”์„ ์‚ฝ์ž…
    • ์ดˆ๊ธฐ ๋ฐ์ดํ„ฐ ์ง€์ • ๊ฐ€๋Šฅ (2D ๋ฐฐ์—ด)
    • HWPX ํ‘œ์ค€ ๊ตฌ์กฐ(treatAsChar, hp:subList) ์™„๋ฒฝ ์ค€์ˆ˜
  • ๐Ÿ”ง Improvement: charSpacing ํŒŒ์‹ฑ ๊ฐœ์„  (์†์„ฑ ์ˆœ์„œ ๋ฌด๊ด€ํ•˜๊ฒŒ ์ฒ˜๋ฆฌ)

v0.2.1 (Critical Fix)

  • ๐Ÿ”ฅ Critical Fix: ๊ฐ™์€ ํ–‰์— ์—ฌ๋Ÿฌ ์…€ ๋™์‹œ ์ˆ˜์ • ์‹œ ํŒŒ์ผ ์†์ƒ ๋ฌธ์ œ ์™„์ „ ํ•ด๊ฒฐ
    • ํ–‰(row)๋ณ„ ์—…๋ฐ์ดํŠธ ๊ทธ๋ฃนํ™”๋กœ ์ธ๋ฑ์Šค ๋ถˆ์ผ์น˜ ๋ฐฉ์ง€
    • ์—ญ์ˆœ(descending) ์ฒ˜๋ฆฌ๋กœ ์•ˆ์ „ํ•œ XML ์ˆ˜์ • ๋ณด์žฅ

v0.2.0 (Enhanced Edition)

  • ๐Ÿ”ฅ Major Fix: ํ…์ŠคํŠธ ์ˆ˜์ • ์‹œ lineseg ์ž๋™ ์ดˆ๊ธฐํ™”๋กœ ๊ฒน์นจ ํ˜„์ƒ ์™„์ „ ํ•ด๊ฒฐ
  • ๐Ÿ”ง Bug Fix: ์ค‘์ฒฉ ํ…Œ์ด๋ธ” ๊ตฌ์กฐ์—์„œ XML ์š”์†Œ ๊ฒฝ๊ณ„ ์˜ค์ธ์‹ ๋ฌธ์ œ ์ˆ˜์ •
  • ๐Ÿ›ก๏ธ Stability: ์›์ž์  ํŒŒ์ผ ์“ฐ๊ธฐ๋กœ ํŒŒ์ผ ์†์ƒ ๋ฐฉ์ง€
  • ๐Ÿ“ฆ Preservation: ์›๋ณธ charPr/spacing ์Šคํƒ€์ผ ์™„์ „ ๋ณด์กด

v0.1.0 (Original)

  • ์ตœ์ดˆ ๋ฆด๋ฆฌ์Šค (mjyoo2/hwp-extension)

๐Ÿ™ Credits


๐Ÿ“„ License

MIT


๐Ÿค Contributing

๋ฒ„๊ทธ ๋ฆฌํฌํŠธ ๋ฐ ๊ธฐ๋Šฅ ์š”์ฒญ: GitHub Issues

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured