Treka English EN

Treka MCP server documentation

Treka's MCP server lets an AI assistant work with one outdoor operator's Treka account: read trips, departures, bookings, revenue and rentals, and, only when the owner or admin allows it, make the changes they approve, including booking a guest and sending them a secure payment link. Muse, ChatGPT and Claude connect to it today.

MCP endpoint

https://treka.app/api/mcp

At a glance

Endpoint
https://treka.app/api/mcp
Transport
Streamable HTTP. Each request is a JSON-RPC POST answered with JSON; no server-sent events and no sessions. Protocol versions: 2025-11-25, 2025-06-18, 2025-03-26.
Sign-in
OAuth 2.1 authorization code flow with PKCE (S256). Clients register with dynamic client registration (RFC 7591) or a Client ID Metadata Document.
Permissions
treka.read lets the assistant read. treka.write is added only when the owner or admin turns on Allow changes.
Who can connect
A company owner or admin, for one company per connection.
Discovery
https://treka.app/.well-known/oauth-protected-resource/api/mcphttps://treka.app/.well-known/oauth-authorization-server
Cost
Included in every Treka plan. There is no separate fee.

How sign-in and approval work

  1. 1

    The assistant finds Treka's sign-in server from the endpoint's 401 response and registers itself. Treka only sends sign-in codes to the assistants' own callback addresses, or to an app on your own computer.

  2. 2

    You sign in to Treka and land on treka.app/connect/ai, which names the assistant and lists exactly what it will be able to read.

  3. 3

    You pick the company. Only companies where you are the owner or an admin are offered.

  4. 4

    Allow changes is off unless you turn it on. Off, the connection can only read. On, the change tools are offered too, and the assistant asks you before each change.

  5. 5

    Treka gives the assistant a token that works only on this endpoint, for that company. Access tokens last 60 minutes; refresh tokens last 90 days and are replaced each time they are used.

  6. 6

    Disconnect any time from Connections in the Treka portal. Access stops at once, and it also stops if the person who connected is no longer an owner or admin.

Set up in your assistant

You need a Treka account where you are the company's owner or an admin. Then, in the assistant you use:

Muse

  1. In Muse, open connectors and add Treka. If Treka isn't listed for you yet, add a custom connector (Existing MCP) with the endpoint above.
  2. Choose Connect. Muse opens Treka's sign-in page.
  3. Sign in as the company's owner or admin, pick the company, decide on Allow changes, and approve.

ChatGPT

  1. In ChatGPT, open Settings, then Apps and Connectors.
  2. Add Treka with the endpoint above and choose OAuth as the sign-in method.
  3. Sign in to Treka and approve on the page that opens.

Claude

  1. Open Treka in Claude's connector directory (claude.ai/directory/connectors/treka) and click Connect, or add a custom connector with the endpoint above.
  2. Sign in to Treka and approve on the page that opens.

Tools

10 tools read and 14 make changes. The change tools are offered only on connections where the owner or admin turned on Allow changes. The names, descriptions and inputs below are exactly what the server sends to the assistant.

Read
Reads only. Changes nothing.
Write
Changes the company's own data in Treka. The assistant asks before it runs.
Sensitive write
Emails a guest, cancels or deletes something, or decides a guide's invoice. The assistant must show exactly what will happen and get the user's explicit approval first.
Every tool the Treka MCP server offers
Tool What it does Type Annotations
Company overview Read readOnlyHint: true destructiveHint: false
List trips Read readOnlyHint: true destructiveHint: false
List departures Read readOnlyHint: true destructiveHint: false
Search bookings Read readOnlyHint: true destructiveHint: false
Get a booking Read readOnlyHint: true destructiveHint: false
Revenue summary Read readOnlyHint: true destructiveHint: false
List guide invoices Read readOnlyHint: true destructiveHint: false
List reviews Read readOnlyHint: true destructiveHint: false
List gift cards Read readOnlyHint: true destructiveHint: false
List rentals Read readOnlyHint: true destructiveHint: false
Add a departure Write readOnlyHint: false destructiveHint: false
Change a departure Write readOnlyHint: false destructiveHint: true
Delete a departure Sensitive write readOnlyHint: false destructiveHint: true
Add a manual booking Write readOnlyHint: false destructiveHint: false
Book a guest with a payment link Sensitive write readOnlyHint: false destructiveHint: true
Update guest details Write readOnlyHint: false destructiveHint: true
Change party size Write readOnlyHint: false destructiveHint: true
Add a booking note Write readOnlyHint: false destructiveHint: false
Confirm a booking Write readOnlyHint: false destructiveHint: false
Cancel a booking Sensitive write readOnlyHint: false destructiveHint: true
Email a booking's guest Sensitive write readOnlyHint: false destructiveHint: true
Edit a trip Write readOnlyHint: false destructiveHint: true
Approve a guide invoice Sensitive write readOnlyHint: false destructiveHint: true
Reject a guide invoice Sensitive write readOnlyHint: false destructiveHint: true

