
Key Takeaways: The Ferry MCP Server (
@ferryvn/mcp) by Ferry VN JSC exposes live schedules, seat maps, fares, and booking lookups across 15+ Vietnamese ferry operators to AI assistants over the Model Context Protocol while keeping ticket issuance and wallet debits permanently inaccessible to autonomous agents.
- Read-Only by Default: 14 read tools, 2 workflow prompts (
plan_ferry_trip,check_booking), and theferry://locationspier resource work out of the box, while 3 write tools appear only whenFERRY_MCP_ENABLE_WRITES=true.- Zero Financial Execution Exposure: Ticket issuance (
confirmToIssue), payments, wallet top-ups, debt ledgers, pricing edits, and API key administration are never exposed to the agent, enforced by automated repository tests.- Six-Layer Runtime Guardrails: Every opt-in write requires explicit human confirmation, respects a per-process write budget (
FERRY_MCP_MAX_WRITES, default 20), rejects unknown arguments strictly, and writes PII-free JSONL audit trails.- Flexible Stdio & Hardened HTTP Deployment: Install via
.mcpbin Claude Desktop,npx -y @ferryvn/mcpin Claude Code, or containerized--httpmode with DNS-rebinding guards and bearer token auth.
Deploying a ferry MCP server lets travel agencies, Destination Management Companies (DMCs), and Online Travel Agencies (OTAs) turn complex multi-operator island itineraries into natural-language workflows without handing Large Language Models (LLMs) direct control over partner wallets. Bookers and AI planners query live timetables, cabin layouts, and harbor fees across 15+ carriers through one standardized protocol.
Exposing raw booking REST endpoints directly to an AI agent creates severe financial and privacy risk: a hallucinated loop can create duplicate orders, trigger real wallet deductions, or leak passenger passport numbers. This technical guide breaks down @ferryvn/mcp's tool surface, six-layer safety model, stdio versus remote HTTP hardening, and zero-cost uatexpress UAT testing workflow.
Why Travel AI Agents Need Hard Financial Boundaries
Ferry VN partner API keys hold organization-level authority, including non-idempotent booking creation and irreversible VND NET wallet debits at ticket confirmation. Wrapping raw REST endpoints directly into LLM function calls collapses itinerary discovery and financial settlement into one unconstrained blast radius.
@ferryvn/mcp enforces that separation architecturally using the open Model Context Protocol. AI assistants handle pier matching, timetable comparison, seat-map checks, and VIMAWA manifest quoting while hitting a hard boundary before any money moves, matching the core platform architecture in our Unified Vietnam Ferry API guide.
| Capability Tier | Exposed in @ferryvn/mcp |
Activation Requirement | Financial & Operational Risk Profile |
|---|---|---|---|
| Catalog, Schedule, Seat & Quote Reads | search_locations, list_routes, search_voyages, get_voyage_calendar, get_route_prices, get_seat_map, quote_booking, get_disruptions, list_vouchers |
Enabled by default | Zero financial mutation and zero customer PII exposure |
| Customer & Booking Reads | find_customers, get_booking, list_bookings, list_cancel_requests, get_account |
Enabled by default (hideable via FERRY_MCP_DISABLED_TOOLS) |
Read-only access, contains PII unless explicitly hidden |
| Guarded Draft & Cancel Writes | create_customer, create_booking, request_cancellation |
Opt-in (FERRY_MCP_ENABLE_WRITES=true + human confirmation) |
create_booking stops unpaid in status 2, cancel holds fee |
| Ticketing, Money & Admin Surfaces | Never exposed (confirmToIssue, payments, top-ups, debt ledgers, price rules, webhooks, API keys) |
Permanently blocked and CI-tested | Must execute via Dashboard, @ferryvn/sdk, or @ferryvn/cli |
Inside @ferryvn/mcp: Tools, Prompts, and Resources
@ferryvn/mcp lives inside the ferry-vn/ferry-sdk monorepo on GitHub alongside @ferryvn/sdk and @ferryvn/cli, sharing one version across all three npm packages on the Ferry VN API & SDK platform. Provisioning scoped keys through Ferry VN API partner onboarding lets the server inherit your organization's exact pricing, vouchers, and disruption scope.
Read-Only Discovery, Quoting, and Operations Tools
Every read tool queries live carrier snapshots and seat charts without modifying server state or debiting VND balances:
| Tool / Primitive | Category | Primary Agent Use Case |
|---|---|---|
search_locations, list_routes |
Catalog | Accent-insensitive mainland/island pier matching and operator route lists |
search_voyages, get_voyage_calendar |
Schedules | Daily sailing search and multi-day departure calendar inspection |
get_route_prices, get_seat_map |
Inventory | VAT-inclusive fares by cabin class and real-time vacant seat charts |
quote_booking |
Pre-validation | Local validation of ages, IDs, seats, and harbor fees with exact VND quote |
find_customers, get_booking, list_bookings |
Support | Lookup passenger profiles, booking statuses, and ticket leg details |
list_cancel_requests, get_disruptions |
Exceptions | Monitor cancellation approval chains and weather/technical delays |
get_account, list_vouchers |
Finance Read | Inspect available VND balance, credit limit, and eligible voucher codes |
plan_ferry_trip, check_booking, ferry://locations |
Prompts & Resource | Built-in guided prompt templates and direct pier catalog resource |
Notice how quote_booking mirrors ferry.bookingDrafts.prepare() in @ferryvn/sdk, validating age tiers, sellable seats, and harbor fees without creating orphaned unpaid records.
Opt-In Write Tools and Strict Argument Validation
Write tools stay hidden unless FERRY_MCP_ENABLE_WRITES=true (exact string match), exposing three bounded actions: create_customer (creates a profile under your org), create_booking (submits an unpaid status 2 booking with a payment_expired_at deadline at zero VND charge), and request_cancellation (initiates post-issuance cancellation approval).
Unlike permissive JSON wrappers that drop unrecognized keys, @ferryvn/mcp rejects misspelled or unknown properties strictly. That prevents silent bugs such as dropping a misspelled nationality field and defaulting a foreign passenger to Vietnam's domestic fare tier.
Six-Layer Safety Architecture for Production Agents
Production agent deployments must block prompt-injected writes, runaway booking loops, and passport PII leakage into third-party model logs. @ferryvn/mcp enforces six runtime controls across every session.

