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

21 tools read and 33 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 openWorldHint: false
List trips Read readOnlyHint: true destructiveHint: false openWorldHint: false
List departures Read readOnlyHint: true destructiveHint: false openWorldHint: false
Search bookings Read readOnlyHint: true destructiveHint: false openWorldHint: false
Get a booking Read readOnlyHint: true destructiveHint: false openWorldHint: false
Revenue summary Read readOnlyHint: true destructiveHint: false openWorldHint: false
List guide invoices Read readOnlyHint: true destructiveHint: false openWorldHint: false
List reviews Read readOnlyHint: true destructiveHint: false openWorldHint: false
List gift cards Read readOnlyHint: true destructiveHint: false openWorldHint: false
List rentals Read readOnlyHint: true destructiveHint: false openWorldHint: false
List rental pickups and returns Read readOnlyHint: true destructiveHint: false openWorldHint: false
List email campaigns Read readOnlyHint: true destructiveHint: false openWorldHint: false
Get an email campaign Read readOnlyHint: true destructiveHint: false openWorldHint: false
List email contact lists Read readOnlyHint: true destructiveHint: false openWorldHint: false
Count an email campaign's recipients Read readOnlyHint: true destructiveHint: false openWorldHint: false
List text campaigns Read readOnlyHint: true destructiveHint: false openWorldHint: false
Text marketing audience Read readOnlyHint: true destructiveHint: false openWorldHint: false
List guides Read readOnlyHint: true destructiveHint: false openWorldHint: false
Guides on a departure Read readOnlyHint: true destructiveHint: false openWorldHint: false
Departures that need a lead guide Read readOnlyHint: true destructiveHint: false openWorldHint: false
List closures Read readOnlyHint: true destructiveHint: false openWorldHint: false
Add a departure Write readOnlyHint: false destructiveHint: false openWorldHint: false
Change a departure Write readOnlyHint: false destructiveHint: true openWorldHint: false
Delete a departure Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Add a manual booking Write readOnlyHint: false destructiveHint: false openWorldHint: false
Book a guest with a payment link Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Update guest details Write readOnlyHint: false destructiveHint: true openWorldHint: false
Change party size Write readOnlyHint: false destructiveHint: true openWorldHint: false
Add a booking note Write readOnlyHint: false destructiveHint: false openWorldHint: false
Confirm a booking Write readOnlyHint: false destructiveHint: false openWorldHint: false
Cancel a booking Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Email a booking's guest Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Edit a trip Write readOnlyHint: false destructiveHint: true openWorldHint: false
Approve a guide invoice Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Reject a guide invoice Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Draft an email campaign Write readOnlyHint: false destructiveHint: false openWorldHint: false
Edit a draft email campaign Write readOnlyHint: false destructiveHint: true openWorldHint: false
Email a test to yourself Write readOnlyHint: false destructiveHint: false openWorldHint: false
Send an email campaign Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Import email contacts Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Delete an email contact list Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Draft a text campaign Write readOnlyHint: false destructiveHint: false openWorldHint: false
Edit a draft text campaign Write readOnlyHint: false destructiveHint: true openWorldHint: false
Send a text campaign Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Import text contacts Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Create a trip Write readOnlyHint: false destructiveHint: false openWorldHint: false
Duplicate a trip Write readOnlyHint: false destructiveHint: false openWorldHint: false
Publish or unpublish a trip Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Assign a guide to a departure Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Remove a guide from a departure Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Add a closure Write readOnlyHint: false destructiveHint: false openWorldHint: false
Delete a closure Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Edit website text Sensitive write readOnlyHint: false destructiveHint: true openWorldHint: false
Change rental gear Write readOnlyHint: false destructiveHint: true openWorldHint: false

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, hourly_price, price_type (per_day, per_trip, per_night or flat), deposit (whole currency units), cleaning_minutes, active, rentable, quantity_total, available_now, available_for_dates (with dates), variants[]: sku_id, sku_code, label, size, quantity, available_now, available_for_dates.

list_rental_orders

