Skip to main content
Glama

GOCheap MCP

MCP server cho GOCheap Open API. Cho phép AI agent (Claude, Cursor, VS Code Copilot và các ứng dụng hỗ trợ MCP) báo giá, đặt, tra cứu và huỷ chuyến tài xế bằng API key của đối tác.

Công cụ

Công cụ

Việc làm

Endpoint

list_services

Dịch vụ được mở, loại xe

GET /services

search_places

Tìm địa điểm, lấy place_id

GET /places/search

get_quote

Báo giá

POST /quotes

create_booking

Tạo chuyến từ quote đã được người dùng xác nhận

POST /bookings

get_booking

Xem chuyến

GET /bookings/{booking_id}

list_bookings

Danh sách chuyến, đối soát

GET /bookings

cancel_booking

Huỷ chuyến

POST /bookings/{booking_id}/cancel

list_webhooks

Webhook đã đăng ký

GET /webhooks

send_webhook_test

Gửi sự kiện thử

POST /webhooks/{webhook_id}/test-event

simulate_booking

Giả lập trạng thái (chỉ sandbox)

POST /sandbox/bookings/{booking_id}/simulate

Related MCP server: FlyAI MCP Gateway

An toàn

  • create_booking bắt buộc user_confirmed: true: AI chỉ được tạo chuyến sau khi người dùng đồng ý giá và thông tin chuyến.

  • Gọi lại create_booking với cùng quote_id không tạo chuyến thứ hai (Idempotency-Key cố định theo quote).

  • Key gc_live_ (production): MCP từ chối tạo và huỷ chuyến trừ khi đặt GOCHEAP_ALLOW_LIVE_WRITE=true.

  • API key chỉ nằm trong biến môi trường của MCP server, không trả về cho AI và không ghi log.

Cấu hình

Biến

Bắt buộc

Ý nghĩa

GOCHEAP_API_URL

Có

Base URL GOCheap gửi kèm API key

GOCHEAP_API_KEY

Có

gc_test_... (sandbox) hoặc gc_live_... (production)

GOCHEAP_ALLOW_LIVE_WRITE

Không

true để cho phép tạo/huỷ chuyến bằng key production

GOCHEAP_LANGUAGE

Không

vi (mặc định) hoặc en, ngôn ngữ thông báo lỗi

Cài đặt

Cần Node.js 20 trở lên. File chạy là dist/gocheap-mcp.mjs, đã đóng gói sẵn, không cần npm install. Base URL và API key do GOCheap gửi riêng cho từng đối tác.

Claude Code (plugin)

Đặt biến môi trường trước khi mở Claude Code:

export GOCHEAP_API_URL=<base URL sandbox>
export GOCHEAP_API_KEY=gc_test_...

Trong Claude Code:

/plugin marketplace add thienanjsc/gocheap-mcp
/plugin install gocheap@gocheap

Plugin gồm MCP server và skill gocheap-dat-chuyen hướng dẫn AI quy trình báo giá → xác nhận → đặt chuyến.

Tải file chạy

Các cách cài dưới đây cần file gocheap-mcp.mjs trên máy:

git clone https://github.com/thienanjsc/gocheap-mcp.git
# hoặc chỉ tải một file:
curl -LO https://raw.githubusercontent.com/thienanjsc/gocheap-mcp/main/dist/gocheap-mcp.mjs

Claude Code (chỉ MCP)

claude mcp add gocheap \
  --env GOCHEAP_API_URL=<base URL sandbox> \
  --env GOCHEAP_API_KEY=gc_test_... \
  -- node /duong/dan/gocheap-mcp/dist/gocheap-mcp.mjs

Claude Desktop, Cursor, VS Code

Thêm vào file cấu hình MCP của ứng dụng (claude_desktop_config.json, .cursor/mcp.json, ...):

{
  "mcpServers": {
    "gocheap": {
      "command": "node",
      "args": ["/duong/dan/gocheap-mcp/dist/gocheap-mcp.mjs"],
      "env": {
        "GOCHEAP_API_URL": "<base URL sandbox>",
        "GOCHEAP_API_KEY": "gc_test_..."
      }
    }
  }
}

Phát triển

npm install
npm test        # build + kiểm tra cấu hình, header, xử lý lỗi
npm run build   # tạo dist/gocheap-mcp.mjs

Sửa src/, chạy npm run build và commit cả dist/gocheap-mcp.mjs (plugin cài từ git dùng trực tiếp file này).

Giấy phép

MIT

Available Tools

10 tools
cancel_bookingHuỷ chuyếnB
DestructiveIdempotent

Huỷ một chuyến chưa bắt đầu (sandbox). Chỉ gọi khi người dùng yêu cầu huỷ đúng chuyến này.

