hwp-edit-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hwp_edit_mcp-0.1.0/.gitattributes +3 -0
- hwp_edit_mcp-0.1.0/.github/workflows/ci.yml +32 -0
- hwp_edit_mcp-0.1.0/.github/workflows/release.yml +56 -0
- hwp_edit_mcp-0.1.0/.gitignore +15 -0
- hwp_edit_mcp-0.1.0/CHANGELOG.md +10 -0
- hwp_edit_mcp-0.1.0/LICENSE +21 -0
- hwp_edit_mcp-0.1.0/NOTICE +27 -0
- hwp_edit_mcp-0.1.0/PKG-INFO +89 -0
- hwp_edit_mcp-0.1.0/README.en.md +70 -0
- hwp_edit_mcp-0.1.0/README.md +70 -0
- hwp_edit_mcp-0.1.0/SECURITY.md +16 -0
- hwp_edit_mcp-0.1.0/docs/clients.md +170 -0
- hwp_edit_mcp-0.1.0/docs/troubleshooting.md +12 -0
- hwp_edit_mcp-0.1.0/pyproject.toml +37 -0
- hwp_edit_mcp-0.1.0/src/hwp_edit_mcp/__init__.py +3 -0
- hwp_edit_mcp-0.1.0/src/hwp_edit_mcp/__main__.py +71 -0
- hwp_edit_mcp-0.1.0/src/hwp_edit_mcp/rhwp_backend.py +240 -0
- hwp_edit_mcp-0.1.0/src/hwp_edit_mcp/rhwp_install.py +212 -0
- hwp_edit_mcp-0.1.0/src/hwp_edit_mcp/safe_writer.py +274 -0
- hwp_edit_mcp-0.1.0/src/hwp_edit_mcp/server.py +868 -0
- hwp_edit_mcp-0.1.0/tests/conftest.py +51 -0
- hwp_edit_mcp-0.1.0/tests/fixtures/make_fixtures.py +74 -0
- hwp_edit_mcp-0.1.0/tests/fixtures/sample_form.hwp +0 -0
- hwp_edit_mcp-0.1.0/tests/fixtures/sample_form.hwpx +0 -0
- hwp_edit_mcp-0.1.0/tests/snapshots/tools.json +699 -0
- hwp_edit_mcp-0.1.0/tests/test_mcp_e2e.py +309 -0
- hwp_edit_mcp-0.1.0/tests/test_paths.py +113 -0
- hwp_edit_mcp-0.1.0/tests/test_rhwp_install.py +231 -0
- hwp_edit_mcp-0.1.0/tests/test_rhwp_integration.py +136 -0
- hwp_edit_mcp-0.1.0/tests/test_safe_writer.py +159 -0
- hwp_edit_mcp-0.1.0/tests/test_tool_schema.py +282 -0
- hwp_edit_mcp-0.1.0/uv.lock +1232 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
14
|
+
python-version: ["3.10", "3.13"]
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
enable-cache: true
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: uv sync
|
|
27
|
+
|
|
28
|
+
- name: Install rhwp
|
|
29
|
+
run: uv run hwp-edit-mcp install-rhwp
|
|
30
|
+
|
|
31
|
+
- name: Run tests
|
|
32
|
+
run: uv run pytest -q
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: astral-sh/setup-uv@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
|
|
18
|
+
- name: Build package
|
|
19
|
+
run: uv build
|
|
20
|
+
|
|
21
|
+
- uses: actions/upload-artifact@v4
|
|
22
|
+
with:
|
|
23
|
+
name: dist
|
|
24
|
+
path: dist/
|
|
25
|
+
|
|
26
|
+
pypi:
|
|
27
|
+
needs: build
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment: pypi
|
|
30
|
+
permissions:
|
|
31
|
+
id-token: write
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/download-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: dist
|
|
36
|
+
path: dist/
|
|
37
|
+
|
|
38
|
+
- name: Publish to PyPI
|
|
39
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
40
|
+
|
|
41
|
+
github-release:
|
|
42
|
+
needs: pypi
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
permissions:
|
|
45
|
+
contents: write
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/download-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: dist
|
|
50
|
+
path: dist/
|
|
51
|
+
|
|
52
|
+
- name: Create GitHub Release
|
|
53
|
+
uses: softprops/action-gh-release@v2
|
|
54
|
+
with:
|
|
55
|
+
files: dist/*
|
|
56
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-11-17)
|
|
4
|
+
|
|
5
|
+
첫 공개 릴리스.
|
|
6
|
+
|
|
7
|
+
- `rhwp mcp-serve` 기반 헤드리스 HWP/HWPX MCP 서버 (`hwp-edit-mcp`)
|
|
8
|
+
- `SafeWriter` 트랜잭션: SHA-256 해시 충돌 검사, `.hwp-mcp-history` 자동 스냅샷(최대 50개), 임시 파일 재열기·무손실 검증, `os.replace` 원자 교체
|
|
9
|
+
- 14개 MCP 도구 제공: `hwp_info`, `hwp_get_text`, `hwp_search`, `hwp_table_view`, `hwp_fill_cells`(좌표·라벨 지원), `hwp_replace_text`, `hwp_fill_fields`, `hwp_insert_text`, `hwp_run_plan`, `hwp_render_page`, `hwp_history`, `hwp_restore`, `hwp_diff`, `hwp_rhwp_call`
|
|
10
|
+
- CLI 옵션(`--read-only`, `--root`, `--rhwp-path`, `install-rhwp`) 및 환경변수(`HWP_EDIT_READ_ONLY`, `HWP_EDIT_ROOTS`, `HWP_EDIT_MAX_CHARS`, `HWP_EDIT_NO_DOWNLOAD`, `HWP_EDIT_LOG_FILE`, `HWP_EDIT_CACHE_DIR`, `RHWP_EXE`) 지원
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Myeongsu Park
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
hwp-edit-mcp
|
|
2
|
+
Copyright (c) 2026 Myeongsu Park
|
|
3
|
+
|
|
4
|
+
This package downloads and runs rhwp (https://github.com/edwardkim/rhwp)
|
|
5
|
+
at runtime. rhwp is distributed under the following license:
|
|
6
|
+
|
|
7
|
+
MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2025-2026 Edward Kim
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: hwp-edit-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Safe HWP/HWPX editing MCP server for AI agents: hash-checked, snapshot-backed, verified writes (rhwp engine)
|
|
5
|
+
Project-URL: Homepage, https://github.com/myeongsu-dev/hwp-edit-mcp
|
|
6
|
+
Project-URL: Issues, https://github.com/myeongsu-dev/hwp-edit-mcp/issues
|
|
7
|
+
Author: Myeongsu Park
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: NOTICE
|
|
11
|
+
Keywords: document,hangul,hwp,hwpx,korean,mcp,rhwp
|
|
12
|
+
Classifier: Natural Language :: Korean
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Office/Business :: Office Suites
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Requires-Dist: mcp<2,>=1.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# hwp-edit-mcp
|
|
21
|
+
|
|
22
|
+
AI 에이전트가 HWP·HWPX 문서를 고칠 때 원본을 지키는 안전한 쓰기(해시 충돌 검사, 자동 스냅샷, 재열기 검증, 원자 교체), 라벨 기반 표 채우기, 히스토리·복원·비교를 제공하는 MCP 서버입니다.
|
|
23
|
+
|
|
24
|
+
## 빠른 시작
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
uvx hwp-edit-mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
첫 실행 시 [rhwp](https://github.com/edwardkim/rhwp) 실행 파일을 캐시에 자동으로 내려받습니다. Claude Code 등록 예:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
claude mcp add -s user hwp -- uvx hwp-edit-mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
다른 에이전트(Claude Desktop, Codex, Grok CLI, Antigravity, Gemini CLI, OpenCode, Cursor, VS Code) 설정은 [에이전트별 설정 안내](docs/clients.md), 문제 해결은 [트러블슈팅](docs/troubleshooting.md)을 참고하세요.
|
|
37
|
+
|
|
38
|
+
## 안전한 쓰기(SafeWriter)
|
|
39
|
+
|
|
40
|
+
모든 쓰기 도구는 `SafeWriter` 트랜잭션을 거칩니다.
|
|
41
|
+
|
|
42
|
+
1. **해시 충돌 검사**: 직전에 읽은 SHA-256 또는 `expected_sha256`과 현재 파일 해시를 대조해 외부 편집기 수정과의 충돌을 막습니다(`force=True`로 우회 가능).
|
|
43
|
+
2. **자동 스냅샷**: 수정 직전 원본을 문서 폴더의 `.hwp-mcp-history/<파일명>/`에 최대 50개까지 보관합니다.
|
|
44
|
+
3. **임시 파일 격리 및 재열기 검증**: 같은 폴더의 임시 파일에 먼저 쓴 뒤 손실 보고(`lossCount`)가 없는지 확인하고, `rhwp`로 다시 열어 페이지 수 급감이나 파손을 검사합니다(`allow_loss=True`로 허용 가능).
|
|
45
|
+
4. **원자 교체**: `os.replace`로 원본을 교체하며, Windows 파일 잠금(`PermissionError`) 시 짧게 대기하며 재시도합니다.
|
|
46
|
+
|
|
47
|
+
## 제공 도구 (14개)
|
|
48
|
+
|
|
49
|
+
| 이름 | 하는 일 | 구분 |
|
|
50
|
+
| :--- | :--- | :--- |
|
|
51
|
+
| `hwp_info` | 문서 메타데이터(형식, 페이지 수, 문단 수, 글꼴, SHA-256) 조회 | 읽기 |
|
|
52
|
+
| `hwp_get_text` | 본문 텍스트 추출 (`text` / `markdown`, 페이지·길이 지정) | 읽기 |
|
|
53
|
+
| `hwp_search` | 문자열 검색 및 페이지·문맥·표 셀 좌표 반환 | 읽기 |
|
|
54
|
+
| `hwp_table_view` | 표 크기, 병합 정보, 셀 좌표·텍스트 조회 (`table_index`) | 읽기 |
|
|
55
|
+
| `hwp_fill_cells` | 좌표(`row`, `col`) 또는 라벨(`label`, `right`/`below`)로 표 셀 채우기 | 쓰기 |
|
|
56
|
+
| `hwp_replace_text` | 본문·표 셀 텍스트 일괄 치환 | 쓰기 |
|
|
57
|
+
| `hwp_fill_fields` | 누름틀(필드) 이름 기준 값 채우기 | 쓰기 |
|
|
58
|
+
| `hwp_insert_text` | 지정한 섹션·문단·오프셋 위치에 텍스트 삽입 | 쓰기 |
|
|
59
|
+
| `hwp_run_plan` | rhwp 선언적 편집 계획서(plan JSON) 일괄 실행 | 쓰기 |
|
|
60
|
+
| `hwp_render_page` | 페이지를 PNG 또는 SVG 이미지로 렌더링 | 읽기 |
|
|
61
|
+
| `hwp_history` | `.hwp-mcp-history` 스냅샷 목록 최신순 조회 | 읽기 |
|
|
62
|
+
| `hwp_restore` | `snapshot_id`로 문서 복원 (현재 파일 백업 후 원자 교체) | 쓰기 |
|
|
63
|
+
| `hwp_diff` | 두 파일 또는 현재 문서와 스냅샷 간 텍스트 unified diff 비교 | 읽기 |
|
|
64
|
+
| `hwp_rhwp_call` | rhwp 내장 180여 개 도구 직접 호출 (쓰기 도구는 SafeWriter 경유) | 읽기/쓰기 |
|
|
65
|
+
|
|
66
|
+
## CLI 옵션 및 환경변수
|
|
67
|
+
|
|
68
|
+
| CLI 옵션 | 환경변수 | 기본값 | 설명 |
|
|
69
|
+
| :--- | :--- | :--- | :--- |
|
|
70
|
+
| `--read-only` | `HWP_EDIT_READ_ONLY` | 비활성 | 쓰기 도구를 등록하지 않고 읽기·검사 도구만 노출 |
|
|
71
|
+
| `--root DIR` (반복) | `HWP_EDIT_ROOTS` | 제한 없음 | 접근 허용 폴더 지정 (Windows `;`, 그 외 `:` 구분) |
|
|
72
|
+
| `--rhwp-path EXE` | `RHWP_EXE` | 자동 탐색/다운로드 | 사용할 `rhwp` 실행 파일 경로 지정 |
|
|
73
|
+
| `install-rhwp` | — | — | `rhwp` 실행 파일을 미리 내려받아 캐시에 저장 |
|
|
74
|
+
| — | `HWP_EDIT_MAX_CHARS` | `20000` | 도구 응답 최대 문자 수 상한 |
|
|
75
|
+
| — | `HWP_EDIT_NO_DOWNLOAD` | 비활성 | `rhwp` 자동 내려받기 비활성화 (오프라인 환경용) |
|
|
76
|
+
| — | `HWP_EDIT_CACHE_DIR` | OS 기본 캐시 | `rhwp` 캐시 저장 경로 덮어쓰기 |
|
|
77
|
+
| — | `HWP_EDIT_LOG_FILE` | stderr만 출력 | 서버 로그를 파일에도 기록 |
|
|
78
|
+
|
|
79
|
+
## rhwp와의 관계
|
|
80
|
+
|
|
81
|
+
`rhwp`는 `mcp-serve` 명령으로 저수준 HWP/HWPX 파싱·편집 도구를 제공합니다. `hwp-edit-mcp`는 `rhwp mcp-serve`를 상주 하위 프로세스로 감싸면서, 에이전트 실수나 덮어쓰기로부터 문서를 보호하는 `SafeWriter`(해시 충돌 검사, 스냅샷 백업·복원·diff, 재열기 무손실 검증, 원자 교체), 라벨 기반 표 셀 채우기, 허용 폴더(`--root`) 및 읽기 전용(`--read-only`) 가드, 응답 길이 제한(`max_chars`), 자동 `rhwp` 설치·캐싱을 더합니다.
|
|
82
|
+
|
|
83
|
+
## 감사의 말
|
|
84
|
+
|
|
85
|
+
[jkf87/hwp-mcp](https://github.com/jkf87/hwp-mcp)를 포크해 시작했고, [rhwp](https://github.com/edwardkim/rhwp) 엔진 기반으로 다시 작성했습니다.
|
|
86
|
+
|
|
87
|
+
## 라이선스
|
|
88
|
+
|
|
89
|
+
`hwp-edit-mcp`는 [MIT License](LICENSE)로 배포됩니다. 런타임에 사용하는 `rhwp`의 MIT 라이선스 고지는 [NOTICE](NOTICE)를 확인하세요.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# hwp-edit-mcp
|
|
2
|
+
|
|
3
|
+
An MCP server for AI agents to safely read and edit HWP/HWPX documents—featuring hash-conflict checks, automatic snapshots, reopen verification, atomic file replacement, label-based table filling, and history/restore/diff.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
uvx hwp-edit-mcp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
On first run, `hwp-edit-mcp` downloads and caches the [rhwp](https://github.com/edwardkim/rhwp) binary automatically. Register in Claude Code:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
claude mcp add -s user hwp -- uvx hwp-edit-mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For other clients (Claude Desktop, Codex, Grok CLI, Antigravity, Gemini CLI, OpenCode, Cursor, VS Code), see [docs/clients.md](docs/clients.md). For common issues, see [docs/troubleshooting.md](docs/troubleshooting.md).
|
|
18
|
+
|
|
19
|
+
## SafeWriter
|
|
20
|
+
|
|
21
|
+
Every write tool runs inside a `SafeWriter` transaction:
|
|
22
|
+
|
|
23
|
+
1. **Hash Conflict Check**: Compares the file's current SHA-256 against the last-seen hash or `expected_sha256` to prevent overwriting external edits (`force=True` overrides).
|
|
24
|
+
2. **Automatic Snapshot**: Copies the original file to `.hwp-mcp-history/<filename>/` before writing (up to 50 snapshots).
|
|
25
|
+
3. **Temp Isolation & Reopen Verification**: Writes to a temp file in the same directory, rejects non-zero `lossCount` (`allow_loss=True` overrides), and reopens the output via `rhwp` to verify integrity.
|
|
26
|
+
4. **Atomic Replace**: Swaps the temp file into place with `os.replace`, retrying briefly if locked on Windows.
|
|
27
|
+
|
|
28
|
+
## Tools (14)
|
|
29
|
+
|
|
30
|
+
| Tool | Description | Mode |
|
|
31
|
+
| :--- | :--- | :--- |
|
|
32
|
+
| `hwp_info` | Read metadata (format, pages, paragraphs, fonts, SHA-256) | Read |
|
|
33
|
+
| `hwp_get_text` | Extract text (`text` or `markdown`, optional `page` / `max_chars`) | Read |
|
|
34
|
+
| `hwp_search` | Search text and return page, context, and table cell coordinates | Read |
|
|
35
|
+
| `hwp_table_view` | Inspect table dimensions, merges, and cell coordinates/text | Read |
|
|
36
|
+
| `hwp_fill_cells` | Fill table cells by `(row, col)` or by `label` (`right` / `below`) | Write |
|
|
37
|
+
| `hwp_replace_text` | Find and replace text across body and table cells | Write |
|
|
38
|
+
| `hwp_fill_fields` | Fill click-here fields by field name | Write |
|
|
39
|
+
| `hwp_insert_text` | Insert text at `(section, paragraph, offset)` | Write |
|
|
40
|
+
| `hwp_run_plan` | Execute a declarative `rhwp` edit plan JSON | Write |
|
|
41
|
+
| `hwp_render_page` | Render pages to PNG or SVG images | Read |
|
|
42
|
+
| `hwp_history` | List `.hwp-mcp-history` snapshots (newest first) | Read |
|
|
43
|
+
| `hwp_restore` | Restore a document from `snapshot_id` (backs up current first) | Write |
|
|
44
|
+
| `hwp_diff` | Unified text diff between two files or a file and a snapshot | Read |
|
|
45
|
+
| `hwp_rhwp_call` | Escape hatch to any of ~180 `rhwp` tools (writes go via SafeWriter) | Read/Write |
|
|
46
|
+
|
|
47
|
+
## CLI Options & Environment Variables
|
|
48
|
+
|
|
49
|
+
| CLI Option | Environment Variable | Default | Description |
|
|
50
|
+
| :--- | :--- | :--- | :--- |
|
|
51
|
+
| `--read-only` | `HWP_EDIT_READ_ONLY` | off | Register read/inspect tools only |
|
|
52
|
+
| `--root DIR` (repeatable) | `HWP_EDIT_ROOTS` | unrestricted | Restrict file access (`;` on Windows, `:` otherwise) |
|
|
53
|
+
| `--rhwp-path EXE` | `RHWP_EXE` | auto-detect/download | Explicit `rhwp` executable path |
|
|
54
|
+
| `install-rhwp` | — | — | Pre-download and cache `rhwp` |
|
|
55
|
+
| — | `HWP_EDIT_MAX_CHARS` | `20000` | Maximum response character limit |
|
|
56
|
+
| — | `HWP_EDIT_NO_DOWNLOAD` | off | Disable automatic `rhwp` download |
|
|
57
|
+
| — | `HWP_EDIT_CACHE_DIR` | OS cache dir | Override `rhwp` cache directory |
|
|
58
|
+
| — | `HWP_EDIT_LOG_FILE` | stderr only | Also write server logs to a file |
|
|
59
|
+
|
|
60
|
+
## Relationship to rhwp
|
|
61
|
+
|
|
62
|
+
`hwp-edit-mcp` wraps `rhwp mcp-serve` as a persistent stdio backend and adds `SafeWriter` (hash-conflict detection, snapshot history/restore/diff, reopen verification, atomic replace), label-based table cell filling, `--root` / `--read-only` guards, response size capping, and automatic `rhwp` installation.
|
|
63
|
+
|
|
64
|
+
## Acknowledgments
|
|
65
|
+
|
|
66
|
+
Originally forked from [jkf87/hwp-mcp](https://github.com/jkf87/hwp-mcp) and rewritten on the [rhwp](https://github.com/edwardkim/rhwp) engine.
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
`hwp-edit-mcp` is licensed under the [MIT License](LICENSE). See [NOTICE](NOTICE) for `rhwp` MIT license attribution.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# hwp-edit-mcp
|
|
2
|
+
|
|
3
|
+
AI 에이전트가 HWP·HWPX 문서를 고칠 때 원본을 지키는 안전한 쓰기(해시 충돌 검사, 자동 스냅샷, 재열기 검증, 원자 교체), 라벨 기반 표 채우기, 히스토리·복원·비교를 제공하는 MCP 서버입니다.
|
|
4
|
+
|
|
5
|
+
## 빠른 시작
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
uvx hwp-edit-mcp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
첫 실행 시 [rhwp](https://github.com/edwardkim/rhwp) 실행 파일을 캐시에 자동으로 내려받습니다. Claude Code 등록 예:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
claude mcp add -s user hwp -- uvx hwp-edit-mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
다른 에이전트(Claude Desktop, Codex, Grok CLI, Antigravity, Gemini CLI, OpenCode, Cursor, VS Code) 설정은 [에이전트별 설정 안내](docs/clients.md), 문제 해결은 [트러블슈팅](docs/troubleshooting.md)을 참고하세요.
|
|
18
|
+
|
|
19
|
+
## 안전한 쓰기(SafeWriter)
|
|
20
|
+
|
|
21
|
+
모든 쓰기 도구는 `SafeWriter` 트랜잭션을 거칩니다.
|
|
22
|
+
|
|
23
|
+
1. **해시 충돌 검사**: 직전에 읽은 SHA-256 또는 `expected_sha256`과 현재 파일 해시를 대조해 외부 편집기 수정과의 충돌을 막습니다(`force=True`로 우회 가능).
|
|
24
|
+
2. **자동 스냅샷**: 수정 직전 원본을 문서 폴더의 `.hwp-mcp-history/<파일명>/`에 최대 50개까지 보관합니다.
|
|
25
|
+
3. **임시 파일 격리 및 재열기 검증**: 같은 폴더의 임시 파일에 먼저 쓴 뒤 손실 보고(`lossCount`)가 없는지 확인하고, `rhwp`로 다시 열어 페이지 수 급감이나 파손을 검사합니다(`allow_loss=True`로 허용 가능).
|
|
26
|
+
4. **원자 교체**: `os.replace`로 원본을 교체하며, Windows 파일 잠금(`PermissionError`) 시 짧게 대기하며 재시도합니다.
|
|
27
|
+
|
|
28
|
+
## 제공 도구 (14개)
|
|
29
|
+
|
|
30
|
+
| 이름 | 하는 일 | 구분 |
|
|
31
|
+
| :--- | :--- | :--- |
|
|
32
|
+
| `hwp_info` | 문서 메타데이터(형식, 페이지 수, 문단 수, 글꼴, SHA-256) 조회 | 읽기 |
|
|
33
|
+
| `hwp_get_text` | 본문 텍스트 추출 (`text` / `markdown`, 페이지·길이 지정) | 읽기 |
|
|
34
|
+
| `hwp_search` | 문자열 검색 및 페이지·문맥·표 셀 좌표 반환 | 읽기 |
|
|
35
|
+
| `hwp_table_view` | 표 크기, 병합 정보, 셀 좌표·텍스트 조회 (`table_index`) | 읽기 |
|
|
36
|
+
| `hwp_fill_cells` | 좌표(`row`, `col`) 또는 라벨(`label`, `right`/`below`)로 표 셀 채우기 | 쓰기 |
|
|
37
|
+
| `hwp_replace_text` | 본문·표 셀 텍스트 일괄 치환 | 쓰기 |
|
|
38
|
+
| `hwp_fill_fields` | 누름틀(필드) 이름 기준 값 채우기 | 쓰기 |
|
|
39
|
+
| `hwp_insert_text` | 지정한 섹션·문단·오프셋 위치에 텍스트 삽입 | 쓰기 |
|
|
40
|
+
| `hwp_run_plan` | rhwp 선언적 편집 계획서(plan JSON) 일괄 실행 | 쓰기 |
|
|
41
|
+
| `hwp_render_page` | 페이지를 PNG 또는 SVG 이미지로 렌더링 | 읽기 |
|
|
42
|
+
| `hwp_history` | `.hwp-mcp-history` 스냅샷 목록 최신순 조회 | 읽기 |
|
|
43
|
+
| `hwp_restore` | `snapshot_id`로 문서 복원 (현재 파일 백업 후 원자 교체) | 쓰기 |
|
|
44
|
+
| `hwp_diff` | 두 파일 또는 현재 문서와 스냅샷 간 텍스트 unified diff 비교 | 읽기 |
|
|
45
|
+
| `hwp_rhwp_call` | rhwp 내장 180여 개 도구 직접 호출 (쓰기 도구는 SafeWriter 경유) | 읽기/쓰기 |
|
|
46
|
+
|
|
47
|
+
## CLI 옵션 및 환경변수
|
|
48
|
+
|
|
49
|
+
| CLI 옵션 | 환경변수 | 기본값 | 설명 |
|
|
50
|
+
| :--- | :--- | :--- | :--- |
|
|
51
|
+
| `--read-only` | `HWP_EDIT_READ_ONLY` | 비활성 | 쓰기 도구를 등록하지 않고 읽기·검사 도구만 노출 |
|
|
52
|
+
| `--root DIR` (반복) | `HWP_EDIT_ROOTS` | 제한 없음 | 접근 허용 폴더 지정 (Windows `;`, 그 외 `:` 구분) |
|
|
53
|
+
| `--rhwp-path EXE` | `RHWP_EXE` | 자동 탐색/다운로드 | 사용할 `rhwp` 실행 파일 경로 지정 |
|
|
54
|
+
| `install-rhwp` | — | — | `rhwp` 실행 파일을 미리 내려받아 캐시에 저장 |
|
|
55
|
+
| — | `HWP_EDIT_MAX_CHARS` | `20000` | 도구 응답 최대 문자 수 상한 |
|
|
56
|
+
| — | `HWP_EDIT_NO_DOWNLOAD` | 비활성 | `rhwp` 자동 내려받기 비활성화 (오프라인 환경용) |
|
|
57
|
+
| — | `HWP_EDIT_CACHE_DIR` | OS 기본 캐시 | `rhwp` 캐시 저장 경로 덮어쓰기 |
|
|
58
|
+
| — | `HWP_EDIT_LOG_FILE` | stderr만 출력 | 서버 로그를 파일에도 기록 |
|
|
59
|
+
|
|
60
|
+
## rhwp와의 관계
|
|
61
|
+
|
|
62
|
+
`rhwp`는 `mcp-serve` 명령으로 저수준 HWP/HWPX 파싱·편집 도구를 제공합니다. `hwp-edit-mcp`는 `rhwp mcp-serve`를 상주 하위 프로세스로 감싸면서, 에이전트 실수나 덮어쓰기로부터 문서를 보호하는 `SafeWriter`(해시 충돌 검사, 스냅샷 백업·복원·diff, 재열기 무손실 검증, 원자 교체), 라벨 기반 표 셀 채우기, 허용 폴더(`--root`) 및 읽기 전용(`--read-only`) 가드, 응답 길이 제한(`max_chars`), 자동 `rhwp` 설치·캐싱을 더합니다.
|
|
63
|
+
|
|
64
|
+
## 감사의 말
|
|
65
|
+
|
|
66
|
+
[jkf87/hwp-mcp](https://github.com/jkf87/hwp-mcp)를 포크해 시작했고, [rhwp](https://github.com/edwardkim/rhwp) 엔진 기반으로 다시 작성했습니다.
|
|
67
|
+
|
|
68
|
+
## 라이선스
|
|
69
|
+
|
|
70
|
+
`hwp-edit-mcp`는 [MIT License](LICENSE)로 배포됩니다. 런타임에 사용하는 `rhwp`의 MIT 라이선스 고지는 [NOTICE](NOTICE)를 확인하세요.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 보안 정책 (Security Policy)
|
|
2
|
+
|
|
3
|
+
## 취약점 제보
|
|
4
|
+
|
|
5
|
+
보안 취약점을 발견하면 공개 이슈 대신 GitHub Security Advisory를 통해 비공개로 제보해 주세요.
|
|
6
|
+
|
|
7
|
+
- 저장소 **Security** 탭 → **Advisories** → **Report a vulnerability**
|
|
8
|
+
|
|
9
|
+
제보 시 재현 절차, 영향받는 버전, 가능한 경우 패치 제안을 함께 적어 주시면 빠르게 확인하겠습니다.
|
|
10
|
+
|
|
11
|
+
## 신뢰 경계 및 운영 권장 사항
|
|
12
|
+
|
|
13
|
+
- **로컬 파일 접근**: `hwp-edit-mcp`는 MCP 클라이언트가 전달한 `file_path`의 로컬 파일을 읽고 씁니다.
|
|
14
|
+
- **허용 폴더 제한 (`--root`)**: 운영 환경에서는 반드시 `--root <작업폴더>`(또는 `HWP_EDIT_ROOTS`)를 지정해 서버가 접근할 수 있는 디렉터리를 제한하세요.
|
|
15
|
+
- **읽기 전용 모드 (`--read-only`)**: 문서 조회·분석만 필요한 에이전트에는 `--read-only`(또는 `HWP_EDIT_READ_ONLY=1`)를 사용해 쓰기 도구를 비활성화하세요.
|
|
16
|
+
- **신뢰할 수 없는 문서 처리**: 외부에서 받은 HWP/HWPX 파일에는 프롬프트 주입 문자열이 포함될 수 있으므로, 추출한 본문을 에이전트 지시문과 분리해 취급하세요.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# 에이전트별 MCP 등록 안내
|
|
2
|
+
|
|
3
|
+
등록 이름은 `hwp`, 기본 실행 명령은 `uvx hwp-edit-mcp`입니다.
|
|
4
|
+
|
|
5
|
+
> [!TIP]
|
|
6
|
+
> 첫 실행 시 `rhwp` 바이너리를 내려받으므로 초기 기동에 수 초 이상 걸릴 수 있습니다. 기동 시간 제한이 짧은 에이전트에서는 터미널에서 아래 명령을 먼저 실행해 캐시에 받아 두세요.
|
|
7
|
+
> ```bash
|
|
8
|
+
> uvx hwp-edit-mcp install-rhwp
|
|
9
|
+
> ```
|
|
10
|
+
|
|
11
|
+
접근 폴더를 제한하거나 읽기 전용으로 실행하려면 `args`에 `--root <폴더>` 또는 `--read-only`를 추가합니다.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Claude Code
|
|
16
|
+
|
|
17
|
+
CLI로 전역 등록:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
claude mcp add -s user hwp -- uvx hwp-edit-mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
프로젝트 단위 `.mcp.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"hwp": {
|
|
29
|
+
"command": "uvx",
|
|
30
|
+
"args": ["hwp-edit-mcp"]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Claude Desktop
|
|
37
|
+
|
|
38
|
+
`claude_desktop_config.json` (Windows: `%APPDATA%\Claude\claude_desktop_config.json`, macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"hwp": {
|
|
44
|
+
"command": "uvx",
|
|
45
|
+
"args": ["hwp-edit-mcp"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Codex
|
|
52
|
+
|
|
53
|
+
`~/.codex/config.toml`:
|
|
54
|
+
|
|
55
|
+
```toml
|
|
56
|
+
[mcp_servers.hwp]
|
|
57
|
+
command = "uvx"
|
|
58
|
+
args = ["hwp-edit-mcp"]
|
|
59
|
+
startup_timeout_sec = 30
|
|
60
|
+
tool_timeout_sec = 60
|
|
61
|
+
default_tools_approval_mode = "approve"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Codex는 쓰기 도구(`destructiveHint`)를 부를 때 승인을 요구합니다. `codex exec`처럼 승인 창이 없는 실행에서는 `default_tools_approval_mode = "approve"`가 있어야 쓰기 도구가 실행됩니다. 대화형으로 쓰면서 매번 확인받고 싶으면 이 줄을 뺍니다.
|
|
65
|
+
|
|
66
|
+
## Grok CLI
|
|
67
|
+
|
|
68
|
+
`~/.grok/config.toml`:
|
|
69
|
+
|
|
70
|
+
```toml
|
|
71
|
+
[mcp_servers.hwp]
|
|
72
|
+
command = "uvx"
|
|
73
|
+
args = ["hwp-edit-mcp"]
|
|
74
|
+
startup_timeout_sec = 30
|
|
75
|
+
tool_timeout_sec = 60
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Antigravity · AGY
|
|
79
|
+
|
|
80
|
+
`~/.gemini/config/mcp_config.json`:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"mcpServers": {
|
|
85
|
+
"hwp": {
|
|
86
|
+
"command": "uvx",
|
|
87
|
+
"args": ["hwp-edit-mcp"]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Gemini CLI
|
|
94
|
+
|
|
95
|
+
`~/.gemini/settings.json`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"hwp": {
|
|
101
|
+
"command": "uvx",
|
|
102
|
+
"args": ["hwp-edit-mcp"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## OpenCode
|
|
109
|
+
|
|
110
|
+
`~/.config/opencode/opencode.json` (또는 프로젝트 `opencode.json`):
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"mcp": {
|
|
115
|
+
"hwp": {
|
|
116
|
+
"type": "local",
|
|
117
|
+
"command": ["uvx", "hwp-edit-mcp"],
|
|
118
|
+
"enabled": true
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Cursor
|
|
125
|
+
|
|
126
|
+
`~/.cursor/mcp.json` (또는 프로젝트 `.cursor/mcp.json`):
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"mcpServers": {
|
|
131
|
+
"hwp": {
|
|
132
|
+
"command": "uvx",
|
|
133
|
+
"args": ["hwp-edit-mcp"]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## VS Code
|
|
140
|
+
|
|
141
|
+
프로젝트 `.vscode/mcp.json`:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"servers": {
|
|
146
|
+
"hwp": {
|
|
147
|
+
"command": "uvx",
|
|
148
|
+
"args": ["hwp-edit-mcp"]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 검증 결과
|
|
157
|
+
|
|
158
|
+
시나리오: `hwp_info` → `hwp_fill_cells`(라벨 "성명") → `hwp_get_text`로 확인 → `hwp_history` → `hwp_restore` → `hwp_get_text`로 원상 복구 확인. 끝난 뒤 문서 해시가 원본과 같고 스냅샷이 2개 생겼는지로 판정했습니다. (Windows 11, 샘플 `tests/fixtures/sample_form.hwp`)
|
|
159
|
+
|
|
160
|
+
| 에이전트 | 버전 | 날짜 | 결과 |
|
|
161
|
+
| :--- | :--- | :--- | :--- |
|
|
162
|
+
| Claude Code | 2.1.326 | 2026-11-17 | 통과 |
|
|
163
|
+
| Codex | 0.169.0 | 2026-11-17 | 통과 (`default_tools_approval_mode = "approve"` 필요) |
|
|
164
|
+
| Grok CLI | 1.0.88 | 2026-11-17 | 통과 |
|
|
165
|
+
| Antigravity (AGY) | 1.5.10 | 2026-11-17 | 통과 |
|
|
166
|
+
| Gemini CLI | 0.68.0 | 2026-11-17 | 통과 |
|
|
167
|
+
| OpenCode | 2.3.0 | 2026-11-17 | 통과 |
|
|
168
|
+
| Claude Desktop | — | — | 검증 예정 |
|
|
169
|
+
| Cursor | — | — | 검증 예정 |
|
|
170
|
+
| VS Code | — | — | 검증 예정 |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 트러블슈팅
|
|
2
|
+
|
|
3
|
+
| 증상 | 원인 | 해결 |
|
|
4
|
+
| :--- | :--- | :--- |
|
|
5
|
+
| `rhwp` 내려받기 실패 또는 오프라인 환경에서 기동 불가 | 네트워크 차단, 프록시, GitHub 릴리스 접근 실패 | 미리 받은 `rhwp` 경로를 `RHWP_EXE`(또는 `--rhwp-path`)로 지정하고, 자동 다운로드를 끄려면 `HWP_EDIT_NO_DOWNLOAD=1`을 설정합니다. |
|
|
6
|
+
| Codex에서 `MCP tool call requires approval, but approval policy is never` | Codex는 쓰기 도구(`destructiveHint`)에 승인을 요구하는데, `codex exec` 등 승인 창이 없는 실행이라 거부됨 | `[mcp_servers.hwp]`에 `default_tools_approval_mode = "approve"`를 추가합니다. |
|
|
7
|
+
| Windows에서 `"Connection closed"` 오류 | `uvx` 캐시·경로 문제로 서버가 뜨기 전에 stdio가 닫힘 | 터미널에서 `uvx hwp-edit-mcp install-rhwp`를 먼저 실행해 바이너리를 캐시에 받아 둔 뒤 에이전트를 다시 시작합니다. `HWP_EDIT_LOG_FILE`로 로그 경로를 지정해 stderr 원인을 확인합니다. |
|
|
8
|
+
| 에이전트에서 기동/도구 호출 시간 초과(timeout) | 대용량 문서 처리 또는 초기 `rhwp` 다운로드 시간 초과 | `uvx hwp-edit-mcp install-rhwp`를 사전 실행하고, Codex·Grok CLI 등에서는 `startup_timeout_sec = 30`, `tool_timeout_sec = 60` 이상으로 설정합니다. |
|
|
9
|
+
| `HashConflictError` 발생 | 서버가 문서를 읽은 뒤 한컴오피스 등 외부 편집기에서 파일이 저장되어 SHA-256 해시가 달라짐 | `hwp_info`나 `hwp_get_text`로 최신 문서를 다시 읽은 뒤 수정합니다. 외부 변경을 덮어써야 할 때만 `force=True`를 전달합니다. |
|
|
10
|
+
| `PermissionError` (허용 폴더 밖 경로) | `--root` 또는 `HWP_EDIT_ROOTS`로 지정한 허용 폴더 바깥의 파일에 접근함 | 허용된 폴더 안의 파일만 사용하거나, 서버 실행 인자에 `--root <폴더>`(또는 `HWP_EDIT_ROOTS`)를 추가합니다. |
|
|
11
|
+
| `FileLockedError` 발생 | 한컴오피스 등 다른 프로그램이 대상 파일을 잠그고 있어 `os.replace`가 실패함 | 열려 있는 편집기에서 해당 문서를 닫은 뒤 다시 실행합니다. 실패 직전 원본은 `.hwp-mcp-history` 스냅샷으로 보존되어 있습니다. |
|
|
12
|
+
| 응답이 잘림 (`truncated` 표시) | 도구 출력이 `max_chars`(기본 `20000`, `HWP_EDIT_MAX_CHARS`)를 초과함 | `hwp_get_text`에서는 `page`나 `max_chars`를 지정해 나누어 읽고, `hwp_table_view`에서는 `table_index`로 필요한 표만 조회합니다. 필요 시 `HWP_EDIT_MAX_CHARS` 값을 높입니다. |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "hwp-edit-mcp"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "Safe HWP/HWPX editing MCP server for AI agents: hash-checked, snapshot-backed, verified writes (rhwp engine)"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
8
|
+
authors = [{ name = "Myeongsu Park" }]
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
dependencies = ["mcp>=1.10,<2"]
|
|
11
|
+
keywords = ["mcp", "hwp", "hwpx", "hangul", "rhwp", "korean", "document"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
"Natural Language :: Korean",
|
|
16
|
+
"Topic :: Office/Business :: Office Suites",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Homepage = "https://github.com/myeongsu-dev/hwp-edit-mcp"
|
|
21
|
+
Issues = "https://github.com/myeongsu-dev/hwp-edit-mcp/issues"
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
hwp-edit-mcp = "hwp_edit_mcp.__main__:main"
|
|
25
|
+
|
|
26
|
+
[dependency-groups]
|
|
27
|
+
dev = ["pytest>=7.3", "olefile>=0.46"]
|
|
28
|
+
|
|
29
|
+
[build-system]
|
|
30
|
+
requires = ["hatchling>=1.26"]
|
|
31
|
+
build-backend = "hatchling.build"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.version]
|
|
34
|
+
path = "src/hwp_edit_mcp/__init__.py"
|
|
35
|
+
|
|
36
|
+
[tool.pytest.ini_options]
|
|
37
|
+
testpaths = ["tests"]
|