feat: deploy jarca ledger network mcp service

- add Docker deployment for independent jarca-ledger container
- enable FastMCP streamable-http runtime configuration
- document dcy-013, REQ-019, and BAT-015 verification evidence
- update structure/runtime baselines and deployment runbook
This commit is contained in:
Jarca
2026-07-07 23:04:42 +09:00
parent a7b18c435d
commit 2ccfc9c064
19 changed files with 829 additions and 16 deletions
+17 -6
View File
@@ -4,8 +4,8 @@
- Baseline Seed: `.stage-pilot/bootstrap/baseline.yaml`
- Status: draft
- Owner: Jarca / project maintainer
- Last Updated (KST): 2026-07-03
- Source Discovery / Batch: bootstrap-baseline, BAT-006, BAT-007, BAT-010, BAT-012, BAT-013, BAT-014
- Last Updated (KST): 2026-07-07
- Source Discovery / Batch: bootstrap-baseline, BAT-006, BAT-007, BAT-010, BAT-012, BAT-013, BAT-014, dcy-013/BAT-015
## Project Summary
- Jarca 가계부 전용 MCP 서버와 Streamlit 대시보드로 계좌/카드 거래, 예산, 분류 규칙, import, 자산/스냅샷, 현금흐름 분석을 SQLite에 저장하고 운영한다.
@@ -15,7 +15,7 @@
## Tech Stack
- Python >=3.11
- FastMCP / MCP server
- FastMCP / MCP server (stdio and streamable-http)
- SQLite
- Streamlit
- pandas / plotly
@@ -26,7 +26,8 @@
## Primary Runtime
- Type: mixed
- Planned Entry Points:
- `jarca-ledger-mcp` :: MCP stdio server for Hermes Agent tools.
- `jarca-ledger-mcp` :: MCP stdio server for local Hermes Agent tools and streamable-http server when configured by env.
- `jarca-ledger` Docker container :: independent Streamable HTTP MCP service on `:8000/mcp`.
- `dashboard/app.py` :: Streamlit dashboard for local ledger operations.
- `pytest` :: Regression test entry point.
@@ -43,6 +44,9 @@
```text
jarca-ledger-mcp/
├── README.md
├── Dockerfile
├── docker-compose.yml
├── .dockerignore
├── pyproject.toml
├── uv.lock
├── .env.example
@@ -104,6 +108,7 @@ jarca-ledger-mcp/
│ ├── contract_snapshots/
│ │ └── response_contract_v1_0.json
│ ├── test_contract_regression.py
│ ├── test_mcp_http_runtime.py
│ ├── test_dashboard_app.py
│ ├── test_service.py
│ ├── test_asset_snapshots.py
@@ -125,6 +130,7 @@ jarca-ledger-mcp/
│ ├── srs/
│ ├── batches/
│ ├── runbooks/
│ │ └── docker-network-mcp-deploy.md
│ ├── releases/
│ ├── project-structure.md
│ ├── runtime-flows.md
@@ -174,7 +180,7 @@ jarca-ledger-mcp/
- `jarca_ledger_mcp/adapters/mcp/tool_contracts.py`
- Narrow MCP adapter contract surface that re-exports only the public tool callables consumed by the FastMCP server.
- `jarca_ledger_mcp/adapters/mcp/server.py`
- FastMCP tool registration layer that depends on `tool_contracts.py` instead of broad direct service imports.
- FastMCP tool registration layer that depends on `tool_contracts.py` instead of broad direct service imports. Runtime transport is configurable: stdio by default, or streamable-http through `JARCA_MCP_TRANSPORT=streamable-http` with host/port/path env settings.
- `jarca_ledger_mcp/adapters/streamlit/service_gateway.py`
- Compatibility aggregator over page/domain gateway modules.
- `jarca_ledger_mcp/adapters/streamlit/*_gateway.py`
@@ -197,6 +203,10 @@ jarca-ledger-mcp/
- Local browser evidence helper using synthetic/validation DBs only.
- `scripts/ledger_restore_smoke.py`
- Script-only restore smoke helper; restore remains outside the MCP tool surface.
- `Dockerfile` / `docker-compose.yml`
- Build and run the independent `jarca-ledger` Docker service. Compose fixes `container_name=jarca-ledger`, `restart=unless-stopped`, port `8000:8000`, and bind mount `/volume1/docker/jarca-ledger/data:/data`.
- `docs/runbooks/docker-network-mcp-deploy.md`
- Operator runbook for building, starting, and verifying the Docker Streamable HTTP MCP deployment and DB path.
## Dependency Rules
- `adapters/mcp/server.py` should remain a thin tool adapter and delegate business logic to `service.py` facade/application modules.
@@ -216,7 +226,7 @@ jarca-ledger-mcp/
## Current Gaps / Planned Changes
- Application modules are now separated by phase-0~3 domain seams, but deeper repository/use-case split remains future Phase 4+ work.
- Streamlit now uses page/domain gateways; deeper presenter/view-model extraction remains future work.
- HTTP adapter and remote ops re-architecture remain out of scope.
- Network MCP over FastMCP streamable-http is now available for internal Synology operation; broader HTTP/REST business API, external exposure, reverse proxy/TLS/auth, and remote ops re-architecture remain future work.
## Update Triggers
- Update this document when package boundaries change.
@@ -231,3 +241,4 @@ jarca-ledger-mcp/
- 2026-06-30 KST: REQ-007/REQ-008/BAT-007 기준으로 MCP response contract snapshot/test 위치와 required-check job 계약 추가.
- 2026-07-03 KST: REQ-013/REQ-014/BAT-010 기준으로 application / infrastructure / adapter layering, compatibility facade/shim, Streamlit gateway 구조를 반영했다.
- 2026-07-03 KST: REQ-016/REQ-017/REQ-018 및 BAT-012/BAT-013/BAT-014 기준으로 import/advanced owning services, parser seam, MCP contract helper, page/domain Streamlit gateways를 반영했다.
- 2026-07-07 KST: REQ-019/BAT-015 기준으로 Dockerfile/compose, `jarca-ledger` independent container, streamable-http MCP endpoint, Synology volume `/volume1/docker/jarca-ledger/data`, and Docker deployment runbook을 반영했다.