Inspiration

Moving heavy freight across Latin America is complex and fragmented. Shippers juggle multiple carrier portals, emails, spreadsheets, and phone calls just to verify route coverage, check truck capacity, get rate quotes, and confirm bookings. Traditional automation relies on fragile web scraping or custom APIs that smaller carriers cannot maintain. We asked: what if carrier websites could directly publish typed, structured capabilities to an authorized browser agent through the open WebMCP standard? CargoMesh makes this possible.

What it does

CargoMesh is an agent-native B2B freight orchestration platform:

  1. Canonical Intake: Shippers define or load freight requests (e.g., FR-1042 Callao, Peru → Santiago, Chile).
  2. Dynamic Discovery: Discovers 0..N compatible carriers from an open registry without hardcoded lists.
  3. Native WebMCP Execution: The browser agent visits carrier portals (Andes, Inca, Pacific) and consumes 5 structured tools via document.modelContext: check_service_coverage, check_capacity, quote_freight, book_freight, and get_provider_booking_status.
  4. Result Bridge: Validates and persists commercial responses without client-side data tampering.
  5. Deterministic BALANCED Engine: Scores offers mathematically (25% cost, 25% reliability, 20% transit, 10% availability, 10% route experience, 10% org history).
  6. Recovery: If a carrier rejects a booking, CargoMesh offers authorized alternatives (e.g., Andes rejection → Inca confirmed).

How we built it

  • Frontend & Provider Portals: Next.js 15, React 19, Tailwind CSS, Leaflet for explicitly planned route corridors, and EN/ES support.
  • WebMCP Runtime: Browser-side document.modelContext.registerTool with strict JSON schemas, abort handling, and tool cleanup on provider navigation.
  • Backend & Security: Supabase PostgreSQL, Supabase Auth, RLS, and optimistic concurrency through draft_version.
  • Result Bridge & Auditing: Server-side validation of tool envelopes, origin/classification, request correlation, and commercial responses. The Judge Drawer exposes auditable inputs, outputs, timestamps, and origin evidence.

Challenges we ran into

  1. Separating browser execution from database truth: WebMCP tools execute in browser memory; we built the Result Bridge to validate signatures before persisting commercial offers.
  2. Dynamic 0..N provider identity: Preserving exact matchingServiceId across dynamic navigation without breaking idempotency.
  3. Clean context management: Ensuring active WebMCP tools are completely removed from document.modelContext when navigating away from a provider.
  4. Technical honesty: Avoiding artificial GPS simulation; planned corridors are explicitly labeled as planned references.

Accomplishments that we're proud of

  • Native WebMCP tool surfaces through document.modelContext.
  • A deterministic, explainable BALANCED ranking for the canonical FR-1042 fixture: Andes 89, Inca 84, Pacific 72.
  • Repository and client-bundle checks with no detected secret exposure, plus RLS-protected organization-scoped access.
  • A demonstrated recovery flow: Andes rejection, explicit human selection of Inca, then confirmed replacement booking.

What we learned

We proved that WebMCP fundamentally shifts how B2B platforms interact: websites can expose clean, agentic tool surfaces without breaking the visual human interface, eliminating the need for brittle web scraping.

What's next for CargoMesh

  • Onboarding additional real-world carriers across the Pan-American corridor.
  • Integrating independently hosted provider origins with external WebMCP adapters.
  • Multi-modal freight orchestration (maritime and air freight handoffs).

Built With

Share this project:

Updates

Submission history