- CI-enforced financial exclusion: Automated tests in
ferry-vn/ferry-sdkverify thatconfirmToIssue, payment capture, wallet withdrawals, debt ledgers, pricing rules, and API/webhook admin tools never register. - Mandatory human confirmation per write: Native MCP clients display an itemized confirmation summary (voyages, seats, passenger names, VND total) that the model cannot self-approve, while non-native clients require
user_confirmed: trueafter human approval. - Per-process write budget:
FERRY_MCP_MAX_WRITES(default20) caps writes per running process to stop runaway agent loops. - PII-free JSONL audit logging: Writes emit structured JSON lines to
stderr(and optionalFERRY_MCP_AUDIT_FILE) recording tool names, booking IDs, and passenger counts while omitting names, phones, and passports. - Read-tool suppression for public assistants: Set
FERRY_MCP_DISABLED_TOOLS=list_bookings,get_booking,find_customers,list_cancel_requestsso consumer-facing assistants query schedules and quotes without accessing passenger Personally Identifiable Information (PII). - Zero-cost UAT testing (
FERRY_ENV=uat): Point test harnesses tohttps://api.ferryvn.net, whereOPERATOR_ADAPTER_ALLOWLIST=uatexpressblocks real carriers and activatesuatexpress(UAT Rach Gia,UAT Ha Tien,UAT Tran De) at zero cost.
For REST/SDK execution downstream of the agent handoff, review the Ferry VN SDK quickstart and API reliability and reconciliation patterns.
Deployment Patterns: Local Stdio vs Remote HTTP Service
@ferryvn/mcp runs over local stdio for single-user desktop workflows or hardened --http mode for shared internal travel services.
Local Setup for Claude Desktop and Claude Code
Non-developer staff download the signed ferry-mcp.mcpb bundle from GitHub releases for Claude Desktop and enter a scoped API key. Technical operators using Claude Code (Node.js 22.12+) run over stdio:
# Read-only Production setup (recommended starting point)
claude mcp add ferryvn \
-e FERRY_API_KEY="$FERRY_API_KEY" \
-- npx -y @ferryvn/mcp
# Zero-cost UAT testing setup with opt-in writes and audit log
claude mcp add ferryvn-uat \
-e FERRY_API_KEY="$FERRY_UAT_API_KEY" \
-e FERRY_ENV="uat" \
-e FERRY_MCP_ENABLE_WRITES="true" \
-e FERRY_MCP_MAX_WRITES="10" \
-e FERRY_MCP_AUDIT_FILE="/var/log/ferry-mcp-uat.jsonl" \
-- npx -y @ferryvn/mcp
In UAT prompts, always specify UAT ... piers (UAT Rach Gia–UAT Phu Quoc, UAT Ha Tien–UAT Phu Quoc, UAT Tran De–UAT Con Dao), as UAT blocks bookings on real operators.
Hardening Remote HTTP Mode for Multi-User Travel Apps
Launching ferry-mcp --http --port 3333 serves POST /mcp and GET /healthz behind four strict perimeter controls:
# Required runtime config for non-loopback HTTP deployments
FERRY_API_KEY=your_scoped_partner_ota_or_read_only_key
FERRY_ENV=production
FERRY_MCP_HTTP_HOST=0.0.0.0
FERRY_MCP_HTTP_TOKEN=replace-with-32-char-random-bearer-secret
FERRY_MCP_ALLOWED_HOSTS=mcp.internal.your-ota.com
FERRY_MCP_ALLOWED_ORIGINS=https://agent.internal.your-ota.com
FERRY_MCP_DISABLED_TOOLS=find_customers,list_bookings
# Writes stay disabled in HTTP mode unless BOTH flags below are true
FERRY_MCP_ENABLE_WRITES=false
FERRY_MCP_HTTP_ALLOW_WRITES=false
First, DNS-rebinding guards enforce FERRY_MCP_ALLOWED_HOSTS and FERRY_MCP_ALLOWED_ORIGINS. Second, non-loopback bindings require FERRY_MCP_HTTP_TOKEN (16+ chars) on every Authorization: Bearer request. Third, remote writes stay disabled unless both FERRY_MCP_ENABLE_WRITES=true and FERRY_MCP_HTTP_ALLOW_WRITES=true are set. Fourth, endpoints accept POST only (1 MB body limit) and must sit behind TLS.
Human-in-the-Loop Booking Workflow: Agent to Dashboard Issuance
The safest production pattern pairs @ferryvn/mcp as an AI front-desk copilot with deterministic backend or Dashboard issuance, keeping confirmToIssue strictly outside the model's reach.

- Conversational discovery: A consultant asks the agent to compare sailings, vessel classes, and adjacent seats via
search_voyages,get_route_prices, andget_seat_map. - VIMAWA manifest quoting: The agent validates mandatory traveler fields (full name, birth date, passport/ID, nationality) via
quote_booking, aligning with Vietnam manifest compliance specs. - Human-confirmed status
2draft: With writes enabled, the human confirms the itemized VND summary andcreate_bookingwrites an unpaid status2reservation. - Deterministic checkout & issuance: A consultant completes issuance in the Agency Dashboard — or your backend calls
ferry.bookings.confirmToIssue(bookingId)via@ferryvn/sdk— debiting your VND wallet and downloading carrier PDFs.
Review MCP environment variables in our MCP server setup and tool documentation, inspect underlying REST endpoints in the live OpenAPI specification, or compare plans on Ferry VN Pricing (hi@ferry.vn · +84 924 299 898).
FAQ
Frequently Asked Questions
Can an AI agent issue ferry tickets or debit our agency wallet through `@ferryvn/mcp`?
No. Ticket issuance (confirmToIssue), payments, wallet top-ups, balance adjustments, and API key administration are permanently excluded from @ferryvn/mcp and enforced by automated repository tests. Even with writes enabled, create_booking stops at unpaid status 2 so humans or backend code authorize final issuance.
How do we prevent an AI agent from reading customer phone numbers or passport IDs?
Pass a comma-separated list to FERRY_MCP_DISABLED_TOOLS (such as find_customers,list_bookings,get_booking,list_cancel_requests) when starting the server. This hides every PII-bearing read tool while keeping public schedule search, route pricing, seat maps, and anonymous fare quoting active for trip planning.
What happens if we enable `FERRY_MCP_ENABLE_WRITES=true` in HTTP mode?
Write tools remain disabled in HTTP mode because remote HTTP requests lack desktop confirmation dialogs. To activate writes over HTTP, an administrator must explicitly set both FERRY_MCP_ENABLE_WRITES=true and FERRY_MCP_HTTP_ALLOW_WRITES=true, alongside FERRY_MCP_HTTP_TOKEN (16+ characters) and TLS termination.
How can developers test AI travel workflows without creating live carrier bookings?
Set FERRY_ENV=uat with a UAT API key (https://api.ferryvn.net). Ferry VN isolates all real operators via OPERATOR_ADAPTER_ALLOWLIST=uatexpress and exposes simulated uatexpress routes (UAT Rach Gia, UAT Ha Tien, UAT Tran De), letting agents quote, create drafts, and test cancellations at zero real cost.
Why does `@ferryvn/mcp` reject unknown arguments instead of ignoring them?
Maritime ticket pricing and port clearance depend strictly on accurate passenger fields such as nationality and dateOfBirth. Rejecting unknown or misspelled arguments prevents silent field stripping that could default an international passenger to Vietnam and produce an incorrect fare tier or invalid manifest.
- Ferry VN B2B Platform (MST 1801802790)
- Đăng ký đại lý vé tàu 15+ hãng
- Demo B2B Dashboard & FOM
- Tài liệu tích hợp API · SDK · MCP
- Hotline B2B 24/24: 0924 299 898 · hi@ferry.vn
- Zalo OA đối tác: Ferry VN Official

Related articles

Unified Vietnam Ferry API
Vietnam Ferry API connects 15+ operators via 86 REST routes, @ferryvn/sdk, CLI, and MCP server with zero-cost uatexpress UAT and opt-in HMAC-SHA256 webhooks.

VIMAWA Manifest & QR Specs
E-ticket QR code and VIMAWA passenger manifest API specs in Vietnam: Circular 10/2024 fields, 120145 validation, boarding PDFs, and Decree 70/2025 invoices.

Live Availability for Ferries
Ferry availability sync API architecture for OTAs: 30m-4h sync tiers, 40m sold-out rescans, seat-map rechecks, and Force 6 monsoon disruption polling.

FerryGateway vs OCTO vs Aggregator
FerryGateway vs OCTO compared for Vietnam and SEA ferries: deck seat maps, VIMAWA manifests, Ro-Ro feeds, and Ferry VN's unified REST aggregator adapter.











