Skip to main content
Glama
claude-code-hwp-mcp

claude-code-hwp-mcp

by gmlcjf0326

claude-code-hwp-mcp

Claude Code와 Claude Desktop에서 한글(HWP) 문서를 AI로 자동 편집하는 MCP 서버입니다.

94개 도구로 문서 열기, 표 채우기, 텍스트 편집, 서식 설정, 페이지 레이아웃, PDF 시각 검증까지 모두 자동화할 수 있습니다.

Windows 전용 | 한글 2014 이상 | Python 3.8+ | Claude Code + Claude Desktop 지원


설치 가이드 (처음 설정하는 분)

아래 순서대로 따라하세요. 5분이면 완료됩니다.

Step 1. Python 설치

반드시 python.org 공식 버전을 설치하세요.

  1. https://www.python.org/downloads/ 에 접속

  2. "Download Python 3.x.x" 버튼 클릭

  3. 설치 화면에서 "Add Python to PATH" 체크박스를 반드시 체크

  4. "Install Now" 클릭

Microsoft Store 버전 Python은 사용하지 마세요. Store 버전은 패키지가 격리된 경로에 설치되어 pyhwpx를 인식하지 못합니다. 이미 Store 버전이 설치되어 있다면 Microsoft Store Python 문제 해결 섹션을 참고하세요.

설치 확인 (명령 프롬프트에서):

python --version

Python 3.x.x가 출력되면 성공입니다.

Step 2. Python 패키지 설치

명령 프롬프트(cmd)를 열고 아래를 실행하세요:

pip install pyhwpx pywin32

설치 확인:

pip show pyhwpx

Step 3. Node.js 설치

  1. https://nodejs.org/ 에 접속

  2. LTS 버전 다운로드 후 설치

Step 4. MCP 서버 설치

명령 프롬프트에서:

npm install -g claude-code-hwp-mcp

Step 5. Claude에 MCP 서버 연결

사용하는 Claude 앱에 따라 아래 설정을 진행하세요:


Related MCP server: HWP-MCP

Claude Code 설정

설정 파일 열기

Claude Code 터미널에서 설정 파일을 엽니다. 파일 위치:

  • Windows: C:\Users\사용자이름\.claude\settings.json

  • 또는 ~/.claude/settings.json

설정 추가

settings.json 파일에 아래 내용을 추가하세요:

{
  "mcpServers": {
    "claude-code-hwp-mcp": {
      "command": "hwp-mcp"
    }
  }
}

이미 다른 MCP 서버가 등록되어 있다면 mcpServers 안에 추가합니다:

{
  "mcpServers": {
    "기존-서버": {
      "command": "기존-명령"
    },
    "claude-code-hwp-mcp": {
      "command": "hwp-mcp"
    }
  }
}

GitHub 클론 방식으로 설치한 경우

npm 글로벌 설치 대신 GitHub에서 클론한 경우:

{
  "mcpServers": {
    "claude-code-hwp-mcp": {
      "command": "node",
      "args": ["C:\\claude-code-hwp-mcp\\dist\\index.js"]
    }
  }
}

args의 경로를 실제 클론한 위치로 변경하세요.


Claude Desktop 설정

Step 1. 설정 파일 찾기

Windows 탐색기에서 주소창에 아래를 입력하고 Enter:

%APPDATA%\Claude

Claude 폴더가 열립니다.

Step 2. 설정 파일 만들기 또는 열기

해당 폴더에 claude_desktop_config.json 파일이 있으면 메모장으로 엽니다.

파일이 없으면 새로 만드세요:

  1. 폴더에서 마우스 우클릭 > 새로 만들기 > 텍스트 문서

  2. 파일 이름을 claude_desktop_config.json으로 변경 (확장자 .txt가 아닌 .json)

Step 3. 설정 내용 입력

파일에 아래 내용을 그대로 붙여넣으세요:

{
  "mcpServers": {
    "claude-code-hwp-mcp": {
      "command": "hwp-mcp"
    }
  }
}

Step 4. (선택) Python 경로 직접 지정

Python이 여러 개 설치되어 있거나 Microsoft Store Python 문제가 있을 경우, Python 경로를 명시적으로 지정할 수 있습니다:

{
  "mcpServers": {
    "claude-code-hwp-mcp": {
      "command": "hwp-mcp",
      "env": {
        "PYTHON_PATH": "C:\\Users\\사용자이름\\AppData\\Local\\Programs\\Python\\Python313\\python.exe"
      }
    }
  }
}

본인의 Python 경로를 확인하려면 명령 프롬프트에서:

python -c "import sys; print(sys.executable)"

출력된 경로를 PYTHON_PATH 값으로 사용하세요.

Step 5. Claude Desktop 재시작

설정 파일을 저장한 후 Claude Desktop을 완전히 종료했다가 다시 실행하세요. (트레이에서도 완전 종료)

Step 6. 연결 확인

Claude Desktop에서 아래와 같이 입력하세요:

hwp_check_setup 실행해줘

모든 항목에 체크 표시가 나오면 성공입니다.


사용 전 반드시 확인

한글(HWP) 프로그램이 실행 중이어야 합니다.

MCP 서버는 한글 프로그램의 COM API를 통해 문서를 제어합니다. 한글이 열려 있지 않으면 문서 관련 도구가 동작하지 않습니다.

사용 순서:

  1. 한글(HWP) 프로그램을 실행합니다

  2. 빈 문서가 열린 상태로 둡니다

  3. Claude Code 또는 Claude Desktop에서 작업을 시작합니다


사용 예시

Claude에게 자연어로 요청하면 됩니다:

"C:/문서/사업계획서.hwp 파일을 열어서 분석해줘"
"표의 계약금액 칸에 50,000,000원을 채워줘"
"문서를 PDF로 변환해줘"
"작성요령 텍스트 삭제해줘"
"참고자료.xlsx를 읽어서 양식.hwp의 표를 자동으로 채워줘"
"직원_명단.xlsx의 각 행으로 위촉장.hwp를 개별 생성해줘"

문제 해결

Microsoft Store Python 문제

증상: hwp_check_setup에서 "pyhwpx 미설치" 또는 "한글 미설치"로 표시되지만 실제로는 설치되어 있음

진단: 명령 프롬프트에서 아래를 실행하세요:

python -c "import sys; print(sys.executable)"

출력 경로에 WindowsApps가 포함되어 있으면 Microsoft Store 버전입니다:

C:\Users\사용자\AppData\Local\Microsoft\WindowsApps\python.exe  (Store 버전)

해결 방법 A (권장): python.org 버전으로 재설치

  1. Windows 설정 > 앱 > "Python"을 찾아서 제거

  2. https://www.python.org/downloads/ 에서 다시 설치

  3. 설치 시 "Add Python to PATH" 반드시 체크

  4. pip install pyhwpx pywin32 다시 실행

해결 방법 B: Claude 설정에서 Python 경로 지정

Store Python을 유지한 채, MCP 설정에서 직접 경로를 지정합니다:

{
  "mcpServers": {
    "claude-code-hwp-mcp": {
      "command": "hwp-mcp",
      "env": {
        "PYTHON_PATH": "C:\\Users\\사용자\\AppData\\Local\\Programs\\Python\\Python313\\python.exe"
      }
    }
  }
}

Python을 찾을 수 없습니다

python.org에서 Python 3.8+을 설치하세요. 설치 시 "Add Python to PATH" 체크 필수입니다. 설치 후 명령 프롬프트를 새로 열어야 합니다.

pyhwpx 모듈을 찾을 수 없습니다

pip install pyhwpx pywin32

COM class not registered

한컴오피스 한글을 설치하세요. 설치 후 한글을 한번 실행하여 초기 설정을 완료하세요.

RPC 서버를 사용할 수 없습니다

한글 프로그램을 닫고 다시 시도하세요. 작업 관리자(Ctrl+Shift+Esc)에서 Hwp.exe 프로세스가 남아있으면 종료 후 재시도하세요.

환경 자동 진단

Claude에게 요청하세요:

"hwp_check_setup 실행해줘"