get_company_overview

Company overview

Read

Read-only. Start here. The connected Treka company's name, currency and time zone, plus a snapshot: published trips, departures in the next 30 days, and bookings and revenue from the last 30 days.

Inputs

None

Returns
company (name, slug, currency, time_zone), published_trips, departures_next_30_days, last_30_days (bookings, confirmed_or_completed, cancelled, revenue_gross, revenue_after_treka_fee), today_utc.

list_trips

List trips

Read

Read-only. The company's trips (tours/experiences) with price, group size, duration, location and rating. Published trips only unless include_unpublished is true.

Inputs
  • include_unpublished boolean — Also list drafts and hidden trips.
  • search string — Match words in the trip title.
  • limit integer — How many to return (default 100, at most 200).
Returns
trips[]: id, title, subtitle, slug, base_price (per person, whole currency units), private_trip_price, is_published, approval_status, max/min_group_size, duration, location, region, category, rating, review_count, booking_count, created_at.

list_departures

List departures

Read

Read-only. Scheduled departures (trip dates) with capacity and seats booked. Defaults to the next 30 days. Dates are YYYY-MM-DD.

Inputs
  • from string — Start date (YYYY-MM-DD), default today.
  • to string — End date (YYYY-MM-DD), default 30 days after from.
  • trip_id string — Only this trip (id from list_trips).
  • limit integer — How many to return (default 100, at most 200).
Returns
from, to, departures[]: id, trip_id, trip_title, start, end, capacity, seats_left, seats_booked, sold_out, available, private.

search_bookings

Search bookings

Read

Read-only. Find bookings, with guest name, email, phone, party size, status and amounts. Filter by departure date or booking date, status, trip, or a guest name/email/phone search. Newest first.

Inputs
  • from string — YYYY-MM-DD
  • to string — YYYY-MM-DD
  • date_field departure | booked — What from/to filter on: the trip's departure date (default) or when it was booked.
  • status pending | confirmed | cancelled | completed | inquiry — Only this status.
  • trip_id string — Only this trip (id from list_trips).
  • search string — Guest name, email or phone.
  • limit integer — How many to return (default 50, at most 200).
Returns
bookings[]: id, booking_number, status, trip_id, trip_title, departure_id, departure_start, guest_name, guest_email, guest_phone, guests, total, treka_fee, deposit_amount, balance_amount, payment_method, paid dates, balance_due_date, cancellation fields, booked_at.

get_booking

Get a booking

Read

Read-only. One booking in full, by its id (from search_bookings).

Inputs
  • booking_id string, required — The booking's id (from search_bookings or get_booking).
Returns
Everything search_bookings returns for the booking, plus departure_end, subtotal, sales_tax, invoice amount/status/paid date, payment_phase, completed_at and cancellation_type.

revenue_summary

Revenue summary

Read

Read-only. Booking revenue between two booking dates, grouped by month or by trip — counted the way the Treka dashboard does (confirmed and completed bookings). Defaults to the last 90 days by month. Refunds are not subtracted.

Inputs
  • from string — YYYY-MM-DD (booked on or after)
  • to string — YYYY-MM-DD (booked on or before)
  • group_by month | trip — Default month.
Returns
from, to, group_by, totals (revenue_gross, revenue_after_treka_fee), rows[]: month or trip_id + trip_title, bookings, guests, revenue_gross, revenue_after_treka_fee.

list_guide_invoices

List guide invoices

Read

Read-only. Invoices guides sent the company for their pay, with status, amount and how they were paid. Newest first.

Inputs
  • status string — e.g. pending, approved, paid, rejected
  • limit integer — How many to return (default 50, at most 200).
Returns
invoices[]: id, invoice_number, guide_name, guide_email, amount, currency, status, invoice/due dates, service period, hours_worked, approved_at, paid_at, payment_method, rejected_reason, trip_id, trip_title.

list_reviews

List reviews

Read

Read-only. Guest reviews of the company's trips, newest first.

