# Daftar Fitur MCP — Sewapedia

Dokumen referensi lengkap semua tool MCP (Model Context Protocol) yang di-host Sewapedia. Sumber kanonik: `src/lib/mcp/tools.ts` (consumer) dan `src/lib/mcp/owner-tools.ts` (owner).

**Endpoint & manifest:**

| MCP | Endpoint | Manifest |
|-----|----------|----------|
| Consumer (penyewa) | `/api/v1/mcp` | `/.well-known/mcp` |
| Owner (pemilik aset) | `/api/v1/mcp-owner` | `/.well-known/mcp-owner` |

**Legenda akses:**

| Label | Arti |
|-------|------|
| **Publik** | Tidak perlu `Authorization: Bearer` atau `X-Api-Key` |
| **Auth** | Wajib JWT Bearer atau API key scoped |
| **Scope** | Scope API key yang diperlukan (jika ada) |

**Dokumen terkait:** [`mcp-agent-guide.md`](https://sewapedia.id/mcp-agent-guide.md) · [`mcp-owner-guide.md`](https://sewapedia.id/mcp-owner-guide.md) · [`llms.txt`](https://sewapedia.id/llms.txt) · [`/.well-known/mcp`](https://sewapedia.id/.well-known/mcp)

---

## 1. Consumer MCP

**Transport:** `streamable-http`  
**Role default:** `CUSTOMER` (penyewa)  
**Total:** 69 tool (24 publik · 45 auth)

### Discovery

Pencarian katalog, ketersediaan, dan harga — tanpa login.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `search_assets` | Cari aset di katalog (discovery saja, tanpa jaminan tanggal) | Publik | — |
| `check_availability` | Cek ketersediaan kalender aset untuk rentang tanggal (from/to ISO) | Publik | — |
| `pricing_quote` | Hitung quote harga untuk aset dan tanggal sewa | Publik | — |
| `catalog_feed` | Feed discovery katalog terpaginasi (bulk) | Publik | — |
| `get_asset_detail` | Detail publik aset berdasarkan slug | Publik | — |
| `list_categories` | Daftar semua kategori katalog | Publik | — |
| `get_vendor` | Halaman storefront publik vendor berdasarkan slug | Publik | — |
| `get_category_requirements` | Persyaratan verifikasi per kategori (KTP, SIM, dll.) | Publik | — |

### Auth

Registrasi, login, dan manajemen kredensial.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `register_account` | Daftar akun penyewa (CUSTOMER) baru; rate limit 5/jam per IP | Publik | — |
| `login` | Login Method B: email/password → accessToken + refreshToken | Publik | — |
| `create_login_link` | Login Method A (disarankan): OAuth device flow tanpa password di agent | Publik | — |
| `get_login_status` | Poll device authorization; dapat apiKey.secret sekali (90 hari) | Publik | — |
| `refresh_token` | Refresh JWT access token; rate limited | Publik | — |
| `logout` | Revoke refresh token dan API key perangkat terkait | Publik | — |
| `forgot_password` | Minta email reset password | Publik | — |
| `reset_password` | Reset password via token email | Publik | — |
| `activate_vendor` | Upgrade CUSTOMER → pemilik aset (VENDOR, PENDING approval) | Auth | — |
| `manage_api_keys` | List, create, delete, rotate API key scoped; **JWT only** | Auth | — |

### Booking

Siklus sewa penyewa — buat, baca, ubah, batalkan.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `list_my_bookings` | Daftar booking penyewa (paginated) | Auth | `read:booking` |
| `get_booking_detail` | Detail booking untuk penyewa | Auth | `read:booking` |
| `booking_readiness` | Status booking, nextActions, blockers untuk AI agent | Auth | `read:booking` |
| `get_active_booking` | Booking aktif/pending untuk banner home | Auth | `read:booking` |
| `create_booking` | Buat permintaan sewa baru | Auth | `write:booking` |
| `promote_booking` | Promosikan booking PENDING_VERIFICATION ke inbox pemilik | Auth | `write:booking` |
| `cancel_booking` | Batalkan booking sebagai penyewa | Auth | `write:booking` |
| `request_extension` | Ajukan perpanjangan sewa saat booking ACTIVE | Auth | `write:booking` |
| `list_booking_extensions` | Daftar permintaan perpanjangan untuk satu booking | Auth | `read:booking` |
| `respond_counter_offer` | Terima/tolak counter-offer dari pemilik | Auth | `write:booking` |
| `update_booking_collateral` | Update item jaminan/kolateral booking | Auth | `write:booking` |
| `manage_booking_condition` | Submit laporan kondisi check-in/out atau acknowledge check-in | Auth | `read:booking`, `write:booking` |
| `manage_booking_incidents` | List, laporkan, acknowledge, atau resolve insiden booking | Auth | `read:booking`, `write:booking` |
| `manage_booking_dispute` | Lihat atau buka dispute booking | Auth | `read:booking`, `write:booking` |

### Payment

Pembayaran Midtrans, kredit akun, dan bukti transfer offline.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `initiate_payment` | Inisiasi pembayaran Midtrans (redirectUrl — human checkout) | Auth | `write:payment` |
| `apply_credit` | Terapkan saldo kredit akun ke booking PENDING_PAYMENT | Auth | `write:payment` |
| `get_pay_status` | Sync/poll status pembayaran Midtrans per order | Auth | `read:booking` |
| `report_offline_payment` | Laporkan transfer bank offline dengan proof key | Auth | `write:payment` |
| `get_payment_options` | Opsi kanal pembayaran untuk booking | Auth | `read:booking` |
| `get_payment_invoice` | Invoice JSON untuk satu pembayaran booking | Auth | `read:booking` |

### Trust

Verifikasi identitas, dokumen, dan profil kepercayaan.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `get_trust_profile` | Profil trust: tanpa userId = milik sendiri (auth); dengan userId = publik | Publik* | — |
| `get_verification_status` | Status verifikasi user dan dokumen yang dibutuhkan | Auth | — |
| `upload_document` | Upload dokumen verifikasi (base64): KTP, SELFIE, SIM, dll. | Auth | `write:booking` |
| `assess_risk` | Preview penilaian risiko dan deposit sebelum booking | Auth | — |
| `verify_phone_otp` | Kirim atau verifikasi OTP nomor telepon | Auth | — |

\* `get_trust_profile` terdaftar publik; profil sendiri memerlukan auth jika `userId` dihilangkan.

### Reviews

Ulasan pasca-sewa.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `list_reviews` | Daftar review untuk booking + apakah user bisa review | Auth | `read:booking` |
| `submit_review` | Kirim review setelah sewa selesai | Auth | `write:booking` |

### Notifications

Notifikasi in-app dan push.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `list_notifications` | Daftar notifikasi in-app user | Auth | — |
| `mark_notification_read` | Tandai satu atau semua notifikasi sudah dibaca | Auth | — |
| `manage_push_subscription` | Get, subscribe, atau unsubscribe push web/expo | Auth | — |

### UCP

Universal Commerce Protocol — discovery produk, quote, checkout, webhook.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `ucp_discover` | Ambil manifest merchant UCP dari `/.well-known/ucp` | Publik | — |
| `ucp_products` | Discovery produk UCP (search atau feed) | Publik | — |
| `ucp_product` | Lookup satu produk UCP berdasarkan slug | Publik | — |
| `ucp_availability` | Ketersediaan produk UCP untuk rentang tanggal | Publik | — |
| `ucp_quote` | Quote harga UCP (productId = assetId); opsional kupon | Publik | — |
| `ucp_checkout` | Alur checkout UCP: create session, status, atau complete | Auth | `read:booking`, `write:booking`, `write:payment` |
| `ucp_checkout_create` | Buat sesi checkout UCP (booking) | Auth | `write:booking` |
| `ucp_checkout_status` | Status sesi checkout + fulfillment + gate verifikasi | Auth | `read:booking` |
| `ucp_checkout_complete` | Selesaikan checkout (promote atau initiate_payment) | Auth | `write:booking`, `write:payment` |
| `ucp_webhook_register` | Daftar webhook callback status order UCP | Auth | `write:booking` |
| `list_ucp_webhooks` | Daftar webhook UCP terdaftar | Auth | `write:booking` |

### Account

Profil dan saldo akun penyewa.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `get_profile` | Profil user terautentikasi | Auth | — |
| `update_profile` | Update profil (nama, locale, avatar, alamat, dll.) | Auth | — |
| `change_password` | Ganti password; **JWT only** | Auth | — |
| `get_account_credit` | Saldo kredit akun dan ledger terbaru | Auth | — |

### Chat

Percakapan booking dan inquiry pra-booking.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `manage_asset_inquiry` | List atau kirim pesan inquiry pra-booking (guest atau login) | Publik | — |
| `manage_booking_chat` | List atau kirim pesan chat booking | Auth | `read:booking`, `write:booking` |
| `list_conversations` | Daftar percakapan booking + inquiry | Auth | — |
| `manage_inquiry_thread` | List atau kirim pesan di thread inquiry; auth atau guestToken | Auth | — |

### Webhooks

Webhook partner agent.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `manage_agent_webhooks` | List atau daftar webhook partner agent; register butuh JWT | Auth | — |

### Platform

Kesehatan sistem.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `health_check` | Health check platform; opsional `deep=true` untuk probe DB/Redis | Publik | — |

---

## 2. Owner MCP

**Transport:** `streamable-http`  
**Role wajib:** `VENDOR` (pemilik aset)  
**Total:** 62 tool (5 publik · 57 auth)

### Auth

Registrasi vendor dan login pemilik.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `register_vendor_account` | Daftar pemilik aset (VENDOR, PENDING) sekaligus; rate limit 5/jam per IP | Publik | — |
| `owner_login` | Login Method B: email/password vendor → accessToken | Publik | — |
| `create_login_link` | Login Method A (disarankan): device flow VENDOR tanpa password di agent | Publik | — |
| `get_login_status` | Poll device authorization; apiKey scoped owner (90 hari) | Publik | — |

### Booking

Kelola permintaan sewa, counter-offer, dokumen penyewa, dan insiden.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `list_owner_requests` | Booking menunggu persetujuan pemilik (PENDING_OWNER_APPROVAL) | Auth | `read:owner` |
| `list_owner_bookings` | Daftar booking vendor (filter: all/pending/active/completed/cancelled) | Auth | `read:owner` |
| `get_owner_booking_detail` | Detail lengkap booking untuk keputusan vendor | Auth | `read:owner` |
| `approve_booking` | Setujui permintaan booking pending | Auth | `write:owner` |
| `reject_booking` | Tolak booking dengan alasan | Auth | `write:owner` |
| `create_counter_offer` | Kirim counter-offer (harga, tanggal, syarat) | Auth | `write:owner` |
| `review_renter_documents` | Lihat atau approve/reject dokumen KTP/selfie penyewa | Auth | `read:owner`, `write:owner` |
| `respond_extension` | Terima/tolak permintaan perpanjangan sewa | Auth | `write:owner` |
| `confirm_offline_payment` | Konfirmasi atau tolak bukti transfer offline penyewa | Auth | `write:owner` |
| `get_renter_snapshot` | Snapshot profil trust penyewa untuk permintaan pending | Auth | `read:owner` |
| `manage_booking_condition` | Submit laporan kondisi check-in/out (konteks pemilik) | Auth | `read:owner`, `write:owner` |
| `manage_booking_incidents` | Insiden booking: list, laporkan, acknowledge, resolve | Auth | `read:owner`, `write:owner` |
| `manage_booking_dispute` | Dispute booking: get atau open | Auth | `read:owner`, `write:owner` |

### Catalog

Manajemen aset, harga, dan aturan sewa.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `list_my_assets` | Daftar aset milik vendor (default limit 100) | Auth | `read:owner` |
| `create_asset` | Buat aset sewa baru (pricing, spesifikasi, gambar base64/URL) | Auth | `write:owner` |
| `get_owner_asset_detail` | Detail lengkap aset untuk editing vendor | Auth | `read:owner` |
| `update_asset` | Patch section aset (pricing, requirements, kategori, dll.) | Auth | `write:owner` |
| `delete_asset` | Soft-delete aset (status INACTIVE, unfeatured) | Auth | `write:owner` |
| `upload_asset_image` | Upload atau attach gambar ke aset (max 5 per aset) | Auth | `write:owner` |
| `delete_asset_image` | Hapus gambar aset berdasarkan imageId | Auth | `write:owner` |
| `get_pricing_recommendation` | Rekomendasi harga AI untuk satu aset | Auth | `read:owner` |
| `manage_blackout` | Kelola tanggal blackout: list, create, delete | Auth | `read:owner`, `write:owner` |
| `manage_maintenance` | Catatan maintenance aset: list, create | Auth | `read:owner`, `write:owner` |
| `manage_duration_rules` | Aturan durasi sewa vendor: get atau update | Auth | `read:owner`, `write:owner` |

### Calendar

Kalender operasional vendor.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `get_owner_calendar` | Kalender vendor (blackout, booking, maintenance) | Auth | `read:owner` |

### Finance

Keuangan vendor — ledger, P&L, pajak, OpEx, perbaikan.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `get_finance_summary` | Ringkasan dashboard keuangan (revenue, opex, P&L) | Auth | `read:owner` |
| `list_finance_entries` | Daftar entri ledger dengan filter opsional | Auth | `read:owner` |
| `create_finance_entry` | Buat entri ledger manual (income/expense) | Auth | `write:owner` |
| `get_finance_entry` | Detail satu entri ledger berdasarkan id | Auth | `read:owner` |
| `update_finance_entry` | Patch entri ledger | Auth | `write:owner` |
| `delete_finance_entry` | Void entri ledger | Auth | `write:owner` |
| `duplicate_finance_entry` | Duplikasi entri ledger | Auth | `write:owner` |
| `get_finance_pnl` | Laporan laba rugi vendor | Auth | `read:owner` |
| `get_finance_categories` | Daftar slug kategori keuangan | Auth | `read:owner` |
| `export_finance_csv` | Export ledger ke CSV | Auth | `read:owner` |
| `manage_finance_tax` | Profil pajak, deadline, export | Auth | `read:owner`, `write:owner` |
| `manage_acquisitions` | Akuisisi aset: list, create, confirm | Auth | `read:owner`, `write:owner` |
| `manage_opex_recurring` | Template OpEx berulang: list, create | Auth | `read:owner`, `write:owner` |
| `manage_opex_checklist` | Checklist OpEx bulanan | Auth | `read:owner` |
| `opex_quick_add` | Quick-add entri OpEx | Auth | `write:owner` |
| `get_portfolio_pricing` | Alert harga portofolio aset | Auth | `read:owner` |
| `get_asset_finance` | Ringkasan keuangan per aset | Auth | `read:owner` |
| `manage_repair_expenses` | Biaya perbaikan: list, create, prefill, confirm | Auth | `read:owner`, `write:owner` |

### Payout

Pencairan dan komisi platform.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `list_owner_payouts` | Riwayat payout vendor | Auth | `read:owner` |
| `manage_payout_bank` | Lihat atau update rekening bank payout | Auth | `read:owner`, `write:owner` |
| `manage_owner_commissions` | Daftar kewajiban komisi platform | Auth | `read:owner` |
| `upload_commission_proof` | Upload bukti pembayaran komisi | Auth | `write:owner` |

### Storefront

Branding dan halaman toko vendor.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `get_storefront` | Pengaturan branding dan slug storefront | Auth | `read:owner` |
| `update_storefront` | Update branding (tagline, warna, layout preset) | Auth | `write:owner` |
| `manage_storefront_slug` | Username storefront: update atau cek ketersediaan | Auth | `read:owner`, `write:owner` |
| `get_vendor_theme_presets` | Daftar preset warna tema vendor | Publik | — |
| `update_vendor_type` | Ubah tipe vendor INDIVIDUAL atau COMPANY | Auth | `write:owner` |

### Analytics

Metrik bisnis dan performa.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `get_owner_analytics` | Ringkasan dashboard analytics vendor | Auth | `read:owner` |
| `get_seo_listings` | Performa SEO listing pemilik | Auth | `read:owner` |
| `get_chat_metrics` | Metrik waktu respons chat pemilik | Auth | `read:owner` |

### Chat

Percakapan booking (konteks pemilik).

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `manage_booking_chat` | List atau kirim pesan chat booking (konteks owner) | Auth | `read:owner`, `write:owner` |
| `list_conversations` | Daftar percakapan booking + inquiry (konteks owner) | Auth | `read:owner` |

### Platform

Feedback ke platform.

| Tool | Deskripsi (ID) | Akses | Scope |
|------|----------------|-------|-------|
| `manage_owner_feedback` | Feedback platform: list atau submit | Auth | `read:owner`, `write:owner` |

---

## 3. Ringkasan Jumlah Tool

| MCP | Publik | Auth | **Total** |
|-----|--------|------|-----------|
| Consumer (`/.well-known/mcp`) | 24 | 45 | **69** |
| Owner (`/.well-known/mcp-owner`) | 5 | 57 | **62** |
| **Gabungan** | **29** | **102** | **131** |

### Scope API key

| MCP | Scope tersedia |
|-----|----------------|
| Consumer | `read:catalog`, `read:booking`, `write:booking`, `write:payment` |
| Owner | `read:owner`, `write:owner` |

### Autentikasi yang disarankan

| Metode | Consumer tool | Owner tool |
|--------|---------------|------------|
| Device flow (disarankan) | `create_login_link` → `get_login_status` | `create_login_link` → `get_login_status` |
| Password di agent | `login` | `owner_login` |
| API key | Header `X-Api-Key` | Header `X-Api-Key` |

---

## 4. Catatan Implementasi

- Daftar tool di atas di-generate dari registry kanonik `MCP_TOOL_DEFINITIONS` dan `MCP_OWNER_TOOL_DEFINITIONS`.
- Manifest live: `GET /.well-known/mcp` dan `GET /.well-known/mcp-owner` (tanpa secret).
- Pembayaran Midtrans tetap **human-in-the-loop** — agent mengembalikan `redirectUrl`, user menyelesaikan checkout di browser.
- Tool `manage_api_keys` dan `change_password` hanya via JWT, bukan API key.
- Registrasi pemilik langsung: owner MCP `register_vendor_account`; alternatif: consumer `register_account` + `activate_vendor`.

*Terakhir diverifikasi dari source: September 2026.*
