Developers

Treckme MCP server

Connect ChatGPT, Claude, Codex or an agent you build to a Treckme account. The server exposes bookings, availability, prices, reports and day-to-day operations as Model Context Protocol tools, with access the property owner controls.

Quickstart

There is one address for every client:

https://mcp.treckme.com/mcp
  1. In Treckme, open Connect your AI and create an API key. Choose View only while you are testing.
  2. Call the server with the key as a bearer token.
  3. Paste the instructions for your agent into your system prompt.
curl -X POST https://mcp.treckme.com/mcp \
  -H "Authorization: Bearer $TRECKME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"overview","arguments":{}}}'

The server is stateless: one JSON-RPC request per POST, a JSON answer, no session to open or keep alive.

Connect a client

Apps with a sign-in flow need no key: they send the owner to Treckme to approve the connection. Everything else uses an API key.

Plugins → + → Add custom MCP server. Paste the address and sign in to Treckme when asked. Making changes needs a Business, Enterprise or Edu plan; other plans can look things up only.

https://mcp.treckme.com/mcp

Authentication

API key

Created by the owner under Connect your AI and shown once. Send it on every request as Authorization: Bearer tmk_key_…. Use one key per tool so a key can be removed without breaking the others.

OAuth 2.1

For apps that sign the owner in. A request without a token is answered with 401 and a WWW-Authenticate header that points to the protected resource metadata, from which a client discovers the authorization server. The flow is authorization code with PKCE (S256). Clients are identified by a Client ID Metadata Document, or register themselves through dynamic client registration. Access tokens last one hour; refresh tokens rotate on every use.

Either way, the owner chooses the access level and the properties, and can end the connection at any time.

Access levels

LevelAllows
View onlyLooking things up. Write tools are not listed to the connection at all, and the model is told how the owner can allow changes.
Day-to-day workAlso creating and changing bookings, setting prices, checking guests in and out, adding orders, tasks and expenses.
EverythingAlso cancelling bookings, recording payments, marking no-shows, and changing the team, property details and booking-site links.

The owner can change a connection's level at any time under Connect your AI, without connecting again. The app may need a refresh before it lists the new tools.

A connection can be limited to some properties. It then gets the eleven main tools for those properties, without find_action and run_action.

Approval before changes

No tool changes anything on its first call. A tool that creates, changes, cancels or sends something answers first with a preview of exactly what would happen (the bill, the dates before and after, what the guest will be sent) and a confirm code. Nothing is saved. The change is made only when the same call is sent again with that code.

{ "name": "update_booking", "arguments": { "booking_id": 1639, "check_in": "2026-12-25", "check_out": "2026-12-29" } }

Would change booking #1639 Asha Verma (check_in, check_out).
Now: 2026-12-23→2026-12-27 (4n). After: 2026-12-25→2026-12-29 (4n)
Family Room 4200/night
nights 4 | rooms 16800 | total 16800 | paid 5000 | balance 11800
Nothing will be sent to the guest.
NOT DONE YET, nothing is saved. Show the user the above and ask if you should go ahead. Only after they say yes, call update_booking again with the same arguments and confirm: "7c41e09ab2".
{ "name": "update_booking", "arguments": { "booking_id": 1639, "check_in": "2026-12-25", "check_out": "2026-12-29", "confirm": "7c41e09ab2" } }

Updated booking #1639: Asha Verma, 2026-12-25→2026-12-29, Upcoming
  • The code is tied to the connection, the tool and every argument. Change a date or a price and the old code is refused.
  • A code works for about 15 minutes, then a new preview is needed.
  • This applies to create_booking, update_booking, booking_action, set_rates and every run_action that changes something. Lookups are always one call.
  • An agent that runs with no person present still makes both calls. The preview is where it can check its own work.

Instructions for your agent

Paste this into your agent's system prompt. It tells the model how Treckme works and how to reach an answer in the fewest calls, which is what keeps token cost down. ChatGPT, Claude, Claude Code and Codex receive a short version from the server automatically.

You can work on a Treckme account (homestays, hotels, resorts) through the Treckme MCP server at https://mcp.treckme.com/mcp.

Conventions
- Dates are YYYY-MM-DD in India time. check_out is the day the guest leaves. Amounts are in INR.
- A property can be given by name or code, a booking by its id. If a name is unclear the tool returns the choices: ask the user, never guess.
- Room ids come from overview or check_availability. Do not invent ids.