Inputs
  • max_rating integer — Only reviews at or below this rating. 1–5
  • limit integer — How many to return (default 50, at most 200).
Returns
reviews[]: id, rating, title, content, author_name, is_published, source, source_date, trip_id, trip_title, created_at.

list_gift_cards

List gift cards

Read

Read-only. Gift cards the company sold or issued, with balance, buyer and recipient. Newest first.

Inputs
  • status string — Only this status (e.g. active, redeemed).
  • limit integer — How many to return (default 50, at most 200).
Returns
gift_cards[]: id, code, status, kind, currency, balance, initial_balance, expires_at, purchaser name/email, recipient name/email, created_at.

list_rentals

List rentals

Read

Read-only. The company's rentable gear (Rentals): name, category, variants/sizes, rental price and price type, deposit and quantity in stock. Give start_date and end_date to also see how many of each are free for those dates. Active rentable items only unless include_inactive is true.

Inputs
  • search string — Match words in the item name.
  • category string — Only this category (e.g. Climbing).
  • start_date string — YYYY-MM-DD. With end_date: availability for that range.
  • end_date string — YYYY-MM-DD, on or after start_date.
  • include_inactive boolean — Also list items that are switched off or not rentable.
  • limit integer — How many items to return (default 50, at most 100).
Returns
dates (start, end) or null, rentals[]: id, name, brand, category, description, price, half_day_price, price_type (per_day, per_trip, per_night or flat), deposit (whole currency units), active, rentable, quantity_total, available_now, available_for_dates (with dates), variants[]: sku_id, sku_code, label, size, quantity, available_now, available_for_dates.

create_departure

Add a departure

Write

Changes Treka: adds a bookable date for a trip. Seats default to the trip's max group size. Times are the company's local time.

Inputs
  • trip_id string, required — The trip's id (from list_trips).
  • start_date string, required — YYYY-MM-DD
  • start_time string — HH:MM (24h), optional — all day if left out
  • end_date string — YYYY-MM-DD for multi-day trips
  • seats integer — Total seats. 1–10000
Returns
summary, entity_type, entity_id, departure_id.

update_departure

Change a departure

Write

Changes Treka: sets a departure's total seats (never below seats already booked), marks it sold out or reopens it, or hides/shows it for booking.

Inputs
  • departure_id string, required — The departure's id (from list_departures).
  • seats integer — New total capacity 1–10000
  • sold_out boolean — true marks it sold out, false reopens it.
  • bookable boolean — false hides it from booking
Returns
summary, entity_type, entity_id, departure (max_spots, spots_remaining, flags).

delete_departure

Delete a departure

Sensitive write

Changes Treka: permanently deletes a departure that has no bookings. A departure with bookings must be cancelled in the Treka portal, where refunds are handled. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation.

Inputs
  • departure_id string, required — The departure's id (from list_departures).
Returns
summary, entity_type, entity_id.

create_booking

Add a manual booking

Write

Changes Treka: records a booking taken outside Treka (phone, email, walk-in), holding seats on a departure. No card is charged and no email is sent; an optional amount is recorded as owed by invoice. Use hold=true to hold seats as pending until confirmed.

Inputs
  • departure_id string, required — The departure's id (from list_departures).
  • guest_name string, required — Lead guest's name.
  • guest_email string, required — Lead guest's email.
  • guest_phone string — Optional.
  • guests integer, required — Party size. 1–500
  • amount number — Total owed, in the company currency (optional)
  • notes string — Optional notes on the booking.
  • hold boolean — true = pending hold instead of confirmed
Returns
summary, entity_type, entity_id, booking_id.

send_payment_link

Book a guest with a payment link

Sensitive write

Changes Treka, and can send an email: makes a Treka booking link for a guest on a departure and returns its secure checkout URL so the user can share it. With email_guest=true, Treka also emails the link to the guest. The guest pays on Treka's own Stripe-hosted checkout at the trip's normal price; the booking holds seats from when they check out and confirms when they pay. No card details pass through the assistant, and the assistant never takes the payment. Fails if the departure doesn't have enough seats left. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show the guest, party size, departure and whether Treka will email them.

Inputs
  • departure_id string, required — The departure's id (from list_departures).
  • guest_name string, required — Lead guest's name.
  • guest_email string, required — Lead guest's email (the link is for them).
  • guests integer, required — Party size. 1–500
  • email_guest boolean — true = Treka also emails the link to the guest (default false).
  • message string — Optional note shown in the email and on the booking page. ≤ 1000 characters
  • deposit_only boolean — true = the guest pays the trip's deposit now and the balance later.
  • expires_in_days integer — How long the link works (default 7 days). 1–30
