Skip to content

feat: MCP Server + CLI fixes + Web UI data binding + all flows verified#1

Merged
killernay merged 4 commits intomainfrom
dev
Mar 16, 2026
Merged

feat: MCP Server + CLI fixes + Web UI data binding + all flows verified#1
killernay merged 4 commits intomainfrom
dev

Conversation

@killernay
Copy link
Owner

Summary

  • MCP Server — 53 tools ครบทุก module (list + create + action + report)
  • CLI — แก้ทุก command (response shape, API paths, auth TTY detection)
  • Web UI — null safety, status mapping (void→voided), BigInt guards
  • Invoice void — รองรับ posted status (ไม่ใช่แค่ draft)
  • 63 business flows ทดสอบผ่านหมด

Test Results

Channel Status
API 33/33 modules ✓
Web UI 33/33 pages ✓
CLI 33/33 commands ✓
MCP 53 tools ✓
Status Transitions 63/63 flows ✓

Flows Verified

  • Quotation: create→send→approve→convert→Invoice
  • Sales Order: create→confirm
  • Delivery Note: create→deliver
  • Invoice: create→post→void, post→payment
  • Bill: create→post→pay, post→void
  • Purchase Order: create→send→receive→convert-to-bill
  • Receipt: create→void
  • Credit Note: create→issue
  • Journal Entry: create→post→reverse, closed period blocked
  • Employee: hire→edit→resign→anonymize (PDPA)
  • Payroll: create→calculate→approve→pay
  • Leave: type→request→approve/reject
  • Month-End: close→JE blocked→reopen
  • Fixed Asset: create→depreciate

Files Changed

  • apps/mcp/ — new MCP Server package (53 tools)
  • apps/cli/src/commands/ — fixed 11 command files
  • apps/web/src/app/(protected)/ — fixed 16 page files
  • apps/api/src/routes/ar/invoices.ts — void accepts posted status
  • CHANGELOG.md — v0.2.0 + v0.3.0

🤖 Generated with Claude Code

killernay and others added 4 commits March 16, 2026 17:27
v0.2.0:
- MCP Server with 13 tools for AI integration
- Web UI: null safety, status mapping, auth hydration fix
- Sidebar: SAP-style grouped menus
- Rate limiter: 10K/min in dev
- CLI paths fixed (removed wrong ar/ap/gl prefixes)
- Architecture diagram + test plan doc
- CHANGELOG.md added

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CLI fixes:
- Fixed auth login for piped stdin (TTY detection)
- Fixed invoice/payment/bill response shape (items/total vs data/page)
- Fixed tax/roles/webhooks flat array response
- Fixed settings unwrapping
- All 34 CLI commands tested passing

MCP expanded to 53 tools:
- 24 list tools (all modules)
- 7 create tools (invoice, JE, quotation, SO, bill, PO, contact, product, employee)
- 5 action tools (post/void invoice, post bill, close period, month-end)
- 5 report tools (IS, BS, budget variance, AR/AP aging)

CHANGELOG updated, version bumped to 0.3.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixed: Invoice void now accepts posted status (was only draft/sent)

All 14 business flows tested via curl — 63/63 PASS:
- Quotation: create→send→approve→convert, reject, duplicate
- Sales Order: create→confirm
- Delivery Note: create→deliver
- Invoice: create→post→void, post→payment
- Bill: create→post→pay, post→void
- Purchase Order: create→send→receive→convert-to-bill
- Receipt: create→void
- Credit Note: create→issue
- Journal Entry: create→post→reverse, closed period blocked
- Employee: hire→edit→resign→anonymize (PDPA)
- Payroll: create→calculate→approve→pay
- Leave: type→request→approve/reject
- Month-End: close→JE blocked→reopen
- Fixed Asset: create→depreciate

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- MCP: split 1,319-line index.ts into 7 modules (api, auth, list, create, action, report)
- CHANGELOG: fixed order (newest first: 0.3.0 → 0.2.0 → 0.1.0)
- test_all_flows.sh: added set -e for fail-fast

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@killernay killernay merged commit fa0abc5 into main Mar 16, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant