v0.5.0 — MCP server (rhwp-mcp)#16
Merged
Merged
Conversation
변경사항: - AGENTS.md async direction 노트에서 LlamaIndex / Haystack 언급 제거, "LangChain (or future RAG framework)" 으로 교체 - roadmap/README.md v0.5.0 ~ v0.6.0 RAG 프레임워크 통합 섹션 삭제, "v0.5.0+ 미정 (demand-driven)" narrative 로 교체 - v0.8.0 ~ v1.0.0 선행 조건을 "v0.6.0 까지 GA" → "v0.5.0+ minor 들 GA" 로 수정 - v0.7.0/mcp.md 에서 LlamaIndex / Haystack 도구 노출 / 통합 패턴 설명을 LangChain 단독 기준으로 정리, last_updated 2026-05-06 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - mcp.md / mcp-research.md 를 v0.7.0 → v0.5.0 으로 이동 (git rename 인식) - spec body sweet-spot 논거 v0.5.0 시점 기준 재서술 (v0.4.0 view + v0.3.0 LangChain 만 의존, RAG wave 보류 명시) - README 활성 spec 인덱스 row + 현재 상태 + 미착수 narrative (v0.5.0+ → v0.6.0+) + v0.8.0 prereq 갱신 - CONVENTIONS Draft 예시 / retrofit narrative 의 동적 spec 인스턴스 참조 제거 (추상 패턴으로 교체) — 정책 SSOT 안정성 회복 - spec-system-overhaul Frozen impl log 의 broken-link 수정만 (v0.7.0 → v0.5.0) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항:
- python/rhwp/mcp/ 패키지 신설 — FastMCP 인스턴스 + 4 sync 도구 (parse_hwp_summary / extract_text / get_ir / iter_blocks), stdio transport, unsendable 안전 패턴 강제
- pyproject.toml [mcp] / [mcp-chunks] extras + rhwp-mcp entry point 추가 (fastmcp>=3,<4)
- tests/test_mcp_server.py 18개 — AC-2/3/4/5/9/10 매핑 (file-level importorskip("fastmcp"))
- CI test-without-extras skip count 4→5, pyright 대상에 test_mcp_server.py 추가
- spec ADR § 1 갱신 (Draft in-place): 공식 mcp SDK → standalone fastmcp v3 — 2026-05 현업 표준 (시장 점유 약 70%) + v3 의 OAuth / OpenTelemetry / server composition 기능
- docs-lint 정책 갱신: Frozen + target 조합을 docs/implementation/vX.Y.Z/ pre-GA stage log 에 한해 허용 — Rust RFC / PEP / ADR 의 editorial vs release 차원 분리 패턴 정합
- AGENTS.md / CLAUDE.md gated file 카운트 4→5
- docs/implementation/v0.5.0/stages/stage-1.md (Frozen+target) 신설
- coverage trace 자동 갱신 (7 AC 매핑 추가)
- 의존성 업데이트 (fastmcp>=3,<4 트리)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - python/rhwp/mcp/tools.py 에 to_markdown / to_html 추가 — v0.4.0 view API thin wrapper (byte-equality 보장) - python/rhwp/mcp/server.py build_server() 가 6 도구 등록 (S1 코어 4 + S2 view 2) - tests/test_mcp_server.py: TestToMarkdown / TestToHtml 신설 (AC-6 매핑), test_lists_exactly_six_tools 로 rename - docs/implementation/v0.5.0/stages/stage-2.md 작성 (Frozen, target v0.5.0) — S2 결정 사항·검증·S3 인계 - docs/traces/coverage.md auto-regen — AC-6 매핑 3 건 추가 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - python/rhwp/mcp/tools.py 에 chunks 추가 — langchain-text-splitters lazy import + ImportError 시 친절 메시지 - python/rhwp/mcp/server.py build_server() 가 7 도구 등록 (mcp.md AC-2 GA 기준 충족) - tests/test_mcp_server.py: TestChunks 신설 (smoke 3 + AC-7 missing-extras 2), test_lists_exactly_seven_tools 로 rename - docs/implementation/v0.5.0/stages/stage-3.md 작성 (Frozen, target v0.5.0) — extras gate 위치·메시지·smoke 게이트 결정 - docs/traces/coverage.md auto-regen — AC-7 매핑 2 건 추가 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - python/rhwp/mcp/tools.py chunks 시그니처에 include_furniture: bool = False 추가 — HwpLoader 동일 의미를 MCP 표면에 노출 (ir-blocks 모드에서만 작동, 다른 모드는 silently 무시) - docs/roadmap/v0.5.0/mcp.md §노출 도구 chunks row 시그니처 갱신 - tests/test_mcp_server.py TestChunks 에 2 테스트 추가 — furniture 청크 yield 검증, 모드별 무시 검증 - docs/traces/coverage.md auto-regen — 새 테스트 2 건 매핑 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… / --port) 변경사항: - python/rhwp/mcp/server.py run() 에 argparse 추가 — --transport stdio | streamable-http, --host, --port 옵션 + stdio 와 명시 host/port 충돌 fail-fast 검증 - tests/test_mcp_server.py TestTransportCli 신설 (10 테스트 — argparse 7 + dispatch mock 2 + slow smoke 1) - docs/implementation/v0.5.0/stages/stage-4.md 작성 (Frozen, target v0.5.0) — argparse 채택 / smoke 게이트 / S5 인계 결정 - docs/traces/coverage.md auto-regen — AC-8 매핑 추가 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - README.md § MCP server (rhwp-mcp) 신설 — 도구 7 종 표 + 설치 / Claude Desktop 등록 JSON / 클라이언트 호환성 표 + streamable-http 사용 예 - examples/06_mcp_server.py 신설 — fastmcp Client in-process round-trip 데모 (7 도구 차례 호출), --skip-chunks 옵션 - examples/README.md § 6 row 추가, [examples] extras 갱신 안내 - pyproject.toml [examples] extras 에 fastmcp>=3,<4 추가 — pip install rhwp-python[examples] 한 줄로 06 까지 실행 가능 - docs/implementation/v0.5.0/stages/stage-5.md 작성 (Frozen, target v0.5.0) — AC-1~AC-11 sweep 11/11 충족 + GA 절차 인계 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - spec / ADR frontmatter status: Draft → Frozen, target → ga: v0.5.0 전환 (mcp.md, mcp-research.md) - 구현 로그 5 파일 (stages/stage-1 ~ stage-5) frontmatter target → ga: v0.5.0 일괄 (post-S1 docs-lint 정책: pre-GA stage 면제 분기 → GA 후 ga 라벨 부여) - roadmap/README.md — 활성 spec 인덱스 v0.5.0 row Status Frozen, 구현 로그 표 v0.5.0 row 추가, 현재 상태 섹션 갱신 (2026-05-06 GA), v0.6.0+ narrative 의 v0.5.0 참조 Draft → Frozen Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - Cargo.toml version 0.4.0 → 0.5.0 (publish.yml verify-version 가드 통과 조건) - CHANGELOG.md [0.5.0] — 2026-05-06 섹션 분리 — Added / Changed / Build / Notes - external/rhwp submodule pin 0fb3e67 유지 (pure Python MCP layer, 상류 변경 0) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
변경사항: - tests/test_mcp_server.py 의 ``import tomllib`` 분기를 ``try/except ModuleNotFoundError`` → ``if sys.version_info >= (3, 11)`` guard 로 교체 - pyright 의 statically-resolved 모듈 검증을 통과 — Python 3.10 venv (tomllib stdlib 부재) 에서도 tomli 폴백을 정확히 보고 - 모듈-레벨 ``import sys`` 추가 (테스트 함수 안 import 와 별도) - 런타임 동작 동일 — pytest>=8 의 transitive ``tomli>=1; python_version<'3.11'`` 가 이미 testing extras 에 가용 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fastmcpv3 기반 (2026-05 현업 표준 — MCP 서버 약 70% 시장 점유)parse_hwp_summary/extract_text/get_ir/iter_blocks/to_markdown/to_html/chunks× stdio (기본, Claude Desktop) + streamable-http (옵션, uvicorn ASGI).unsendable안전 패턴 강제 (sync handler),chunks는langchain-text-splitters런타임 extras gateCargo.toml0.4.0 → 0.5.0, CHANGELOG[0.5.0] — 2026-05-06추가Why
v0.4.0 IR view 렌더러까지 GA 후 LLM 에이전트 표면이 비었음. MCP 가 사실상 표준 프로토콜로 정착하면서 (Claude Desktop / Cursor 등 1st-party 통합) HWP/HWPX 가 LLM 워크플로우에 직접 들어갈 수 있는 진입점이 필요. v0.5.0 시점이 sweet spot — IR / view / chunks 표면이 모두 안정화되어 도구 surface 가 의미 있는 기능을 묶어냄.
ADR § 1 SDK 결정은 처음 공식
mcpSDK 채택으로 출발했다가 S1 진행 중 standalonefastmcpv3 (jlowin) 으로 갱신 — 2026-05 현업 패턴 (시장 점유 약 70% + v3 의 OAuth / OpenTelemetry / server composition / streamable-http 우선 같은 프로덕션 기능). 공식 SDK 의 FastMCP v1 은 frozen 상태라 새 기능 부재. 결정 사항 매트릭스는 docs/design/v0.5.0/mcp-research.md § 1.부수적으로 docs-lint 정책 옵션 A 적용 —
Frozen + target조합을docs/implementation/vX.Y.Z/pre-GA stage log 에 한해 허용 (Rust RFC / PEP / ADR 의 editorial vs release 차원 분리 패턴 정합).주요 변경
python/rhwp/mcp/{__init__.py, __main__.py, server.py, tools.py}(404 lines),tests/test_mcp_server.py(620 lines, 40 테스트),examples/06_mcp_server.py(158 lines)[mcp] = ["fastmcp>=3,<4"],[mcp-chunks],[examples]fastmcp 합집합,rhwp-mcp = "rhwp.mcp:run"entry pointdocs/roadmap/v0.5.0/mcp.md(Frozen, 11 AC),docs/design/v0.5.0/mcp-research.md(Frozen, 4 결정 매트릭스),docs/implementation/v0.5.0/stages/stage-{1..5}.md(Frozen)rhwp-mcp)" 신설, examples/README § 6, roadmap/README v0.5.0 row Frozen, CONVENTIONS § ga/target schema 예외 명시scripts/_doc_lint.pyis_pre_ga_stage면제 분기 추가 — pre-GA stage log 의Frozen + target허용test-without-extrasskip count 4 → 5 (test_mcp_server.pygated byfastmcp), pyright 대상에 추가, AGENTS.md / CLAUDE.md 동기Cargo.toml0.4.0 → 0.5.0, CHANGELOG[0.5.0] — 2026-05-06,external/rhwpsubmodule pin0fb3e67유지 (pure Python layer)Test plan
uv run pytest tests/ -m "not slow"→ 569 passed, 2 skippeduv run pytest tests/test_mcp_server.py(slow 포함) → 40 passeduv run ruff check(S1~S5 변경분) → cleanuv run pyright python/ tests/test_mcp_server.py examples/06_mcp_server.py→ 0 errorsuv run python scripts/lint_docs.py→ exit 0uv run python scripts/generate_spec_trace.py --check→ up to datecode-reviewerfresh-context 검증 (S1, S2, S3, S4 각 stage 후) → BLOCKER 0 / HIGH 모두 반영.mcp.json으로uv run rhwp-mcpstdio 통합, 7 도구 노출 확인pip install rhwp-python[mcp]후 Claude Desktopclaude_desktop_config.json등록 손 검증 (release 후)rhwp-mcp --transport streamable-http --port N컨테이너 배포 손 검증 (release 후)🤖 Generated with Claude Code