Python 경로, pyhwpx 설치 여부, 한글 프로그램 설치 및 실행 상태를 자동으로 확인합니다.


기능 목록 (94개)

환경/문서 관리 (6개)

도구

설명

hwp_check_setup

Python/pyhwpx/한글 설치 상태 자동 진단

hwp_list_files

디렉토리 내 HWP/HWPX 파일 목록

hwp_open_document

HWP 문서 열기 (자동 백업)

hwp_close_document

문서 닫기

hwp_save_document

문서 저장 (HWP/HWPX/PDF/DOCX)

hwp_export_pdf

PDF 내보내기

문서 분석 (16개)

도구

설명

hwp_analyze_document

전체 구조 분석 (표, 필드, 텍스트)

hwp_get_document_text

문서 전문 텍스트 추출

hwp_get_document_info

페이지수, 파일 정보 등 메타데이터

hwp_get_tables

표 데이터 조회

hwp_map_table_cells

표 셀 탭 인덱스 매핑 (병합 셀 대응)

hwp_get_cell_format

특정 셀의 서식 정보

hwp_get_table_format_summary

표 전체 서식 요약

hwp_get_fields

양식 필드 목록

hwp_get_as_markdown

문서를 마크다운으로 변환

hwp_get_page_text

특정 페이지 텍스트 추출

hwp_text_search

텍스트 검색

hwp_form_detect

양식 빈칸/체크박스 자동 감지

hwp_extract_style_profile

양식 서식 프로파일 추출

hwp_image_extract

문서 내 이미지 추출

hwp_document_split

페이지별 문서 분할

hwp_read_reference

참고자료 읽기 (Excel/CSV/TXT/JSON)

텍스트 편집 (18개)

도구

설명

hwp_insert_text

텍스트 삽입 (색상/볼드/서식)

hwp_insert_markdown

마크다운을 HWP 서식으로 변환 삽입

hwp_insert_heading

제목 삽입 (H1~H6 + 자동 순번)

hwp_find_replace

찾기/바꾸기

hwp_find_replace_multi

다건 찾기/바꾸기

hwp_find_replace_nth

N번째 항목만 찾기/바꾸기

hwp_find_and_append

특정 텍스트 뒤에 내용 추가

hwp_set_paragraph_style

문단 서식 (정렬, 줄간격, 들여쓰기)

hwp_indent

들여쓰기

hwp_outdent

내어쓰기

hwp_insert_page_break

페이지 나누기

hwp_insert_page_num

쪽 번호 삽입

hwp_insert_date_code

날짜 자동 삽입

hwp_insert_footnote

각주 삽입

hwp_insert_endnote

미주 삽입

hwp_insert_hyperlink

하이퍼링크 삽입

hwp_insert_auto_num

자동 번호매기기

hwp_insert_memo

메모 삽입

표 편집 (18개)

도구

설명

hwp_fill_table_cells

표 셀 채우기 (탭/라벨/좌표)

hwp_fill_fields

양식 필드 채우기

hwp_table_create_from_data

2D 배열로 표 생성

hwp_table_insert_from_csv

CSV/Excel에서 표 생성

hwp_table_add_row

행 추가

hwp_table_add_column

열 추가

hwp_table_delete_row

행 삭제

hwp_table_delete_column

열 삭제

hwp_table_merge_cells

셀 병합

hwp_table_split_cell

셀 분할

hwp_table_distribute_width

셀 너비 균등 분배

hwp_table_swap_type

행/열 교환

hwp_table_formula_sum

합계 수식

hwp_table_formula_avg

평균 수식

hwp_table_to_csv

표를 CSV로 내보내기

hwp_table_to_json

표를 JSON으로 내보내기

hwp_set_cell_color

셀 배경색 설정

hwp_set_table_border

표 테두리 스타일 설정

페이지/레이아웃 (9개)

도구

설명

hwp_set_page_setup

여백, 용지 크기, 방향(가로/세로) 설정

hwp_set_header_footer

머리글/바닥글 삽입

hwp_set_column

다단 설정 (2단/3단, 구분선)

hwp_verify_layout

PDF→PNG 시각 검증 (PyMuPDF)

hwp_insert_picture

이미지 삽입

hwp_set_background_picture

배경 이미지 설정

hwp_insert_line

선(줄) 삽입

hwp_break_section

섹션 나누기

hwp_break_column

다단 나누기

서식/그리기 (5개)

도구

설명

hwp_apply_style

문단 스타일 적용 ("제목1", "본문" 등)

hwp_set_cell_property

셀 여백/수직정렬/텍스트방향/보호

hwp_insert_textbox

글상자 생성 (위치/크기 지정)

hwp_draw_line

선 그리기 (두께/색상/스타일)

hwp_insert_caption

표/그림 캡션 삽입

스마트/복합 도구 (16개)

도구

설명

hwp_smart_analyze

AI용 심층 분석 (문서 유형 추론)

hwp_smart_fill

서식 감지 후 보존하며 채우기

hwp_auto_fill_from_reference

Excel에서 자동 매핑 후 채우기

hwp_auto_map_reference

참고자료 헤더와 표 라벨 자동 매핑

hwp_generate_multi_documents

다건 문서 일괄 생성

hwp_generate_toc

목차 자동 생성

hwp_create_gantt_chart

간트차트 추진일정 표 생성

hwp_document_merge

여러 문서 병합

hwp_document_summary

문서 요약 정보

hwp_privacy_scan

개인정보 자동 감지

hwp_batch_convert

HWP 일괄 변환

hwp_compare_documents

두 문서 비교

hwp_word_count

글자수/단어수/페이지수

hwp_delete_guide_text

작성요령 자동 삭제

hwp_toggle_checkbox

체크박스 전환

hwp_inspect_com_object

[개발용] COM 객체 속성 조회

HWPX 도구 (4개, 한글 프로그램 없이 동작)

도구

설명

hwp_template_list

문서 템플릿 목록 (22종)

hwp_document_create

빈 HWPX 문서 생성

hwp_template_generate

템플릿 기반 문서 생성

hwp_xml_edit_text

HWPX XML 직접 텍스트 편집

내보내기 (2개)

도구

설명

hwp_export_docx

DOCX(Word) 내보내기

hwp_export_html

HTML 내보내기


Toolset 모드

토큰 절약이 필요하면 minimal 모드를 사용하세요 (15개 핵심 도구만 로드):

{
  "mcpServers": {
    "claude-code-hwp-mcp": {
      "command": "hwp-mcp",
      "args": ["--toolset=minimal"]
    }
  }
}

아키텍처

Claude Code / Claude Desktop
    |  MCP Protocol (stdio)
MCP Server (Node.js/TypeScript)
    |  child_process (JSON stdin/stdout)
Python Bridge (hwp_service.py + pyhwpx)
    |  COM API
한글(HWP) 프로그램

HWP vs HWPX 파일 형식 차이

구분

HWP (바이너리)

HWPX (XML 기반)

내부 구조

OLE2 바이너리

ZIP + XML

텍스트 검색

COM API (제한적)

XML 직접 검색 (안정적)

찾기/바꾸기

COM API (제한적)

XML 직접 치환 (안정적)

표 생성/편집

COM API

COM API

문서 열기/저장

COM API

COM API

HWPX 파일 사용을 권장합니다. HWPX 파일의 텍스트 검색/치환은 XML을 직접 조작하므로 COM API보다 안정적입니다. 한글 프로그램에서 "다른 이름으로 저장" > "HWPX" 형식으로 변환할 수 있습니다.


알려진 제한사항

HWP 파일의 COM 텍스트 검색

HWP 바이너리 파일에서 hwp_text_search가 0건을 반환할 수 있습니다. 이는 한글 COM API(HAction.Execute("FindReplace"))의 반환값이 프로그래밍적으로 불안정한 설계 한계입니다.

대안:

  • hwp_get_document_text로 전체 텍스트를 가져와서 직접 검색

  • 가능하면 HWPX 형식으로 변환하여 사용 (XML 검색은 안정적)

HWPX 파일 잠금