Returns
summary, payment_url (the Treka checkout link to share), link_id, expires_at, emailed (true/false), guests, price_per_person and estimated_total before fees (company currency), channel, entity_type, entity_id, note.

update_booking_contact

Update guest details

Write

Changes Treka: overwrites a booking's guest name, email or phone. Sends nothing to the guest.

Inputs
  • booking_id string, required — The booking's id (from search_bookings or get_booking).
  • guest_name string — New name (optional).
  • guest_email string — New email (optional).
  • guest_phone string — New phone (optional).
Returns
summary, entity_type, entity_id.

change_party_size

Change party size

Write

Changes Treka: sets how many guests are on a booking, moving seats on its departure. Only for bookings with nothing to charge or refund (manual/invoice bookings or free ones); priced online bookings must be changed in the Treka portal so the price is recalculated.

Inputs
  • booking_id string, required — The booking's id (from search_bookings or get_booking).
  • guests integer, required — New party size. 1–500
Returns
summary, entity_type, entity_id.

add_booking_note

Add a booking note

Write

Changes Treka: adds a private note to a booking (the operator's notes; guests don't see it).

Inputs
  • booking_id string, required — The booking's id (from search_bookings or get_booking).
  • note string, required — The note (up to 2000 characters).
Returns
summary, entity_type, entity_id.

confirm_booking

Confirm a booking

Write

Changes Treka: confirms a pending booking (seats are already held). Doesn't charge anything.

Inputs
  • booking_id string, required — The booking's id (from search_bookings or get_booking).
Returns
summary, entity_type, entity_id.

cancel_booking

Cancel a booking

Sensitive write

Changes Treka: cancels an UNPAID booking and frees its seats. No refund is issued and no email is sent. Bookings with any payment must be cancelled in the Treka portal, where the refund is decided. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation.

Inputs
  • booking_id string, required — The booking's id (from search_bookings or get_booking).
  • reason string — Why (kept on the booking).
Returns
summary, entity_type, entity_id.

email_guest

Email a booking's guest

Sensitive write

Sends an email: the guest on a booking gets a plain-text email from the company through Treka (replies go to the company). Write it as the company. At most 50 a day per company. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show the exact subject and text.

Inputs
  • booking_id string, required — The booking's id (from search_bookings or get_booking).
  • subject string, required — Email subject. ≤ 150 characters
  • message string, required — Plain-text body. ≤ 5000 characters
Returns
summary, entity_type, entity_id.

update_trip

Edit a trip

Write

Changes Treka: overwrites a trip's details: title, subtitle, description, meeting point, duration, price per person (whole units, more than 0), group sizes, and what's included / not included / requirements (lists replace the whole list). Publishing, payment rules and photos stay in the Treka portal.

Inputs
  • trip_id string, required — The trip's id (from list_trips).
  • title string — ≤ 150 characters
  • subtitle string — ≤ 250 characters
  • description string — ≤ 20000 characters
  • meeting_point string — ≤ 500 characters
  • duration string — e.g. '4 hours', '3 days' ≤ 100 characters
  • price number — Per person, whole currency units.
  • max_group_size integer — 1–10000
  • min_group_size integer — 1–10000
  • included string[]
  • not_included string[]
  • requirements string[]
Returns
summary, entity_type, entity_id, note.

approve_guide_invoice

Approve a guide invoice

Sensitive write

Changes Treka: approves a guide's pending invoice. This does NOT pay it — the company pays from the Treka portal, its usual payroll, or (when guide pay through QuickBooks is on) the QuickBooks bill this creates. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation.

Inputs
  • invoice_id string, required — The guide invoice's id (from list_guide_invoices).
Returns
summary, quickbooks (off, billed or failed), entity_type, entity_id.

reject_guide_invoice

Reject a guide invoice

Sensitive write

Changes Treka: rejects a guide's pending invoice with a reason the guide sees. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation.

Inputs
  • invoice_id string, required — The guide invoice's id (from list_guide_invoices).
  • reason string, required — Shown to the guide. ≤ 500 characters
Returns
summary, entity_type, entity_id.

Limits

Data handling and safety

Things to ask

Support

Questions or problems?

Email us about setup, a tool that misbehaves, or a security concern, and a real person answers. support@treka.app

Claim your 30-day free trialHow Muse, ChatGPT and Claude work with Treka

Privacy Policy · Terms of Service