List rental pickups and returns

Read

Read-only. The rental desk for one day (today by default, in the company's time zone): rentals going out that day, rentals due back that day, and everything overdue right now — rental orders and gear rented with trip bookings — with the guest, items, times, payment and deposit state.

Inputs
  • date string — YYYY-MM-DD in the company's time zone. Defaults to today.
  • limit integer — Most rentals per list (default 50, at most 100).
Returns
date, time_zone, pickups[], returns[], overdue[]: kind (rental or trip_booking), id, number, guest_name, status, starts_at, due_at, paid (true/false), deposit (amount in whole currency units, status) or null, items[]: name, variant, quantity.

list_email_campaigns

List email campaigns

Read

Read-only. The company's email marketing campaigns, newest first: status (draft, sending, sent, failed), subject, and for sent ones how many were delivered, opened, clicked, bounced and unsubscribed.

Inputs
  • status draft | scheduled | sending | sent | failed — Only this status.
  • limit integer — How many to return (default 50, at most 200).
Returns
campaigns[]: id, name, subject, status, recipient_count, sent_count, failed_count, skipped_optout_count, delivered_count, unique_open_count, unique_click_count, bounce_count, unsubscribe_count, sent_at, created_at, updated_at.

get_email_campaign

Get an email campaign

Read

Read-only. One email campaign in full: subject, preheader, its content blocks, who it is addressed to (people who booked and/or which contact lists) and its counts.

Inputs
  • campaign_id string, required — The email campaign's id (from list_email_campaigns or create_email_campaign).
Returns
Everything list_email_campaigns returns, plus preheader, content (headline, intro, blocks[]), audience (booking_customers, list_ids), last_error.

list_contact_lists

List email contact lists

Read

Read-only. The company's own email contact lists (uploaded CSVs and imports), with how many addresses each holds. Treka's own lists are never shown or reachable.

Inputs
  • limit integer — How many to return (default 50, at most 200).
Returns
lists[]: id, name, description, contacts, created_at, updated_at.

preview_email_audience

Count an email campaign's recipients

Read

Read-only. Counts exactly who an email campaign would reach right now, the way the sender counts: its audience, minus people who unsubscribed, duplicates, placeholder addresses and anyone who only booked through GetYourGuide. Show this number to the user; send_email_campaign needs it as expected_recipients.

Inputs
  • campaign_id string, required — The email campaign's id (from list_email_campaigns or create_email_campaign).
Returns
campaign_id, recipients (the number to show and pass as expected_recipients), skipped_unsubscribed, duplicates_dropped, by_source (booking_customers, contact_list), connector_limit, within_connector_limit.

list_sms_campaigns

List text campaigns

Read

Read-only. The company's text (SMS) marketing campaigns, newest first, with status (draft, scheduled, sending, sent, paused_cap, failed, cancelled), the message, who it is addressed to and how many were texted, failed or skipped.

Inputs
  • limit integer — How many to return (default 50, at most 200).
Returns
campaigns[]: id, name, body, audience (source, trip_ids, list_id), status, scheduled_at, deferred_reason, sent_at, recipient_count, sent_count, failed_count, skipped_count, last_error, created_at.

sms_audience_summary

Text marketing audience

Read

Read-only. Who the company can text: how many people agreed to marketing texts from it, how many of them are textable now (STOP replies removed), its imported text lists with counts, this month's texting use against its limit, and whether texting is set up. Give audience (and trip_ids or list_id) to count one campaign's audience; send_sms_campaign needs that number as expected_recipients. Texts reach only people who agreed to marketing texts from this company (at checkout, or on a list the company imported and confirmed they agreed), never anyone who replied STOP, and never between 9pm and 8am in the company's time zone (all of North America when it has none) — a campaign started then waits until 8am.

Inputs
  • audience all | booked | list — all = everyone who agreed to texts from the company; booked = those of them who booked one of trip_ids; list = those of them on the imported list list_id.
  • trip_ids string[] — With audience 'booked': trip ids from list_trips.
  • list_id string — With audience 'list': an imported text list's id (from sms_audience_summary).
Returns
consented, textable, audience (source, trip_ids, list_id, recipients, skipped_opted_out), lists[]: id, name, file_name, source_detail, imported_via, attested_at, consented_contacts; month (segments_used, segment_limit), quiet_hours (start 21:00, end 08:00, time_zone), texting_ready, connector_limits.

list_guides

List guides

Read

Read-only. The company's guides (active team members who guide): name, email, phone, whether they have a Treka account, and what they're qualified to do per activity (lead or assistant). Use the id with assign_guide.

Inputs
  • search string — Match words in the guide's name or email.
Returns
guides[]: id, name, email, phone, has_account, capabilities[]: activity (trip category), capability (lead or assistant).

list_departure_guides

Guides on a departure

Read

Read-only. Who is assigned to one departure, as lead or assistant, and whether they have confirmed — plus whether the departure still needs a qualified, available lead (the portal's staffing check).

Inputs
  • departure_id string, required — The departure's id (from list_departures).
Returns
departure (id, trip_id, trip_title, activity, start, end), needs_lead (no_lead_assigned, lead_unavailable or null), guides[]: guide_id, assignment_id, name, email, role (lead or assistant), status (pending, confirmed, declined).

list_staffing_gaps

Departures that need a lead guide

Read

Read-only. Upcoming public departures with no qualified, available lead guide — the same list as the portal's staffing alert. Defaults to the next 90 days.

Inputs
  • from string — Start date (YYYY-MM-DD), default today.
  • to string — End date (YYYY-MM-DD), default 90 days after from; at most a year after from.
Returns
from, to, gaps[]: departure_id, trip_id, trip_title, start, end, reason (no_lead_assigned or lead_unavailable), active_bookings.

list_closures

List closures

Read

Read-only. Days the company is closed (blackouts): whole days take those dates off sale; part-day closures block guides and timed slots. Defaults to closures that haven't ended yet.

Inputs
  • from string — YYYY-MM-DD: closures ending on or after this day (default today).
  • to string — YYYY-MM-DD: closures starting on or before this day.
Returns
closures[]: id, title, start, end (company local time), all_day, location (null = every location).

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 or Xero is on) the bill this creates there. 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), xero (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.

create_email_campaign

Draft an email campaign

Write

Changes Treka: saves a new email campaign as a DRAFT under the company's logo. Nothing is emailed. It can go only to the company's own audiences: people who booked with it and/or its own contact lists (never arbitrary addresses). Every email carries an unsubscribe link automatically.

Inputs
  • name string, required — Internal name (only you see it). ≤ 120 characters
  • subject string, required — What recipients see in their inbox. Merge tags: {{first_name}}, {{name}}. ≤ 150 characters
  • preheader string — Optional inbox preview line. ≤ 150 characters
  • headline string — Big headline at the top (defaults to the subject). ≤ 150 characters
  • intro string — Lead paragraph. ≤ 2000 characters
  • blocks object[] — The email body, in order. Each block is {type:'heading', text} | {type:'paragraph', text} | {type:'button', label, href, style?: 'solid'|'outline'} | {type:'image', src (https photo URL), alt?, caption?, href? (makes the photo a link)} | {type:'divider'}. An email can have up to 10 buttons and up to 10 photos, anywhere in the order — e.g. a photo, a paragraph and a button for each trip. Links (button href, image href) may be https, http, mailto: or tel:. Text may use {{first_name}}.
  • booking_customers boolean — Include everyone who booked with the company (direct bookings only).
  • list_ids string[] — The company's own contact lists to include (ids from list_contact_lists).
Returns
summary, entity_type, entity_id, campaign_id, status (draft), audience, note.

update_email_campaign

Edit a draft email campaign

Write

Changes Treka: overwrites parts of a DRAFT email campaign (name, subject, preheader, headline, intro, blocks — blocks replace the whole body — and audience). Campaigns that are sending or sent can't be changed. Nothing is emailed.

Inputs
  • campaign_id string, required — The email campaign's id (from list_email_campaigns or create_email_campaign).
  • name string — ≤ 120 characters
  • subject string — What recipients see in their inbox. Merge tags: {{first_name}}, {{name}}. ≤ 150 characters
  • preheader string — Optional inbox preview line. ≤ 150 characters
  • headline string — Big headline at the top (defaults to the subject). ≤ 150 characters
  • intro string — Lead paragraph. ≤ 2000 characters
  • blocks object[] — The email body, in order. Each block is {type:'heading', text} | {type:'paragraph', text} | {type:'button', label, href, style?: 'solid'|'outline'} | {type:'image', src (https photo URL), alt?, caption?, href? (makes the photo a link)} | {type:'divider'}. An email can have up to 10 buttons and up to 10 photos, anywhere in the order — e.g. a photo, a paragraph and a button for each trip. Links (button href, image href) may be https, http, mailto: or tel:. Text may use {{first_name}}.
  • booking_customers boolean — Include everyone who booked with the company (direct bookings only).
  • list_ids string[] — The company's own contact lists to include (ids from list_contact_lists).
Returns
summary, entity_type, entity_id, campaign_id, changed (field names).

send_test_email

Email a test to yourself

Write

Sends one test copy of an email campaign to the connected Treka user's OWN sign-in address (never anyone else), subject marked [Test]. The campaign stays a draft and no counts move. At most 10 a day per company.

Inputs
  • campaign_id string, required — The email campaign's id (from list_email_campaigns or create_email_campaign).
Returns
summary, entity_type, entity_id, sent_to.

send_email_campaign

Send an email campaign

Sensitive write

Sends an email campaign now to its whole audience. It can't be undone. Uses the portal's own sender: people who unsubscribed, placeholder addresses and GetYourGuide-only customers are left out, and every email carries the recipient's unsubscribe link and the company's logo. First call preview_email_audience and show the user the subject and the recipient count; pass that count as expected_recipients (refused if it changed). Drafts only. At most 2 campaigns a day per company and 5000 recipients per campaign; larger sends go from the Treka portal. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show the subject, the audience and the exact number of recipients.

Inputs
  • campaign_id string, required — The email campaign's id (from list_email_campaigns or create_email_campaign).
  • expected_recipients integer, required — The exact number of recipients (from preview_email_audience) the user was shown and approved. The call is refused, with the current number, if it differs.
Returns
summary, entity_type, entity_id, status (sending or sent), recipients, sent, failed, still_sending, note.

import_contacts

Import email contacts

Sensitive write

Changes Treka: adds people to one of the company's own email contact lists — a new list (list_name) or an existing one (list_id) — from rows the user provided, up to 5000 per call (call again for more, with the list_id the first call returned). Addresses are checked, lowercased and deduplicated; ones already on the list are skipped. Only for people who agreed to hear from the business: consent_confirmed must be true, meaning the user confirmed that in this conversation. Nobody is emailed. At most 10 imports a day per company. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show how many contacts, which list, and ask the user to confirm these people agreed to receive email from their business.

Inputs
  • list_name string — Name for a new list. ≤ 120 characters
  • list_id string — Add to this existing list instead.
  • contacts object[], required — Up to 5000 rows of {email, name?}.
  • consent_confirmed boolean, required — true only if the user confirmed these people agreed to receive email from their business.
Returns
summary, entity_type, entity_id, list_id, list_name, added, already_on_list, invalid, duplicates.

delete_contact_list

Delete an email contact list

Sensitive write

Changes Treka: permanently deletes one of the company's own email contact lists and every address on it. Refused while a campaign that is scheduled or sending uses it. Draft campaigns that named it simply stop including it. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show the list's name and how many contacts it holds.

Inputs
  • list_id string, required — The contact list's id (from list_contact_lists).
Returns
summary, entity_type, entity_id, contacts_removed.

create_sms_campaign

Draft a text campaign

Write

Changes Treka: saves a new text (SMS) marketing campaign as a DRAFT. Nothing is texted. The message may use {{first_name}} and {{company_name}}, must be under 480 characters, and always ends with "<company>: Reply STOP to opt out" (added automatically — don't write it). Texts reach only people who agreed to marketing texts from this company (at checkout, or on a list the company imported and confirmed they agreed), never anyone who replied STOP, and never between 9pm and 8am in the company's time zone (all of North America when it has none) — a campaign started then waits until 8am.

Inputs
  • name string, required — Internal name (only you see it). ≤ 120 characters
  • body string, required — The message, without the footer. ≤ 480 characters
  • audience all | booked | list — all = everyone who agreed to texts from the company; booked = those of them who booked one of trip_ids; list = those of them on the imported list list_id.
  • trip_ids string[] — With audience 'booked': trip ids from list_trips.
  • list_id string — With audience 'list': an imported text list's id (from sms_audience_summary).
Returns
summary, entity_type, entity_id, campaign_id, status (draft), preview (the text as a recipient called Alex gets it), segments_each, audience.

update_sms_campaign

Edit a draft text campaign

Write

Changes Treka: overwrites the name, message or audience of a DRAFT text campaign. Scheduled, sending and sent campaigns can't be changed here. Nothing is texted.

Inputs
  • campaign_id string, required — The text campaign's id (from list_sms_campaigns or create_sms_campaign).
  • name string — ≤ 120 characters
  • body string — ≤ 480 characters
  • audience all | booked | list — all = everyone who agreed to texts from the company; booked = those of them who booked one of trip_ids; list = those of them on the imported list list_id.
  • trip_ids string[] — With audience 'booked': trip ids from list_trips.
  • list_id string — With audience 'list': an imported text list's id (from sms_audience_summary).
Returns
summary, entity_type, entity_id, campaign_id, preview, segments_each, changed.

send_sms_campaign

Send a text campaign

Sensitive write

Texts a campaign to its audience through Treka's text sender. It can't be undone. Texts reach only people who agreed to marketing texts from this company (at checkout, or on a list the company imported and confirmed they agreed), never anyone who replied STOP, and never between 9pm and 8am in the company's time zone (all of North America when it has none) — a campaign started then waits until 8am. Every text ends with the company name and "Reply STOP to opt out", and the company's monthly texting limit applies. First call sms_audience_summary with the campaign's audience and show the user the message (with the footer) and the recipient count; pass that count as expected_recipients (refused if it changed). Drafts only. At most 1 text campaign a day per company and 1000 recipients per campaign; larger sends go from the Treka portal. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show the exact message, the audience and the number of people it will text.

Inputs
  • campaign_id string, required — The text campaign's id (from list_sms_campaigns or create_sms_campaign).
  • expected_recipients integer, required — The exact number of people (from sms_audience_summary) the user was shown and approved. The call is refused, with the current number, if it differs.
Returns
summary, entity_type, entity_id, status (sending, sent or scheduled for 8am because of quiet hours), recipients, until, note.

import_sms_contacts

Import text contacts

Sensitive write

Changes Treka: records that people the user provided agreed to marketing texts from the company, onto an imported text list — a new list (list_name) or an existing one (list_id) — up to 5000 per call. Phone numbers are normalised (US/Canada numbers without +1 are accepted); invalid and duplicate numbers are counted, not guessed. A number that ever replied STOP or that the company removed is never re-added (counted as previously_opted_out), and an existing consent is kept as it is. Only for people who really agreed to texts from this business: consent_confirmed must be true, meaning the user confirmed it in this conversation, and consent_source must say where they agreed; both are stored with each person. Treka's toll-free number is shared by every company, so never import bought, scraped or guessed lists. Nobody is texted. At most 10 imports a day per company. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show how many numbers, which list, where they agreed, and ask the user to confirm "These people agreed to receive text messages from my business."

Inputs
  • list_name string — Name for a new text list. ≤ 120 characters
  • list_id string — Add to this existing text list instead (id from sms_audience_summary).
  • consent_source string, required — Where these people agreed to texts, e.g. 'Paper sign-up sheet at the shop, summer 2026'. ≤ 300 characters
  • contacts object[], required — Up to 5000 rows of {phone, name?, email?}.
  • consent_confirmed boolean, required — true only if the user confirmed these people agreed to receive text messages from their business.
Returns
summary, entity_type, entity_id, list_id, list_name, added, already_on_list, previously_opted_out, invalid, duplicates.

create_trip

Create a trip

Write

Changes Treka: creates a new trip as an UNPUBLISHED draft (guests can't see or book it). Price is per person in the company currency, whole units. Photos are added in the Treka portal; publish with set_trip_published once it has everything a live trip needs.

Inputs
  • title string, required — ≤ 150 characters
  • category Mountaineering | Hiking | Trekking | Trekking with Lodging | Rafting | Skiing | Climbing | Backpacking | Biking | Private Trips | Fishing | Hunting | Cultural Tours | Snowmobiling | Horseback Riding | Skill Courses | Kayaking | ATV Tours | Other — The activity (default Other).
  • location string, required — Where it runs, e.g. 'Moab, UT'. ≤ 200 characters
  • region string — Wider region, e.g. 'Utah' (default: the location). ≤ 120 characters
  • duration string, required — e.g. '4 hours', '3 days' ≤ 100 characters
  • price number, required — Per person, whole currency units.
  • booking_style scheduled | open_range | custom_request — scheduled = set departures (default); open_range = guests pick any day in a season; custom_request = guests ask for dates.
  • subtitle string — ≤ 250 characters
  • description string — ≤ 20000 characters
  • meeting_point string — ≤ 500 characters
  • difficulty Easy | Moderate | Challenging | Expert — Default Moderate.
  • max_group_size integer — Default 10. 1–10000
  • min_group_size integer — Default 1. 1–10000
  • included string[]
  • not_included string[]
  • requirements string[]
Returns
summary, entity_type, entity_id, trip_id, slug, is_published (false), still_needed[].

duplicate_trip

Duplicate a trip

Write

Changes Treka: copies one of the company's trips into a new UNPUBLISHED draft, like Duplicate in the portal — details, booking and payment setup, photos, price tiers, checklists and rental gear. Departures are copied only with copy_departures=true (with fresh seats); bookings and reviews never are.

Inputs
  • trip_id string, required — The trip's id (from list_trips).
  • title string — The copy's title (default: the original's, plus ' (Copy)'). ≤ 150 characters
  • copy_departures boolean — Also copy the trip's departures (default false).
Returns
summary, entity_type, entity_id, trip_id, slug, not_copied[].

set_trip_published

Publish or unpublish a trip

Sensitive write

Changes Treka's public site: published=true puts a trip live on the company's website and booking pages; false takes it down (existing bookings stay). Publishing is refused, with what's missing, unless the trip has a title, description, location, duration, a price above 0, a group size and at least one photo — the portal's own check. A trip with no dates yet becomes bookable any day for a year (the portal's default), which the operator can change. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation.

Inputs
  • trip_id string, required — The trip's id (from list_trips).
  • published boolean, required — true = publish, false = unpublish.
Returns
summary, entity_type, entity_id, is_published, default_trip_type_applied, missing[] (when refused).

assign_guide

Assign a guide to a departure

Sensitive write

Changes Treka, and notifies the guide: puts a guide on a departure as lead or assistant (pending until they confirm), and Treka emails them — and texts them if they get guide texts — to confirm or decline, as the portal does. Refused if the guide isn't qualified to lead this activity (for role lead), is already on it, or is on another trip those days. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show the guide, the role and the departure.

Inputs
  • departure_id string, required — The departure's id (from list_departures).
  • guide_id string, required — The guide's id (from list_guides).
  • role lead | assistant — Default: lead if they're qualified to lead this activity, else assistant.
Returns
summary, entity_type, entity_id, assignment_id, role, status (pending), notified (true/false).

unassign_guide

Remove a guide from a departure

Sensitive write

Changes Treka: takes a guide off a departure, as removing them in the portal does. Treka doesn't message the guide; tell them yourself. 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).
  • guide_id string, required — The guide's id (from list_guides).
Returns
summary, entity_type, entity_id.

create_closure

Add a closure

Write

Changes Treka: closes the company on a day or a run of days (a blackout). Whole-day closures take those dates off sale and no departure can be added on them; existing departures and bookings are kept. Give start_time and end_time for a part-day closure on one day. Times are the company's local time.

Inputs
  • start_date string, required — YYYY-MM-DD
  • end_date string — YYYY-MM-DD, for a closure over several days (whole days only).
  • start_time string — HH:MM (24h), part-day closures only.
  • end_time string — HH:MM (24h), after start_time.
  • title string — e.g. 'Staff training'. ≤ 120 characters
Returns
summary, entity_type, entity_id, closure_id, departures_on_those_days.

delete_closure

Delete a closure

Sensitive write

Changes Treka: removes a closure, so those days can be booked again. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation.

Inputs
  • closure_id string, required — The closure's id (from list_closures).
Returns
summary, entity_type, entity_id.

update_website_text

Edit website text

Sensitive write

Changes Treka, and with publish=true the company's public website: overwrites the website's headline, intro line, about text, main button label or hero badge (plain text; the about text may use simple Markdown). By default the change is saved as a draft the operator reviews and publishes in the website builder; publish=true puts it live at once. Layout, design, pages, domains and code stay in the portal. Sensitive: before calling, show the user exactly what will happen and get their explicit approval in this conversation. Show the exact new text.

Inputs
  • headline string — ≤ 120 characters
  • intro string — The line under the headline. ≤ 400 characters
  • about string — ≤ 5000 characters
  • cta_label string — Main button, e.g. 'Book a Trip'. ≤ 40 characters
  • hero_badge string — ≤ 80 characters
  • publish boolean — true = live now; false = save as a draft to publish in the portal (default).
Returns
summary, entity_type, entity_id, published (true/false), fields[], note.

update_rental_item

Change rental gear

Write

Changes Treka: overwrites a rental item's price, half-day price (per-day items only), deposit, or switches it on/off for rent. Amounts are whole currency units (decimals allowed), not cents. Stock, sizes and photos stay in the portal.

Inputs
  • rental_id string, required — The item's id (from list_rentals).
  • price number — Rental price. 0–100000
  • half_day_price number — Half-day price; 0 removes it. 0–100000
  • deposit number — Deposit; 0 = none. 0–100000
  • rentable boolean — false stops new rentals of it.
Returns
summary, entity_type, entity_id, rental (price, half_day_price, deposit, price_type, rentable).

Limits

Data handling and safety

Treka — book outdoor trips

A second, public server for travellers: they ask their AI assistant to find a guided outdoor trip, check dates and prices, and hold spots. No Treka account or sign-in is needed. Only trips whose operator turned on AI-assistant booking appear, at the same price as the operator's own Treka booking page.

Endpoint

https://treka.app/api/book/mcp Every tool the Treka MCP server offers
Tool What it does Type Annotations
Search outdoor trips Read readOnlyHint: true destructiveHint: false openWorldHint: false
Trip details Read readOnlyHint: true destructiveHint: false openWorldHint: false
Check availability and price Read readOnlyHint: true destructiveHint: false openWorldHint: false
Hold spots and get a payment link Write readOnlyHint: false destructiveHint: false openWorldHint: true

search_trips

Search outdoor trips

Read

Read-only. Find guided outdoor trips (tours, lessons, rentals with a guide) that operators offer on Treka, by place, activity, dates, party size and price. Only trips their operator chose to show in AI assistants appear. Returns each trip's operator, short description, location, price from, duration, rating and next open departures, and the trip's public Treka page. Results are paged; ask again with page for more.

Inputs
  • query string — Words to match: activity, trip name or operator (e.g. 'kayak', 'via ferrata'). ≤ 120 characters
  • location string — Place name to match (town, region, lake, park), e.g. 'Lake Tahoe'. ≤ 120 characters
  • latitude number — -90–90
  • longitude number — -180–180
  • radius_km number — With latitude/longitude: how far to look (default 50 km). 1–300
  • category string — Activity category, e.g. Hiking, Kayaking, Climbing, Rafting, Skiing. ≤ 60 characters
  • date string — A single day the guest wants to go (YYYY-MM-DD).
  • date_from string — Earliest day (with date_to for a range) (YYYY-MM-DD).
  • date_to string — Latest day (YYYY-MM-DD).
  • party_size integer — How many people are going. 1–50
  • max_price number — Highest price per person, in the trip's currency.
  • language string — A language the guest wants the trip in (e.g. 'Spanish'). Matches trips that mention it in their details. ≤ 40 characters
  • page integer — Results page (default 1). 1–20
  • limit integer — Trips per page (default 10, at most 25).
Returns
trips[]: trip_id, title, operator, short_description, location, region, category, duration, price_from (per person), currency, rating, review_count, next_departures[] (departure_id, start, spots_left), url; page, has_more.

get_trip

Trip details

Read

Read-only. One trip's full public details: description, what's included and not, requirements, meeting point, cancellation policy, photos, a reviews summary and upcoming departures with spots left.

Inputs
  • trip_id string, required — The trip's id (from search_trips).
Returns
trip_id, title, operator, description, location, meeting_point, duration, difficulty, group size, price_from, currency, included[], not_included[], requirements[], cancellation_policy, photos[], reviews (rating, count, recent[] with first name, rating, text), upcoming_departures[] (departure_id, start, end, spots_left), bookable_here, url.

check_availability

Check availability and price

Read

Read-only. Departures of one trip in a date range with spots left, and the exact price for the party: price per person, booking fee, total, what is due now and any balance later, in the trip's currency. The same price as the operator's own Treka booking page.

Inputs
  • trip_id string, required — The trip's id (from search_trips).
  • party_size integer, required — How many people are going. 1–50
  • date_from string — First day to check, default today (YYYY-MM-DD).
  • date_to string — Last day, default 30 days later (at most 62 days) (YYYY-MM-DD).
Returns
trip_id, party_size, currency, departures[]: departure_id, start, end, spots_left, bookable, reason (when not), price (per_person, subtotal, booking_fee, total, due_now, balance_later, balance_due_date).

start_booking

Hold spots and get a payment link

Write

Creates a booking hold, not a charge: reserves the spots on one departure for the guest and returns a secure Treka payment link. The guest pays on Treka's own checkout page (card, Apple Pay, Google Pay); nothing is charged here and no card details are asked for. The hold lasts about 30 minutes; unpaid, it lapses and the spots are released. Before calling, confirm the trip, date, party size, total, the cancellation policy and the guest's name and email with the guest, and get their explicit OK. Then share the payment link and say the booking is confirmed only once they pay.

Inputs
  • trip_id string, required — The trip's id (from search_trips).
  • departure_id string, required — The departure's id (from check_availability).
  • party_size integer, required — How many people are going. 1–50
  • guest_name string, required — Lead guest's full name. ≤ 100 characters
  • guest_email string, required — Lead guest's email (the confirmation goes here). ≤ 254 characters
  • guest_phone string — Lead guest's phone (optional). ≤ 30 characters
  • notes string — Anything the guest wants the operator to know (optional). ≤ 500 characters
  • guest_confirmed boolean, required — true only after the guest explicitly said yes to these details.
Returns
status (held, or book_on_website with booking_url when the trip needs details only its page can collect), booking_number, payment_url, hold_expires_at, trip, start, party_size, currency, total, due_now, balance_later, guest (name, email), next_steps.

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