한글에서 HWPX 파일을 열어둔 상태에서 XML 직접 편집을 시도하면 파일 잠금(EBUSY) 에러가 발생합니다. 이 경우 자동으로 COM 경로로 폴백합니다.


추천 워크플로우

양식 채우기

1. hwp_open_document → 파일 열기
2. hwp_smart_analyze → 문서 구조 파악
3. hwp_smart_fill 또는 hwp_auto_fill_from_reference → 자동 채우기
4. hwp_privacy_scan → 개인정보 확인
5. hwp_save_document → 저장

텍스트 치환

1. hwp_open_document → 파일 열기
2. hwp_find_replace 또는 hwp_find_replace_multi → 치환
3. hwp_save_document → 저장

문서 분석

1. hwp_open_document → 파일 열기
2. hwp_analyze_document → 전체 구조 분석
3. hwp_get_tables → 표 데이터 확인
4. hwp_word_count → 글자수 통계

변경 이력

v0.5.6 (2026-04-02) — 6가지 근본 원인 해결 (ROOT_CAUSE_ANALYSIS 전체 반영)

원인 A: COM↔XML 단절 → XML 라우팅 제거, COM 우선 검색 (v0.5.5) 원인 B: DOCX/HTML 타임아웃 → not_supported 즉시 반환 (v0.5.3) 원인 D: COM 상태 관리 → 표 중복 감지 + MovePos(2) + 캐시 초기화 (v0.5.4~v0.5.6) 원인 E: PDF 렌더링 → save 선행 3곳 (v0.5.2) 원인 F: 에러 대화상자 → validate_file_path 경로/권한/잠금 사전 검증 (v0.5.6)

v0.5.3 (2026-04-01) — 3차 테스트 88.7%→93%+ 목표, 하네스 기반 고도화

3차 테스트 잔여 버그 수정:

  • find_and_append: COM fallback 전 자동 save → "not_found" 해결

  • get_tables/analyze_document: 분석 전 자동 save → 미저장 표 감지

  • find_replace_multi: save 후 200ms I/O 동기 대기 → 첫 시도 실패 해결

  • col_widths: 합계 >170mm 시 자동 비율 축소 + 경고 반환 (PDF 열 깨짐 방지)

  • verify_layout: 임시 PDF 자동 정리 (디스크 축적 방지)

HanulDoc Harness 연구 반영:

  • 구조화된 에러 응답: error_type + guide 필드 (5가지 분류: com_disconnected, file_not_found, file_locked, no_document, encrypted)

  • 머리글/바닥글 스타일: font_size, bold, align, color 파라미터 추가

  • find_replace 대소문자 무시: case_sensitive=false 옵션 (COM MatchCase 지원)

v0.5.2 (2026-03-29) — 2차 테스트 87.1% 반영

  • PDF 빈 화면 수정: export 전 자동 hwp.save() 삽입

  • XML 엔진 동기화: XML 라우팅 5곳에 save 선행 (COM↔XML 불일치 해결)

  • DOCX/HTML 내보내기: 즉시 "not_supported" 반환 (120초 타임아웃 제거)

v0.5.1 (2026-03-25) — esbuild 번들, COM 대화상자

  • esbuild 단일 번들 (servers/bundle.mjs) — node_modules 불필요

  • SetMessageBoxMode(0x10000) + RegisterModule 자동 적용 (머리글 336초→10초)

  • save_document Python 핸들러 추가 (XML 동기화)

  • Agent 트리거 키워드 11개 추가 (작성/분석/요약/표/검증 등)

v0.5.0 (2026-03-25) — 94개 도구, 표 서식 대폭 강화

신규 도구 9개:

  • hwp_set_page_setup — 여백, 용지 크기, 방향(가로/세로) 설정

  • hwp_set_header_footer — 머리글/바닥글 삽입 (CreateAction 방식, 대화상자 없음)

  • hwp_set_column — 다단 설정 (2단/3단, 구분선)

  • hwp_verify_layout — PDF→PNG 시각 검증 (PyMuPDF 필요)

  • hwp_apply_style — 문단 스타일 적용 ("제목1", "본문" 등)

  • hwp_set_cell_property — 셀 여백/수직정렬/텍스트방향/보호

  • hwp_insert_textbox — 글상자 생성 (위치/크기 지정)

  • hwp_draw_line — 선 그리기 (두께/색상/스타일)

  • hwp_insert_caption — 표/그림 캡션 삽입

텍스트 서식 속성 25+ 추가 (insert_text):

  • 밑줄: underline_type(7종), underline_color

  • 취소선: strikeout_type(4종), strikeout_color

  • 효과: superscript, subscript, outline, shadow, emboss, engrave, small_caps

  • 글꼴: font_name_latin(라틴 전용), shadow_color, use_kerning

  • 배경: bg_color

문단 서식 속성 11개 추가 (set_paragraph_style):

  • page_break_before, keep_with_next, widow_orphan

  • line_wrap, snap_to_grid, auto_space_eAsian_eng/num

  • break_latin_word, heading_type, keep_lines_together, condense

