Skip to main content
Glama

HWPX MCP Server - Enhanced Edition

GitHub Fork

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

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


โœจ 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

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

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

Claude Code ์—ฐ๋™

~/.claude/claude_desktop_config.json ๋˜๋Š” .vscode/mcp.json์— ์ถ”๊ฐ€:

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

๐Ÿ”Œ 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

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

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

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/Dayoooun/hwpx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server