Inputs: booking_id (required), reason.

create_bookingĐặt chuyếnA
Idempotent

Tạo chuyến từ một quote_id (sandbox). Chuyến sandbox: dùng simulate_booking để chuyển trạng thái. Chỉ gọi khi người dùng đã xác nhận rõ ràng giá và thông tin chuyến trong cuộc trò chuyện; đặt user_confirmed = true để xác nhận điều đó. Gọi lại với cùng quote_id không tạo chuyến thứ hai.

Inputs: customer (required), quote_id (required), user_confirmed (required), note, +4 more.

get_bookingXem chuyếnA
Read-only

Xem trạng thái và chi tiết một chuyến theo booking_id (ví dụ LX261205ABC), gồm tài xế khi đã có người nhận.

Inputs: booking_id (required).

get_quoteBáo giá chuyếnA
Read-only

Báo giá một chuyến. Trả về quote_id, giá (VND), quãng đường, giờ đón và expires_at. Quote có hạn và chỉ dùng được một lần. Sau khi có giá, PHẢI đọc lại cho người dùng (dịch vụ, điểm đón, điểm đến, giờ đón, giá) và chờ họ đồng ý trước khi gọi create_booking. pick_up_time bỏ trống là đi ngay. Chuyến hai chiều: ways = two_way và return_time.

Inputs: pick_up (required), service (required), destination (required), ways, +3 more.

list_bookingsDanh sách chuyếnB
Read-only

Liệt kê chuyến của tài khoản, lọc theo trạng thái, khoảng thời gian tạo hoặc partner_reference_id. Dùng cho tra cứu và đối soát.

Inputs: page, limit, status, created_to, +2 more.

list_servicesDanh sách dịch vụA
Read-only

Liệt kê các dịch vụ GOCheap được mở cho tài khoản này (sandbox), kèm car_types của taxi sân bay và xe hợp đồng. Gọi trước get_quote để biết service và car_type hợp lệ.

Inputs: no named parameters.

list_webhooksDanh sách webhookB
Read-only

Liệt kê webhook đã đăng ký của môi trường hiện tại (không gồm secret).

Inputs: no named parameters.

search_placesTìm địa chỉA
Read-only

Tìm địa điểm theo tên hoặc địa chỉ tại Việt Nam, trả về place_id dùng cho get_quote. Truyền lat/lng gần đúng để ưu tiên kết quả gần.

Inputs: q (required), lat, lng.

send_webhook_testGửi sự kiện thử webhookB

Gửi sự kiện webhook.test tới một webhook để kiểm tra máy chủ nhận của đối tác; trả về mã HTTP và thời gian phản hồi.

Inputs: webhook_id (required).

simulate_bookingGiả lập trạng thái chuyến (sandbox)A

Chỉ có trên sandbox. Chuyển chuyến sang trạng thái tiếp theo, GOCheap gửi webhook tương ứng. Thứ tự thường dùng: assign_driver → driver_arriving → start → complete. Khác: unassign_driver (về searching), cancel_by_driver, cancel_by_gocheap.

Inputs: action (required), booking_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 10 tools

    Disambiguation4/5

    The core booking lifecycle tools (search_places, get_quote, create_booking, get_booking, list_bookings, cancel_booking) each have a clearly distinct role, and descriptions reinforce the flow ordering. The only real overlap is cancellation, which appears both as cancel_booking and as simulate_booking sub-actions (cancel_by_driver, cancel_by_gocheap); descriptions distinguish them by actor, but an agent could still hesitate there.

    Naming Consistency5/5

    Every name is snake_case with a leading verb (list_, get_, create_, cancel_, search_, simulate_, send_), producing a predictable verb_noun pattern throughout. send_webhook_test is slightly longer but still follows the verb-first convention and reads clearly.

    Tool Count5/5

    Ten tools is well-scoped for a ride-hailing booking API: discovery, quoting, booking lifecycle, and webhook diagnostics are each covered by a small number of purpose-built tools. No tool feels redundant or padded.

    Completeness4/5

    Booking CRUD is fully covered (create, get, list, cancel) plus the quote/place/service prerequisites and sandbox state simulation, so no core workflow dead-ends. Minor gaps remain around webhook management (list and test exist, but no register/update/delete) and no tool for modifying or rescheduling an existing booking.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables ChatGPT users to authenticate with their own travel-platform API key and run read-only searches for flights, trains, hotels, attractions, travel products, and Marriott accommodations or packages through a secured gateway.
      -
    • A
      license
      B
      quality
      B
      maintenance
      Provides AI agents with a structured API for travel planning, enabling them to read trip data, search places, calculate routes, and create/validate itinerary change proposals that require explicit human approval before being applied.
      15
      MIT