표 기능 핵심 개선:

  • 셀 배경색: pyhwpx cell_fill() 내장 메서드 사용 (안정적)

  • 셀 텍스트 정렬: TableCellAlignCenterCenter 액션 사용 (삽입 후 적용)

  • 셀 병합: TableCellBlockExtend 방식으로 정확한 블록 선택

  • 표 생성: col_widths(mm), row_heights(mm), alignment(left/center/right), header_style(Bold)

  • 테두리: color(#RRGGBB), edges(방향별 적용) 지원

버그 수정:

  • insert_text 자동 줄바꿈 — 각 호출이 독립 문단으로 생성

  • set_header_footer: CreateAction("HeaderFooter") 방식 (대화상자 타임아웃 해결)

  • apply_style: Execute("Style") + SetItem("StyleName") (대화상자 방지)

  • draw_line: 대화형 InsertLine fallback 제거

  • insert_footnote/endnote: try/except + CloseEx 추가

  • get_cursor_context: page → total_pages + current_page(KeyIndicator)

v0.3.0 — HWPX XML 라우팅 + 10건 버그 수정

버그 수정 (10건):

  • SelectAll 문서 파괴 수정 (table_create_from_data, gantt_chart 등)

  • find_replace 전후 텍스트 비교 검증으로 개선

  • text_search 선택 영역 기반 판단으로 개선

  • find_and_append 커서 유실 수정 (Cancel → MoveRight)

  • 버퍼 오버플로우 시 개별 요청만 거부

  • XHwpMessageBoxMode 복원 (close_document)

  • blank_template.hwpx 프로그래밍적 생성 (파일 의존성 제거)

HWPX XML 라우팅:

  • HWPX 파일의 텍스트 검색/치환을 Node.js XML 엔진으로 직접 처리

  • XML 실패 시(파일 잠금 등) COM 경로로 자동 폴백

환경 진단 개선:

  • Microsoft Store Python 자동 감지 + 경고

  • 한글 프로세스 실행 여부 체크 (tasklist)


지원 한글 버전

한글 2014, 2018, 2020, 2022, 2024 모두 지원합니다.


라이선스

MIT License

관련 링크

Available Tools

134 tools
hwp_analyze_documentA

HWP/HWPX 문서의 전체 구조를 분석합니다. 페이지 수, 표(데이터 포함), 필드(양식), 본문 텍스트, 컨트롤 카탈로그(controls)를 반환합니다. 문서를 처음 다룰 때 반드시 이 도구를 먼저 호출하세요. v0.6.6+: HeadCtrl 순회로 표/그림/머리말/꼬리말/각주/누름틀 위치 자동 카탈로그.

Inputs: file_path (required).

hwp_analyze_writing_patternsB

양식의 서식 패턴(폰트/줄간격/들여쓰기/번호 체계)을 학습합니다. (v0.7.1 신규) extract_full_profile + extract_style_profile + get_table_format_summary 재활용 (90%). 출력은 후속 hwp_extend_section, hwp_apply_style_profile에 입력으로 사용.

Inputs: file_path (required).

hwp_apply_document_presetA

문서 프리셋을 적용합니다. 용지 설정 + 기본 폰트/줄간격을 일괄 적용합니다. 프리셋: 공문서, 사업계획서, 제안서, 보고서, 계약서, 동의서.

Inputs: preset_name (required).

hwp_apply_styleC

현재 커서 위치에 문단 스타일을 적용합니다. "제목1", "본문", "개요1" 등 한글에 정의된 스타일을 사용합니다.

Inputs: style_name (required).

hwp_apply_style_profileA

추출된 서식 패턴 프로파일(WritingPatterns)을 현재 문서에 적용합니다. (v0.7.1 신규) hwp_analyze_writing_patterns의 출력을 입력으로 받아 set_paragraph_style 반복 호출.

Inputs: profile (required), target.

hwp_auto_fill_from_referenceA

엑셀/CSV → 자동 매핑 → 서식 보존 채우기를 일괄 수행하는 원스톱 도구. hwp_smart_fill + hwp_read_reference + hwp_auto_map_reference를 통합합니다. "이 엑셀 데이터로 신청서를 채워줘" 같은 요청에 사용하세요.

Inputs: file_path (required), table_index (required), row_index.

hwp_auto_map_referenceA

참고자료(Excel/CSV)의 헤더와 표의 라벨을 자동 매칭하여 채울 데이터를 생성합니다. 매핑 결과를 확인한 후 hwp_fill_table_cells로 실제 채우기를 진행하세요. hwp_read_reference로 데이터를 읽은 뒤 이 도구로 매핑하면 편리합니다.

Inputs: ref_row (required), ref_headers (required), table_index (required).

hwp_autopilot_createA

문서 자동 생성 12단계 파이프라인. (v0.7.2.4 / v0.7.4.0 / v0.7.5.4) sections[]/tables[]를 받아 template 기반으로 작성→스타일→TOC→검증→저장→PDF→layout 검증. v0.7.5.4: auto_fix 기본값 false + preserve_template_style 기본값 true (원본 템플릿 서식 보존). mode=plan은 estimate만, mode=execute는 실제 파이프. 각 step 마다 session_state 자동 save + cancel 체크.

Inputs: mode, prompt, tables, auto_fix, +12 more.

hwp_autopilot_planA

문서 자동 생성을 위한 구조화된 계획을 반환합니다. (v0.7.4.0 신규) estimate_workload + extract_template_structure + analyze_writing_patterns 를 조합해 sections[]/tables[]/style_profile skeleton 을 만들고 ~/.hwp_studio_state/{session_id}.json 에 저장. 이 도구는 LLM 을 호출하지 않습니다 — Claude host 가 반환된 plan.sections[].content 를 채운 뒤 동일 session_id 로 hwp_autopilot_create(plan_session_id=...) 를 호출해 실행합니다.

Inputs: user_request (required), session_id, output_path, template_id, +5 more.

hwp_batch_convertB

폴더 내 모든 HWP 파일을 지정 형식으로 일괄 변환합니다.

Inputs: input_dir (required), output_format (required), output_dir.

hwp_break_columnA

현재 위치에 다단 나누기를 삽입합니다.

Inputs: no named parameters.

hwp_break_sectionA

현재 위치에 섹션 나누기를 삽입합니다.

Inputs: no named parameters.

hwp_business_plan_prepareA

★ 사업계획서 양식을 분석하여 AI 자동 작성 컨텍스트를 생성합니다 (v0.7.9). 양식 파일(+선택적 참고자료)을 입력하면: (1) 문서 타입 감지, (2) 양식 구조 추출, (3) 작성요령 파싱, (4) 참고자료 읽기+섹션 매핑, (5) 섹션별 AI 컨텍스트 반환. 이 결과로 AI가 body_fills 를 생성한 후 hwp_korean_business_fill 로 실제 삽입합니다.

Inputs: form_file (required), reference_files.

hwp_check_setupA

사용 환경을 진단합니다. Python, pyhwpx, 한글 프로그램의 설치 여부를 확인하고 미설치 항목의 설치 방법을 안내합니다. 처음 사용하거나 에러 발생 시 이 도구를 먼저 호출하세요.

Inputs: no named parameters.

hwp_close_documentA

현재 열린 HWP 문서를 닫습니다. 다른 문서를 열기 전이나 작업 완료 후 호출하세요.

Inputs: no named parameters.

hwp_compare_documentsB

두 HWP 문서의 텍스트를 비교하여 차이점을 반환합니다.

Inputs: file_path_1 (required), file_path_2 (required).

hwp_compare_with_templateA

결과 문서를 템플릿과 비교하여 format/structure/content 점수 산출. (v0.7.2.3 신규) extract_template_structure + analyze_writing_patterns 양쪽 호출 후 가중 합산. self vs self = 100.

Inputs: result_path (required), template_path (required), weight.

hwp_create_gantt_chartB

추진일정 간트차트 표를 자동 생성합니다. 작업 목록과 기간을 입력하면 ■ 표시가 있는 일정표를 만듭니다.

Inputs: tasks (required), months (required), month_label.

hwp_delete_guide_textA

양식의 작성요령/가이드 텍스트를 자동 삭제합니다. v0.7.5.4 업그레이드: scope="text"(기존 텍스트 리터럴), "table"(작성요령 박스 표 전체 삭제), "both"(둘 다). 공공기관 양식 작성 후 제출 전에 사용. 기본 scope="both" 권장. v0.7.7: extract_first=true 로 삭제 전 작성요령 내용 자동 추출.

Inputs: scope, patterns, extract_first, table_keywords.

hwp_detect_document_typeA

문서 타입을 자동 감지해서 공무원 양식 표준 서식 프리셋을 추천합니다. (v0.7.5.4 신규) 타입: business_plan(사업계획서) / official_document(공문) / form(양식) / report(보고서) / general(일반). 결과의 recommended_preset 을 hwp_insert_body_after_heading 의 body_style 에 전달하면 표준 서식이 자동 적용됩니다. 사업계획서 / 공문 작업 전 가장 먼저 호출하세요.

Inputs: no named parameters.

hwp_document_createA

빈 HWPX 문서를 생성합니다. 한글 프로그램 없이 동작합니다. 생성된 파일은 한글에서 열 수 있습니다.

Inputs: output_path (required), title.

hwp_document_mergeA

현재 열린 문서에 다른 HWP 문서의 내용을 합칩니다. 여러 문서를 하나로 합칠 때 사용하세요.

Inputs: file_path (required).

hwp_document_splitB

문서를 페이지 단위로 분할하여 별도 파일로 저장합니다. 긴 문서를 나눌 때 사용하세요.

Inputs: output_dir (required), pages_per_split.

hwp_document_summaryA

문서를 분석하고 빈 필드/셀을 강조하며 작성 완성도(%)를 계산합니다. 문서 상태를 한눈에 파악하고 다음 작업을 결정할 때 사용하세요.

Inputs: file_path (required).

hwp_draw_lineA

선을 그립니다. 두께, 색상, 스타일을 지정할 수 있습니다. hwp_insert_line보다 상세한 제어가 가능합니다.

Inputs: color, style, width.

hwp_enter_tableA

지정된 표에 진입하여 첫 셀에 커서를 위치시킵니다. (v0.6.8.1 + v0.7.3.1 path-based) 평탄 인덱스 (number) 또는 nested 진입을 위한 path (number[]) 지원. path 형식: [outer_idx, row, col, inner_idx, row, col, inner_idx, ...] — 첫 원소는 outer table_index, 그 다음 (row, col, inner_idx) 3-원소 그룹 반복. 예: [0, 1, 1, 0] = 0번 표 → (1,1) 셀 → 그 셀 안의 0번 nested 표 (2단). 진입 후 hwp_navigate_cell/hwp_insert_text/hwp_table_create_from_data 등으로 셀 단위 작업 가능. 작업 완료 후 hwp_exit_table 호출.

Inputs: table_index (required), select_cell.

hwp_enumerate_nested_tablesB

HWPX 문서의 모든 표(중첩 포함)를 트리 구조로 열거합니다. (v0.7.2.1 신규) DFS 순회로 top-level 표 + 각 셀 내부의 nested 표를 재귀적으로 발견. 출력: NestedTableNode[] (path, rows, cols, children).

Inputs: file_path (required).

hwp_estimate_workloadA

★ 작성 작업의 워크로드를 사전 추정합니다. (v0.7.1 신규) 입력: 양식 + 사용자 요청 + 참고 자료. 출력: 예상 페이지 수, 토큰 사용량, 소요 시간, 위험 항목, 권장 조치(proceed/split_into_sessions/reduce_scope). 사용자가 결과 보고 진행 여부 결정. 추정 공식: chars_per_page=1100, tokens=chars/3.5, output_tokens_per_page=500, seconds_per_token=0.011 (Opus 4.6 한국어).

Inputs: user_request (required), mode, file_path, constraints, +1 more.

hwp_exit_tableA

현재 표에서 명시적으로 탈출합니다. (v0.6.8.1 신규) hwp_enter_table 후 셀 작업 완료 시 호출. 내부적으로 _exit_table_safely(MovePos(3) + BreakPara) 사용. 표 안에 없을 때 호출해도 안전 (no-op, was_in_cell=false 반환).

Inputs: no named parameters.

hwp_export_docxB

현재 문서를 DOCX(Word) 형식으로 내보냅니다.

Inputs: output_path (required).

hwp_export_htmlC

현재 문서를 HTML 형식으로 내보냅니다.

Inputs: output_path (required).

hwp_export_pdfA

현재 문서를 PDF로 내보냅니다. "PDF로 변환해줘" 요청에 사용하세요.

Inputs: output_path (required).

hwp_extend_sectionB

기존 양식의 특정 섹션 끝에 콘텐츠를 추가합니다. (v0.7.1 신규) 양식 서식 보존하며 LLM 생성 콘텐츠를 삽입. section_identifier로 섹션 위치를 제목 텍스트로 검색.

Inputs: content (required), section_identifier (required), preserve_format.

hwp_extract_full_profileA

문서의 양식을 정밀 분석합니다. 용지 설정 + 본문 글자/문단 서식(19개 속성) + 표 치수(최대 5개)를 한번에 반환합니다. 양식 기반 문서 작성 전 반드시 호출하세요.

Inputs: no named parameters.

hwp_extract_guide_textA

양식의 작성요령 박스 내용을 구조화 추출합니다 (v0.7.7 신규). 삭제 전에 호출하여 각 섹션별 요구사항(페이지 제한, 필수 기재, 형식 요구)을 보존. 결과를 AI 콘텐츠 생성 컨텍스트로 활용.

Inputs: no named parameters.

hwp_extract_style_profileA

양식 문서에서 서식 프로파일(글꼴/크기/자간/장평/줄간격/들여쓰기/여백)을 추출합니다. 양식 파일을 제공받았을 때 서식을 파악하여 동일하게 적용할 때 사용하세요.

Inputs: no named parameters.

hwp_extract_template_structureB

양식 문서의 트리 구조(목차/섹션/표/필드)를 추출합니다. (v0.7.1 신규) heading 정규식 휴리스틱(제 N 장/조/절, I./II., 1./1.1, 가./나., (1)/(가))으로 섹션 인식. analyze_document + traverse_all_ctrls 재활용 (95%). 사용자 양식 분석의 진입점.

Inputs: file_path (required), max_depth.

hwp_fill_fieldsA

문서의 필드(양식)에 값을 채웁니다. 반드시 먼저 hwp_get_fields로 필드 이름을 확인한 후 사용하세요. 필드가 없는 문서에는 hwp_fill_table_cells나 hwp_insert_text를 사용하세요.

Inputs: fields (required), file_path.

hwp_fill_table_cellsA

문서의 표 셀에 값을 채웁니다. 반드시 먼저 hwp_get_tables로 표 구조를 확인하세요. 병합 셀이 있으면 label 파라미터로 라벨 텍스트 기반 매칭을 추천합니다. 예: {label: "계약금액", text: "50,000,000원"}. tab이나 row/col도 사용 가능합니다.

Inputs: tables (required), file_path.

hwp_find_and_appendA

문서에서 텍스트를 찾은 후 그 뒤에 텍스트를 추가합니다. 색상 지정 가능. 기존 텍스트 서식을 보존하면서 새 텍스트를 추가할 때 사용하세요.

Inputs: find (required), append_text (required), color.

hwp_find_replaceC

문서 전체에서 텍스트를 찾아 바꿉니다. use_regex=true로 정규식 패턴도 사용 가능합니다. case_sensitive=false로 대소문자 무시 검색 가능.

Inputs: find (required), replace (required), use_regex, case_sensitive.

hwp_find_replace_multiB

여러 건의 찾기/바꾸기를 일괄 실행합니다. use_regex=true로 정규식도 가능.

Inputs: replacements (required), use_regex.

hwp_find_replace_nthA

문서에서 N번째로 나타나는 텍스트만 치환합니다. 같은 텍스트가 여러 곳에 있을 때 특정 위치만 바꿀 때 사용하세요. AllReplace는 전체를 바꾸지만 이 도구는 지정한 N번째만 바꿉니다.

Inputs: nth (required), find (required), replace (required).

hwp_form_detectA

문서에서 양식 필드(빈 괄호, 체크박스, 밑줄 등)를 자동 감지합니다. 양식을 채우기 전에 어떤 필드가 있는지 파악할 때 사용하세요.

Inputs: no named parameters.

hwp_form_workflowA

양식 파일 첨부 워크플로우. v0.7.5.4 read-only 기본: phase="all" 은 learn→plan→preview 에서 정지 (fill 은 사용자 명시 호출 필요). phase 별: learn(학습)→plan(계획)→preview(미리보기)→fill(명시)→verify(명시)→rollback(원본 복원). auto_fix 는 v0.7.5.4 부터 no-op (원본 서식 보호). table_cell_overrides/field_overrides 로 Claude host 가 직접 제어.

Inputs: phase (required), form_file, session_id, output_path, +8 more.

hwp_generate_multi_documentsA

하나의 템플릿으로 여러 건의 문서를 생성합니다. 각 데이터마다 템플릿을 별도 파일로 복사 후 채우기/치환하므로 AllReplace 범위 문제가 없습니다. 같은 양식에 여러 사람/기업 데이터를 채울 때 사용하세요.

Inputs: data_list (required), template_path (required), output_dir.

hwp_generate_tocA

현재 문서의 제목 패턴(Ⅰ., 1., 가. 등)을 자동 감지하여 목차를 생성하고 현재 커서 위치에 삽입합니다.

Inputs: dot_leader.

hwp_get_as_markdownB

문서 내용을 마크다운 형식으로 변환하여 반환합니다. 표는 마크다운 테이블로, 텍스트는 구조화됩니다. AI가 문서 내용을 이해하기 가장 좋은 형식입니다.

Inputs: file_path.

hwp_get_cell_formatA

특정 표 셀의 글자 서식(글꼴, 크기, 자간, 장평, 굵기 등)과 단락 서식(정렬, 줄간격 등)을 조회합니다. 표 셀에 내용을 채우기 전에 해당 셀의 서식을 파악하여 동일한 서식으로 입력할 때 사용하세요.

Inputs: cell_tab (required), table_index (required).

hwp_get_document_infoA

현재 열린 문서의 경량 메타데이터(페이지 수, 파일 경로)를 빠르게 반환합니다. analyze_document보다 훨씬 빠릅니다. 문서가 열려 있는지, 몇 페이지인지만 빠르게 확인할 때 사용하세요.

Inputs: no named parameters.

hwp_get_document_textA

현재 열린 문서 또는 지정 파일의 본문 텍스트를 추출합니다. 문서 내용을 읽거나 검색할 때 사용하세요.

Inputs: file_path, max_chars.

hwp_get_fieldsA

문서의 필드(양식) 목록과 현재 값을 조회합니다. 필드를 채우기 전에 어떤 필드가 있는지 확인할 때 사용하세요.

Inputs: file_path.

hwp_get_font_listA

사용 가능한 한글 폰트 목록을 반환합니다. 카테고리별(serif/sans/display) 또는 공문서용(gov) 필터 가능. 40+종 한국어 폰트 포함.

Inputs: category, gov_only.

hwp_get_page_setupA

현재 문서의 용지 설정을 읽습니다. 용지 크기, 방향, 여백(위/아래/좌/우/머리말/꼬리말), 제본 여백, 사용 가능 영역을 반환합니다.

Inputs: no named parameters.

hwp_get_page_textA

특정 페이지의 텍스트만 추출합니다. 전체 문서가 아닌 특정 페이지 내용만 필요할 때 사용하세요.

Inputs: page (required).

hwp_get_preset_listA

사용 가능한 문서/표 프리셋 목록을 반환합니다. 공문서, 사업계획서, 제안서, 보고서 등 6종 문서 프리셋 + 4종 표 스타일.

Inputs: no named parameters.

hwp_get_progressA

진행 중인 long-running 작업의 진행률 조회. (v0.7.2.3 신규) hwp_session_state(load)의 단축 wrapper. progress_percent/current_section/cancelled 즉시 반환.

Inputs: session_id (required).

hwp_get_table_dimensionsA

표의 전체 너비, 셀 여백, 바깥 여백을 반환합니다. 양식 분석 시 표 구조를 정확히 재현하기 위해 사용합니다.

Inputs: table_index (required).

hwp_get_table_format_summaryA

표 전체의 서식 요약을 반환합니다. 샘플 셀들의 글꼴/크기/자간/장평/줄간격을 한번에 파악합니다. 표에 내용을 채우기 전에 서식 패턴을 파악할 때 사용하세요.

Inputs: table_index (required), sample_tabs.

hwp_get_tablesA

문서의 표 데이터를 조회합니다. 특정 표 인덱스를 지정하거나 전체 표를 반환합니다. 표 셀을 채우기 전에 구조를 확인할 때 사용하세요.

Inputs: file_path, table_index.

hwp_image_extractA

문서의 모든 이미지를 지정 디렉토리에 추출합니다. 문서 내 이미지를 파일로 가져올 때 사용하세요.

Inputs: output_dir (required).

hwp_indentA

현재 커서 위치의 단락을 들여쓰기합니다 (Shift+Tab 효과). 공문서 순번 체계에서 하위 항목 들여쓰기에 사용.

Inputs: depth.

hwp_insert_auto_numC

자동 번호매기기를 삽입합니다.

Inputs: no named parameters.

hwp_insert_body_after_headingA

소제목 아래에 본문 단락을 삽입합니다. find_and_append 와 달리 (1) 목차(TOC) 항목 자동 skip, (2) 새 문단 분리 (BreakPara), (3) 본문 스타일 자동 리셋 (heading 스타일 상속 방지). 양식 채우기·사업계획서 작성 등에 권장.

Inputs: heading (required), body_text (required), skip_toc, body_style, +1 more.

hwp_insert_captionB

표나 그림에 캡션(제목)을 삽입합니다.

Inputs: side, text.

hwp_insert_date_codeA

현재 커서 위치에 오늘 날짜를 자동 삽입합니다.

Inputs: no named parameters.

hwp_insert_endnoteC

현재 커서 위치에 미주를 삽입합니다.

Inputs: text.

hwp_insert_footnoteA

현재 커서 위치에 각주를 삽입합니다. 학술 문서나 보고서에서 참조 주석을 달 때 사용하세요.

Inputs: text.

hwp_insert_headingA

제목 텍스트를 삽입합니다 (H1H9). 공문서 순번 체계의 대제목 등에 사용. numbering으로 자동 순번(텍스트 prefix)을 붙일 수 있습니다 (예: Ⅰ. 제목, 1. 제목, 가. 제목). v0.6.9+: auto_outline_level 옵션으로 ParaShape.OutlineLevel 자동 설정 → 한글 "개요 보기" + hwp_generate_toc 계층 인식 활성화. level 범위 16 → 1~9 확장.

Inputs: text (required), level (required), number, numbering, +2 more.

hwp_insert_lineB

현재 위치에 선(줄)을 삽입합니다.

Inputs: no named parameters.

hwp_insert_markdownA

마크다운 텍스트를 한글 서식으로 변환하여 현재 커서 위치에 삽입합니다. # 제목, 굵게, - 목록 등을 지원합니다.

Inputs: text (required).

hwp_insert_memoC

메모 필드를 삽입합니다.

Inputs: text.

hwp_insert_page_breakA

현재 커서 위치에 페이지 나누기를 삽입합니다.

Inputs: no named parameters.

hwp_insert_page_numA

현재 커서 위치에 쪽 번호를 삽입합니다. format으로 형식을 지정할 수 있습니다 (예: - 1 -, (1)).

Inputs: format.

hwp_insert_pictureA

현재 커서 위치에 이미지를 삽입합니다. 표 셀 안에서도 사용 가능. (v0.7.3) treat_as_char (글자처럼 취급) + embedded (본문에 박힘) 옵션 지원.

Inputs: file_path (required), width, height, embedded, +1 more.

hwp_insert_row_at_cursorA

현재 커서가 있는 셀 기준으로 행을 추가합니다. (v0.6.8 신규) 표 바깥이면 에러. above=위, below=아래, append=표 맨 끝. 기존 hwp_table_add_row는 table_index 지정 방식이고, 이 도구는 커서 위치 기반 — 사용자가 "여기에 한 줄 더" 요청 시 유용.

Inputs: position (required).

hwp_insert_textB

현재 커서 위치에 텍스트를 삽입합니다. 필드가 없는 문서에 텍스트를 추가할 때 사용하세요. style로 글꼴/크기/굵기/색상 등 서식 지정 가능.

Inputs: text (required), color, style, outline_level.

hwp_insert_textboxA

글상자(텍스트박스)를 생성합니다. x/y로 위치, width/height로 크기를 지정합니다. 결재란 등 위치 지정이 필요한 요소에 사용하세요.

Inputs: x, y, text, width, +2 more.

hwp_inspect_com_objectA

[개발용] pyhwpx COM 객체의 실제 속성 목록을 덤프합니다. HCharShape/HParaShape 등의 정확한 속성명을 확인할 때 사용.

Inputs: object.

hwp_install_depsA

Python 의존성을 자동 설치합니다. (v0.7.4.6 신규, v0.7.4.7 확장) mcp-server/python/requirements.txt 기준 pip install. mode="all" (기본): pyhwpx+pywin32+PyMuPDF+pdfplumber+Pillow+opencv+numpy+paddlepaddle+paddleocr 전체 설치 (~700MB, 최대 20분). mode="core_only": paddlepaddle/paddleocr 제외 — native PDF clone 만 작동. force=true: sentinel 무시하고 재설치. v0.7.4.7 부터는 첫 HWP 도구 호출 시 자동으로 core_only 설치가 사전 실행되므로, 사용자가 이 도구를 명시 호출할 필요는 OCR 추가(mode:"all")나 재설치 시에만.

Inputs: mode, force, timeout_minutes.

hwp_korean_business_fillA

공무원 양식 원스톱 자동 작성. (v0.7.5.4 신규) 양식 파일 + 본문 채우기 맵만 주면 자동으로: (1) 문서 타입 감지 + 공무원 표준 프리셋 선택, (2) 원본 서식 스냅샷 캐시, (3) 작성요령 박스 정리 (scope=both), (4) 표 셀 + 본문 일괄 삽입, (5) 새 경로 저장 (원본 절대 보존), (6) 5단계 검증. 사업계획서/공문/보고서 자동화의 권장 진입점.

Inputs: form_file (required), output_path (required), body_fills, run_verify, +3 more.

hwp_list_controlsA

현재 열린 HWP/HWPX 문서의 모든 컨트롤(표/그림/머리말/꼬리말/각주/미주/누름틀/하이퍼링크/책갈피/수식)을 HeadCtrl 순회로 나열합니다. 페이지 위치, 사용자 설명, 표 행/열 정보 포함. analyze_document보다 가벼움. CtrlID: tbl(표), gso(그림), head(머리말), foot(꼬리말), fn(각주), en(미주), %clk(누름틀), %hlk(하이퍼링크), bokm(책갈피), eqed(수식).

Inputs: filter, max_visits.

hwp_list_filesA

디렉토리 내 HWP/HWPX 파일 목록을 반환합니다. Python/한글 프로그램 없이도 사용 가능합니다. 문서 작업 전 파일 위치를 확인할 때 먼저 호출하세요.

Inputs: directory, recursive.

hwp_map_table_cellsA

표의 셀을 Tab 순서로 순회하여 각 셀의 Tab 인덱스와 내용을 매핑합니다. 병합 셀이 있는 표에서 hwp_fill_table_cells의 tab 파라미터에 사용할 인덱스를 확인할 때 사용하세요.

Inputs: table_index (required).

hwp_merge_current_selectionA

현재 이미 선택된 표 셀 블록을 병합합니다. (v0.6.8 신규) TableCellBlock + TableCellBlockExtend로 직접 블록을 만든 뒤 이 도구로 병합. 기존 hwp_table_merge_cells는 start_row/col + end_row/col 좌표 지정 방식이고, 이 도구는 "이미 선택된 상태" 전용.

Inputs: no named parameters.

hwp_navigate_cellA

현재 표 안에서 커서를 인접 셀로 이동합니다. (v0.6.8 신규) 표 바깥이면 에러. left/right/upper/lower 4방향. 사업계획서 표 정밀 편집 시 hwp_list_controls로 표 위치 확인 → 진입 → 이 도구로 셀 이동 → insert_row_at_cursor 등 조합.

Inputs: direction (required).

hwp_open_documentA

지정된 경로의 HWP/HWPX 파일을 열어 편집 준비합니다. 이미 열린 문서가 있으면 자동으로 닫고 새 문서를 엽니다. 문서를 열면 hwp_analyze_document로 구조를 파악하세요.

Inputs: file_path (required).

hwp_outdentB

현재 커서 위치의 단락 들여쓰기를 줄입니다 (내어쓰기).

Inputs: depth.

hwp_pdf_cloneA

PDF (native 또는 스캔 한국어) 를 편집 가능한 HWP/HWPX 로 복원합니다. (v0.7.4.4) native PDF 는 PyMuPDF get_text("dict") 로 bbox + 폰트 직접 추출, 스캔 PDF 는 PaddleOCR (lang=korean, ~150MB 모델 최초 자동 다운로드) + opencv 전처리 (deskew + denoise + threshold). hybrid PDF 는 페이지별 자동 dispatch. 제목 감지, 표 재구성 (pdfplumber find_tables), 이미지 임베딩 (page.get_images + extract_image), 2-column 감지 경고, 4-component fidelity score (text/page/layout/structure). 출력은 원본과 시각적으로 유사한 클론 (픽셀 단위 일치 아님).

Inputs: pdf_path (required), output_path (required), options.

hwp_privacy_scanA

문서 텍스트에서 개인정보(주민번호, 전화번호, 이메일, 계좌번호 등)를 자동 감지합니다. 공공기관 문서 제출 전 개인정보 포함 여부를 확인할 때 사용하세요.

Inputs: file_path.

hwp_read_referenceA

참고자료 파일(txt, csv, xlsx, json, md)의 내용을 추출합니다. 사업계획서 작성 시 참고 데이터를 가져올 때 사용하세요. HWP 파일은 hwp_analyze_document를 사용하세요.

Inputs: file_path (required), max_chars.

hwp_reference_policyB

참고자료 정책 메타 도구. (v0.7.2.2 신규) ~/.hwp_studio_config.json에 max_reference_files/max_total_size_mb/max_tokens_input_percent/allowed_formats/prefer_summary 저장. mode: get|set|reset

Inputs: mode (required), policy.

hwp_refresh_fieldsA

HWPX 파일의 자동 계산 필드(목차, 페이지번호, 작성일, 인덱스 등)에 dirty="1" 마크를 추가하여 한글이 다음에 파일을 열 때 자동 재계산하도록 합니다. (v0.7.0 신규, composite tool) 처리 대상: PageNum, TotalPage, Date, Time, TOC, Index, CrossRef, FieldFormula. .hwp는 미지원.

Inputs: file_path (required), field_types, output_path.

hwp_review_and_editB

문서 종합 리뷰. (v0.7.2.3 신규) consistency/privacy/formatting 검사 후 점수 산출. auto_fix=true면 안전한 자동 수정 시도. score_before/after 반환.

Inputs: file_path (required), checks, auto_fix, expected_profile.

hwp_save_documentA

현재 열린 문서를 지정된 경로와 형식으로 저장합니다. 편집 작업 후 반드시 호출하여 변경사항을 저장하세요.

Inputs: path (required), format.

hwp_session_stateA

긴 작성 작업의 진행 상태를 저장/재개합니다. (v0.7.2.2 신규 ★) ~/.hwp_studio_state/{session_id}.json에 sections_total/done, current_section, progress_percent, checkpoints 영속화. mode: save|load|list|delete|cancel

Inputs: mode (required), state, session_id.

hwp_set_background_pictureB

문서에 배경 이미지를 설정합니다. 워터마크로 활용 가능합니다.

Inputs: file_path (required).

hwp_set_cell_colorA

표 셀의 배경색을 설정합니다. 간트차트 음영, 헤더행 강조, 데이터 시각화 등에 사용.

Inputs: cells (required), table_index (required).

hwp_set_cell_propertyB

표 셀의 여백, 수직 정렬, 텍스트 방향, 보호 등 속성을 설정합니다.

Inputs: tab (required), table_index (required), protected, margin_top, +5 more.

hwp_set_columnA

현재 섹션의 다단을 설정합니다. 2단/3단 레이아웃에 사용하세요.

Inputs: count (required), gap, line_type.

hwp_set_page_setupA

페이지 여백, 용지 크기, 방향을 설정합니다. 공문서 작성 전 페이지 설정에 사용하세요.

Inputs: top_margin, left_margin, orientation, paper_width, +5 more.

hwp_set_paragraph_styleA

현재 커서 위치의 단락 서식을 변경합니다. left_margin=나머지줄 시작위치, indent=첫줄 들여쓰기. 첫줄 시작위치 = left_margin + indent. v0.6.7+: 문단 테두리(border_*) 4면 + first_line_indent alias + indent<0 자동 left_margin 보정.

Inputs: align, indent, condense, line_wrap, +27 more.

hwp_set_table_borderB

표의 테두리 스타일을 설정합니다. 표 전체 또는 특정 셀의 테두리를 변경할 수 있습니다.

Inputs: table_index (required), cells, style.

hwp_smart_analyzeA

문서를 열고, 구조 분석 + 문서 타입 추론 + 서식 프로파일 + 완성도 + 추천 작업을 한번에 수행합니다. 문서를 처음 다룰 때 이 도구 하나면 충분합니다. analyze_document + document_summary + get_table_format_summary를 통합한 원스톱 분석 도구입니다.

Inputs: file_path (required).

hwp_smart_fillA

표 셀 채우기 + 서식 자동 감지/보존. hwp_fill_table_cells와 달리 각 셀의 글꼴/크기/자간/장평을 자동 감지하고 유지합니다. 공공기관 문서처럼 서식이 중요한 경우 이 도구를 사용하세요. 적용된 서식 정보도 반환합니다.

Inputs: cells (required), table_index (required).

hwp_snapshot_template_styleA

양식 원본의 서식 프로파일을 스냅샷으로 캐시합니다. (v0.7.5.4 신규) body_default + heading_samples (레벨별) + table_cell_samples 를 JSON 으로 ~/.hwp_studio_state/snap_XXX.json 에 저장. 양식 첨부 후 한 번 호출하면 이후 insert_body_after_heading 호출 시 이 스냅샷 참조로 일관된 서식 적용 가능. 공무원 양식 작업의 첫 단계.

Inputs: no named parameters.

hwp_table_add_columnB

표에 열을 추가합니다 (현재 열 오른쪽).

Inputs: table_index (required).

hwp_table_add_rowA

표에 행을 추가합니다. 표의 현재 마지막 행 아래에 새 행이 추가됩니다.

Inputs: table_index (required).

hwp_table_create_from_dataA

2D 배열 데이터로 새 표를 생성합니다. col_widths/row_heights 로 mm 단위 정밀 레이아웃. (v0.7.3.1) cell 안 호출 시 자동으로 cell 폭 기반 col_widths 축소. row_heights 도 페이지 높이 자동 축소. treat_as_char 옵션으로 글자처럼 취급 on/off 제어 (cell 안 표는 한컴 자동 적용). (v0.7.6+) header_style=true 시 첫 행은 Bold + 가운데정렬 + 배경색 #E8E8E8 + 글자색 #333333 자동 적용 (header_bg_color/header_text_color 로 override).

Inputs: data (required), alignment, col_widths, row_heights, +4 more.

hwp_table_delete_columnB

표에서 현재 열을 삭제합니다.

Inputs: table_index (required).

hwp_table_delete_rowC

표에서 현재 행을 삭제합니다.

Inputs: table_index (required).

hwp_table_distribute_widthC

표 셀 너비를 균등하게 분배합니다.

Inputs: table_index (required).

hwp_table_formula_avgC

표에서 평균을 자동 계산합니다. 현재 셀 위치에서 한글의 자동 평균 기능을 실행합니다.

Inputs: table_index (required).

hwp_table_formula_sumC

표에서 합계를 자동 계산합니다. 현재 셀 위치에서 한글의 자동 합계 기능을 실행합니다.

Inputs: table_index (required).

hwp_table_insert_from_csvA

CSV 또는 Excel 파일을 읽어서 표로 자동 생성합니다. 현재 커서 위치에 헤더+데이터가 포함된 표가 삽입됩니다.

Inputs: file_path (required).

hwp_table_merge_cellsA

표의 셀을 병합합니다. start_row/col ~ end_row/col로 범위를 지정하면 해당 영역이 병합됩니다. 범위 미지정 시 현재 선택된 셀이 병합됩니다. 병합 순서는 하단→상단이 안전합니다.

Inputs: table_index (required), end_col, end_row, start_col, +1 more.

hwp_table_split_cellA

표에서 현재 셀을 분할합니다. v0.6.8+: rows/cols 옵셔널 — 생략 시 기본 2×1 분할, 지정 시 HAction ParameterSet 경로로 정밀 분할.

Inputs: table_index (required), cols, rows.

hwp_table_swap_typeC

표의 행과 열을 교환합니다.

Inputs: table_index (required).

hwp_table_to_csvB

표 데이터를 CSV 파일로 내보냅니다.

Inputs: output_path (required), table_index (required).

hwp_table_to_jsonC

표 데이터를 JSON 형식으로 추출합니다.

Inputs: table_index (required).

hwp_template_generateA

템플릿 기반으로 HWPX 문서를 생성합니다. 변수(기업명, 대표자 등)를 치환하여 완성된 문서를 만듭니다. 한글 프로그램 없이 동작합니다.

Inputs: variables (required), output_path (required), template_id (required).

hwp_template_libraryA

문서 템플릿 라이브러리. (v0.7.2.2 신규) 사용자 등록 템플릿을 ~/.hwp_studio_templates/{id}.json + files/{id}.hwpx에 저장. mode: list|get|register|delete|search. 빌트인 35개 템플릿은 기존 hwp_template_list 도구 사용.

Inputs: mode (required), query, template, template_id.

hwp_template_listB

사용 가능한 22종 문서 템플릿 목록을 반환합니다. 공문서, 기업, 학술, 개인 카테고리별 템플릿을 확인할 수 있습니다. 한글 프로그램 없이 동작합니다.

Inputs: category.

hwp_toggle_checkboxA

문서의 체크박스를 전환합니다 (□→■, ☐→☑ 등). 양식에서 특정 항목을 체크할 때 사용.

Inputs: find (required), replace (required).

hwp_validate_consistencyA

작성된 문서의 양식 일관성을 검증합니다. (v0.7.1 신규) expected_profile(WritingPatterns)과 비교하여 deviations와 0~100 점수 반환. 작성 중간/완료 후 호출하여 양식 준수 확인.

Inputs: file_path (required), expected_profile.

hwp_verify_5stageA

문서를 TEST_CHECKLIST Phase 19 의 5단계 검증 기준으로 평가합니다. (v0.7.5.4 신규) Stage 1 step_log (호출자 보장), 2 body_verified (chars ≥ expected×0.5), 3 file_size (22KB/28KB 하한), 4 text cross-check (snippet 90%+ 매칭), 5 layout PNG (opt-in). overall_pass 는 stage 1-4 모두 PASS 시 true. 신규 문서 작성 후 자동 검증에 사용.

Inputs: file_path (required), run_layout, expected_chars, expected_text_snippet.

hwp_verify_layoutA

현재 문서를 PNG 이미지로 변환하여 경로를 반환합니다. Claude가 Read 도구로 이미지를 읽어 표 구조, 셀 병합, 열 너비, 정렬 등을 시각적으로 검증합니다. 공문서 생성 후 결과물 확인에 사용하세요. PyMuPDF 필요(pip install PyMuPDF).

Inputs: pages.

hwp_word_countA

현재 문서의 글자수, 단어수, 문단수, 페이지수를 반환합니다.

Inputs: no named parameters.

hwp_xml_edit_nested_cellA

HWPX 중첩 표(표 안의 표)의 특정 셀 텍스트를 재귀 경로로 편집합니다. (v0.7.2.1 신규) path 배열로 중첩 깊이 표현 — 예: [{tableIndex:0,row:0,col:0},{tableIndex:0,row:1,col:1}]은 "0번 표 (0,0) 셀 안의 0번 nested 표 (1,1) 셀". v0.7.0 hwp_xml_edit_table_cell의 다단계 확장. linesegarray 셀 내부만 자동 삭제, charPrIDRef 보존.

Inputs: find (required), path (required), replace (required), file_path (required), +1 more.

hwp_xml_edit_table_cellA

HWPX 파일의 특정 표 셀(row, col)에서 텍스트를 직접 찾아 바꿉니다. (v0.7.0 신규) 한글 프로그램 없이 XML 경로(tc → subList → p → run → t)로 처리. linesegarray 셀 내부만 자동 삭제. charPrIDRef(서식 ID)는 보존. .hwp는 미지원 (hwp_fill_table_cells 사용).

Inputs: col (required), row (required), find (required), replace (required), +4 more.

hwp_xml_edit_textB

HWPX 파일의 텍스트를 직접 찾아 바꿉니다. 한글 프로그램 없이 동작합니다. HWPX(ZIP+XML) 내부의 텍스트를 수정합니다.

Inputs: find (required), replace (required), file_path (required), output_path.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 134 tools

    Disambiguation3/5

    Many tools have overlapping purposes, such as multiple analysis tools (hwp_analyze_document, hwp_smart_analyze, hwp_extract_full_profile) and multiple fill tools (hwp_fill_table_cells, hwp_smart_fill, hwp_auto_fill_from_reference). While descriptions are detailed and often recommend when to use each, the number of similar tools can confuse an agent about which to choose.

    Naming Consistency4/5

    All tool names start with 'hwp_' and use consistent snake_case with verb_noun or noun_verb patterns (e.g., hwp_get_tables, hwp_fill_fields). There are no mixed conventions like camelCase, though some names are very long and compound (e.g., hwp_korean_business_fill), which is a minor inconsistency.

    Tool Count2/5

    With 134 tools, the server is far too large for a focused domain like HWP document manipulation. Many tools are specialized variants or combinations of core operations, leading to an excessive surface that would overwhelm agents and increase selection complexity.

    Completeness4/5

    The tool set covers nearly all common HWP operations: open/close/save, text/table/image editing, search/replace, field filling, PDF export, page setup, headers/footers, batch conversion, and even template management. Minor gaps like undo/redo or spell check are absent but not critical for programmatic document creation.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      An 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
      -
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      An 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.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An 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.
      35 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      An MCP server for reading, writing, and managing Korean Hangul Word Processor (HWP/HWPX) files. It allows users to extract content, fill templates, and create new documents directly through AI assistants.
      34
      456 npm
      105
      MIT