Use as few calls as possible
- Start with overview once: it gives the properties, room ids and today's picture. Do not call it again in the same conversation.
- One question usually needs one tool: search_bookings (find or list bookings, also who owes money with status "unpaid"), get_booking (one booking; add include ["bill"] for the itemised bill), check_availability (free rooms and alternatives), get_rates (nightly prices), finance_report (earnings, expenses, occupancy; use "by" instead of several calls), find_guest (a guest's history).
- For anything else (expenses, tasks, food menu and orders, team, property details, QR codes, guest messages, booking-site calendars, travel guides) call find_action once with what you want to do, then run_action with the name and input it returned.
- Results are short text tables. Read them as they are; do not ask for the same data again in another form.

Before changing anything
- Changes are real, and some email or WhatsApp the guest.
- Every tool that changes something answers its first call with a preview and a confirm code, and saves nothing. Show the preview to the user in your own words and ask. Only after a clear yes, call the same tool again with exactly the same arguments plus confirm set to that code.
- If the user changes their mind about any detail, call without confirm again to get a new preview and a new code. A code only works for the exact call it was given for, for about 15 minutes.
- Never invent a confirm code, and never send confirm on a first call.
- booking_action covers check-in, check-out, extending a stay, sending the invoice, cancelling, recording a cash payment and marking a no-show. Cancelling and recording a payment cannot be undone.
- Never pass a guest email the user did not give you.

When something is refused
- A refusal says why (for example the room is taken, or the booking is already checked out). Tell the user that reason and offer the alternatives the tool returned.
- "This connection is not allowed" means the owner limited what this connection may do. Say so; do not look for another way to do it.

Results and errors

Results are compact text, not JSON: one line per row under a single header, with empty fields left out. A typical result is 50 to 250 tokens. Dates are YYYY-MM-DD in India time, stays are written check-in→check-out, and amounts are in INR.

4 bookings, 2026-11-22 to 2026-12-22; total 24400, paid 0.
id | guest | mobile | property | rooms | stay | status | total | paid | source
1180 | Ananya Rao | 9812345678 | P4 | Cedar Villa | 2026-11-20→2026-11-23 (3n) | Upcoming | 9000 | 0 | google
1192 | Rahul Verma | 9000000101 | P4 | Cedar Villa | 2026-11-25→2026-11-27 (2n) | Upcoming | 9000 | 0 | direct

A tool that cannot do what was asked returns a normal result with isError: true and a sentence the model can act on. An unclear property name returns the choices:

Error: "man" could mean more than one property: Mandukya Resort (P4), Pine Cottage, Manali (P5). Ask the user which one.
CodeMeaning
HTTP 401No token, or it is wrong, expired or removed.
HTTP 429More than 120 calls in a minute on one connection.
-32602Unknown tool. The connection may not have access to it.
-32022Unsupported protocol version. The supported ones are in the error.

Tool reference

Thirteen tools. The list costs a model about 2,900 tokens, or about 1,000 for a View only connection. Less common actions are reached through find_action and run_action instead of being listed.

overviewView only

Properties with their rooms (room ids, capacity, base price) and one day at a glance: occupancy, arrivals, departures, new bookings, cancellations, waiting orders, open tasks, expenses. Call it first, once.

  • propertystringProperty name or code. Leave out for all properties.
  • datedate (YYYY-MM-DD)The day to describe. Default today.
{ "name": "overview", "arguments": { "property": "Pine Cottage" } }

2026-11-22 (India time). Amounts in INR. Stays are check-in→check-out.
PROPERTIES (code name: #room_id rooms)
P5 Pine Cottage, Manali: #50 Family loft (sleeps 4, base 4800); #49 Pine room (sleeps 2, base 3300)
DAY
rooms occupied 1/2 | arrivals 1 | departures 0 | new bookings 0 | cancellations 0 | food orders waiting 0 | service orders waiting 0 | open tasks 2 | expenses 0 | unpaid bookings 1 owing 9000
ARRIVALS
id | guest | mobile | property | rooms | stay | status | total | paid | source
1190 | Priya Nair | 9000000102 | P5 | Pine room | 2026-11-22→2026-11-24 (2n) | Upcoming | 9000 | 0 | google

search_bookingsView only

Find bookings by guest name, mobile or booking id, and by dates, status and property. With no dates and no query it lists stays from today for 30 days.

  • querystringGuest name, mobile digits, or booking id.
  • propertystringProperty name or code. Leave out for all properties.
  • fromdate (YYYY-MM-DD)Start of the range.
  • todate (YYYY-MM-DD)End of the range.
  • dates_arestay | check_in | check_out | createdWhat from and to filter. stay means any night in the range. Default stay.
  • statusupcoming | in_house | completed | cancelled | no_show | unpaidunpaid lists bookings with a balance due, across all dates.
  • limitinteger, 1 to 50Rows to return. Default 10.
  • cursorstringThe "next cursor" from a previous result, for the next page.

get_bookingView only

One booking in full: guest, dates, rooms, amounts, notes.

  • booking_idinteger · requiredThe booking id.
  • includearray of bill | staybill adds the itemised bill with GST and balance. stay adds check-in and check-out progress, guest ID documents and messages sent to the guest.

check_availabilityView only

Rooms free between two dates, in one property or all. For rooms that are taken it says which booking is in the way, the nearest dates that fit, and whether changing rooms mid-stay would work.

  • check_indate (YYYY-MM-DD) · requiredFirst night.
  • check_outdate (YYYY-MM-DD) · requiredThe day the guest leaves.
  • propertystringProperty name or code. Leave out for all properties.
  • roomstringRoom name, when a specific room is wanted.
{ "name": "check_availability", "arguments": { "check_in": "2026-11-21", "check_out": "2026-11-24", "property": "P4" } }

2026-11-21→2026-11-24 (3n)
P4 Mandukya Resort — no room free for the whole stay
  TAKEN #46 Cedar Villa; by #1180 Ananya 2026-11-20→2026-11-23; free 2026-11-23→2026-11-24; nearest same length 2026-11-26→2026-11-29

get_ratesView only

Nightly prices for a range of nights. These are what bookings are billed. Days with the same price are grouped.

  • fromdate (YYYY-MM-DD) · requiredFirst night.
  • todate (YYYY-MM-DD) · requiredLast night, inclusive.
  • room_idsarray of integerRooms to price. Up to 20.
  • propertystringProperty name or code, for all of its rooms when room_ids is left out.

finance_reportView only

Totals for a period: billed earnings (rooms, food, services, GST) from checked-out stays, expenses, what is left, and occupancy.

  • fromdate (YYYY-MM-DD) · requiredStart of the period.
  • todate (YYYY-MM-DD) · requiredEnd of the period. Up to two years.
  • propertystringProperty name or code. Leave out for all properties.
  • bytotal | day | month | propertyBreak the totals down. day covers at most 62 days. Default total.

find_guestView only

A guest's history by name or mobile: contact, number of stays, last stay, total spent, loyalty points.

  • querystring · requiredName or mobile digits.
  • limitinteger, 1 to 25Default 10.

create_bookingDay-to-day work

Create a booking in one property. Billed at the rooms' nightly prices unless a price is given. Refused if a room is taken. With guest_email the guest is emailed a confirmation.

  • guest_namestring · requiredIn Latin letters.
  • guest_mobilestring · requiredDigits, without the country code.
  • check_indate (YYYY-MM-DD) · requiredFirst night.
  • check_outdate (YYYY-MM-DD) · requiredThe day the guest leaves.
  • roomsarray of object · requiredEach: room_id (required), adults (default 1), kids (default 0), price_per_night (only for a special price).
  • country_codestringDefault "91".
  • guest_emailstringOnly if the user gave one.
  • amount_paidnumberAdvance already received.
  • sourcegoogle | youtube | booking.com | airbnb | instagram | makemytrip | goibibo | agoda | expedia | vrboWhere the booking came from. Leave out for a direct booking.
  • notesstringNotes on the booking.
  • mealsarray of breakfast | lunch | dinnerMeals included in the price.
  • confirmstringThe code from the preview. Leave out on the first call; see Approval before changes.
{ "name": "create_booking", "arguments": { "guest_name": "Ravi Kumar", "guest_mobile": "9000000199", "check_in": "2026-12-15", "check_out": "2026-12-17", "rooms": [{ "room_id": 51, "adults": 2 }] } }

Would create a booking: Ravi Kumar, +91 9000000199, Lakeview Stay, 2026-12-15→2026-12-17. Rooms are free.
Suite 1 5500/night
nights 2 | rooms 11000 | total 11000 | paid 0 | balance 11000
Nothing will be sent to the guest.
NOT DONE YET, nothing is saved. Show the user the above and ask if you should go ahead. Only after they say yes, call create_booking again with the same arguments and confirm: "3f9a1c07be".

update_bookingDay-to-day work

Change a booking. Pass only what changes. Refused once it is checking out, checked out, cancelled or a no-show. The guest is emailed if the booking has an email.

  • booking_idinteger · requiredThe booking to change.
  • guest_name, guest_mobile, country_code, guest_emailstringGuest details.
  • check_in, check_outdate (YYYY-MM-DD)New dates.
  • room_idsarray of integerThe complete new set of rooms.
  • room_guestsarray of objectEach: room_id, adults, kids. Only rooms whose guest count changes.
  • price_per_nightarray of objectEach: room_id, price.
  • amount_paidnumberTotal paid so far, not an addition.
  • notesstringNotes on the booking.
  • mealsarray of breakfast | lunch | dinnerThe complete list of meals included.
  • confirmstringThe code from the preview. Leave out on the first call; see Approval before changes.

booking_actionDay-to-day work

One step on a booking. Each works only from certain statuses; a refusal says why. cancel, record_cash_payment, mark_no_show and send_invoice need Everything access.

  • booking_idinteger · requiredThe booking.
  • actionstart_checkin | confirm_arrival | start_checkout | confirm_departure | extend_stay | mark_no_show | cancel | record_cash_payment | send_invoice · requiredstart_checkin, start_checkout, record_cash_payment and send_invoice message the guest on WhatsApp. cancel emails the guest. record_cash_payment cannot be undone.
  • reasonstringRequired for mark_no_show.
  • new_check_outdate (YYYY-MM-DD)Required for extend_stay.
  • override_documentsbooleanconfirm_arrival only: arrive although guest ID documents are incomplete. Needs a reason.
  • confirmstringThe code from the preview. Leave out on the first call; see Approval before changes.

set_ratesDay-to-day work

Set the nightly price of rooms for a range of nights. New bookings on those nights are billed at it; existing bookings keep theirs.

  • room_idsarray of integer · requiredUp to 20 rooms.
  • fromdate (YYYY-MM-DD) · requiredFirst night.
  • todate (YYYY-MM-DD) · requiredLast night, inclusive. Up to one year.
  • pricenumberPer night, for any number of guests.
  • prices_by_guestsarray of objectEach: guests, price. Use instead of price when it depends on the number of guests.
  • confirmstringThe code from the preview. Leave out on the first call; see Approval before changes.

find_actionView only

Look up a less common action: expenses, tasks and staff checklists, food menu and orders, paid services, team members, property and room details, QR codes, guest messages, booking-site calendars, travel guides, automations. Returns the matching actions with their inputs. Not offered to connections limited to some properties.

  • querystringWhat you want to do, for example "add an expense". Leave out to list every action name.
{ "name": "find_action", "arguments": { "query": "show expenses" } }

list_expenses: List recent expenses for the user's properties. Optionally filter by property code and date range.
  input:
    propertyCode?: string — Filter by property code (e.g. P1) or property name
    dateFrom?: string — Start date in YYYY-MM-DD format
    dateTo?: string — End date in YYYY-MM-DD format
    limit?: number — Max number of expenses to return (default 10)
Next: call run_action, e.g. {"action": "list_expenses", "input": {}} with the inputs above.

run_actionDepends on the action

Run an action that find_action returned. Lookups run at once; an action that changes something answers with a preview first. Lookups need View only; most changes need Day-to-day work; changes to the team, the property and booking-site links need Everything.

  • actionstring · requiredThe name from find_action.
  • inputobjectThe action's input, as find_action described it.
  • confirmstringOnly for actions that change something: the code from the preview.

Limits and protocol

  • 120 calls a minute per connection.
  • A result is cut at 9,000 characters and says how to narrow the request.
  • Changes are real, some message the guest, and every change is listed for the owner under Connect your AI.
  • MCP revision 2026-07-28 and the 2025 revisions are served on the same address. Transport is HTTP POST with JSON answers; there are no streams, resources or prompts.