Add documentation
This commit is contained in:
85
MCP.md
85
MCP.md
@@ -1,6 +1,8 @@
|
|||||||
# MCP Integration
|
# MCP Integration
|
||||||
|
|
||||||
TREK includes a built-in [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that lets AI assistants — such as Claude Desktop, Cursor, or any MCP-compatible client — read and modify your trip data through a structured API.
|
TREK includes a built-in [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that lets AI
|
||||||
|
assistants — such as Claude Desktop, Cursor, or any MCP-compatible client — read and modify your trip data through a
|
||||||
|
structured API.
|
||||||
|
|
||||||
> **Note:** MCP is an addon that must be enabled by your TREK administrator before it becomes available.
|
> **Note:** MCP is an addon that must be enabled by your TREK administrator before it becomes available.
|
||||||
|
|
||||||
@@ -18,7 +20,8 @@ TREK includes a built-in [Model Context Protocol](https://modelcontextprotocol.i
|
|||||||
|
|
||||||
### 1. Enable the MCP addon (admin)
|
### 1. Enable the MCP addon (admin)
|
||||||
|
|
||||||
An administrator must first enable the MCP addon from the **Admin Panel > Addons** page. Until enabled, the `/mcp` endpoint returns `403 Forbidden` and the MCP section does not appear in user settings.
|
An administrator must first enable the MCP addon from the **Admin Panel > Addons** page. Until enabled, the `/mcp`
|
||||||
|
endpoint returns `403 Forbidden` and the MCP section does not appear in user settings.
|
||||||
|
|
||||||
### 2. Create an API token
|
### 2. Create an API token
|
||||||
|
|
||||||
@@ -32,7 +35,8 @@ Each user can create up to **10 tokens**.
|
|||||||
|
|
||||||
### 3. Configure your MCP client
|
### 3. Configure your MCP client
|
||||||
|
|
||||||
The Settings page shows a ready-to-copy client configuration snippet. For **Claude Desktop**, add the following to your `claude_desktop_config.json`:
|
The Settings page shows a ready-to-copy client configuration snippet. For **Claude Desktop**, add the following to your
|
||||||
|
`claude_desktop_config.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -57,7 +61,7 @@ The Settings page shows a ready-to-copy client configuration snippet. For **Clau
|
|||||||
## Limitations & Important Notes
|
## Limitations & Important Notes
|
||||||
|
|
||||||
| Limitation | Details |
|
| Limitation | Details |
|
||||||
|---|---|
|
|-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| **Admin activation required** | The MCP addon must be enabled by an admin before any user can access it. |
|
| **Admin activation required** | The MCP addon must be enabled by an admin before any user can access it. |
|
||||||
| **Per-user scoping** | Each MCP session is scoped to the authenticated user. You can only access trips you own or are a member of. |
|
| **Per-user scoping** | Each MCP session is scoped to the authenticated user. You can only access trips you own or are a member of. |
|
||||||
| **No image uploads** | Cover images cannot be set through MCP. Use the web UI to upload trip covers. |
|
| **No image uploads** | Cover images cannot be set through MCP. Use the web UI to upload trip covers. |
|
||||||
@@ -73,10 +77,11 @@ The Settings page shows a ready-to-copy client configuration snippet. For **Clau
|
|||||||
|
|
||||||
## Resources (read-only)
|
## Resources (read-only)
|
||||||
|
|
||||||
Resources provide read-only access to your TREK data. MCP clients can read these to understand the current state before making changes.
|
Resources provide read-only access to your TREK data. MCP clients can read these to understand the current state before
|
||||||
|
making changes.
|
||||||
|
|
||||||
| Resource | URI | Description |
|
| Resource | URI | Description |
|
||||||
|---|---|---|
|
|-------------------|--------------------------------------------|-----------------------------------------------------------|
|
||||||
| Trips | `trek://trips` | All trips you own or are a member of |
|
| Trips | `trek://trips` | All trips you own or are a member of |
|
||||||
| Trip Detail | `trek://trips/{tripId}` | Single trip with metadata and member count |
|
| Trip Detail | `trek://trips/{tripId}` | Single trip with metadata and member count |
|
||||||
| Days | `trek://trips/{tripId}/days` | Days of a trip with their assigned places |
|
| Days | `trek://trips/{tripId}/days` | Days of a trip with their assigned places |
|
||||||
@@ -96,18 +101,19 @@ Resources provide read-only access to your TREK data. MCP clients can read these
|
|||||||
|
|
||||||
## Tools (read-write)
|
## Tools (read-write)
|
||||||
|
|
||||||
TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a starting point — it returns everything about a trip in a single call.
|
TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a starting point — it returns everything
|
||||||
|
about a trip in a single call.
|
||||||
|
|
||||||
### Trip Summary
|
### Trip Summary
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `get_trip_summary` | Full denormalized snapshot of a trip: metadata, members, days with assignments and notes, accommodations, budget totals, packing stats, reservations, and collab notes. Use this as your context loader. |
|
| `get_trip_summary` | Full denormalized snapshot of a trip: metadata, members, days with assignments and notes, accommodations, budget totals, packing stats, reservations, and collab notes. Use this as your context loader. |
|
||||||
|
|
||||||
### Trips
|
### Trips
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|---------------|---------------------------------------------------------------------------------------------|
|
||||||
| `list_trips` | List all trips you own or are a member of. Supports `include_archived` flag. |
|
| `list_trips` | List all trips you own or are a member of. Supports `include_archived` flag. |
|
||||||
| `create_trip` | Create a new trip with title, dates, currency. Days are auto-generated from the date range. |
|
| `create_trip` | Create a new trip with title, dates, currency. Days are auto-generated from the date range. |
|
||||||
| `update_trip` | Update a trip's title, description, dates, or currency. |
|
| `update_trip` | Update a trip's title, description, dates, or currency. |
|
||||||
@@ -116,7 +122,7 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Places
|
### Places
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|----------------|-----------------------------------------------------------------------------------|
|
||||||
| `create_place` | Add a place/POI with name, coordinates, address, category, notes, website, phone. |
|
| `create_place` | Add a place/POI with name, coordinates, address, category, notes, website, phone. |
|
||||||
| `update_place` | Update any field of an existing place. |
|
| `update_place` | Update any field of an existing place. |
|
||||||
| `delete_place` | Remove a place from a trip. |
|
| `delete_place` | Remove a place from a trip. |
|
||||||
@@ -124,7 +130,7 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Day Planning
|
### Day Planning
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|---------------------------|-------------------------------------------------------------------------------|
|
||||||
| `assign_place_to_day` | Pin a place to a specific day in the itinerary. |
|
| `assign_place_to_day` | Pin a place to a specific day in the itinerary. |
|
||||||
| `unassign_place` | Remove a place assignment from a day. |
|
| `unassign_place` | Remove a place assignment from a day. |
|
||||||
| `reorder_day_assignments` | Reorder places within a day by providing assignment IDs in the desired order. |
|
| `reorder_day_assignments` | Reorder places within a day by providing assignment IDs in the desired order. |
|
||||||
@@ -134,7 +140,7 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Reservations
|
### Reservations
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `create_reservation` | Create a pending reservation. Supports flights, hotels, restaurants, trains, cars, cruises, events, tours, activities, and other types. Hotels can be linked to places and check-in/out days. |
|
| `create_reservation` | Create a pending reservation. Supports flights, hotels, restaurants, trains, cars, cruises, events, tours, activities, and other types. Hotels can be linked to places and check-in/out days. |
|
||||||
| `update_reservation` | Update any field including status (`pending` / `confirmed` / `cancelled`). |
|
| `update_reservation` | Update any field including status (`pending` / `confirmed` / `cancelled`). |
|
||||||
| `delete_reservation` | Delete a reservation and its linked accommodation record if applicable. |
|
| `delete_reservation` | Delete a reservation and its linked accommodation record if applicable. |
|
||||||
@@ -143,7 +149,7 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Budget
|
### Budget
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|----------------------|--------------------------------------------------------------|
|
||||||
| `create_budget_item` | Add an expense with name, category, and price. |
|
| `create_budget_item` | Add an expense with name, category, and price. |
|
||||||
| `update_budget_item` | Update an expense's details, split (persons/days), or notes. |
|
| `update_budget_item` | Update an expense's details, split (persons/days), or notes. |
|
||||||
| `delete_budget_item` | Remove a budget item. |
|
| `delete_budget_item` | Remove a budget item. |
|
||||||
@@ -151,7 +157,7 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Packing
|
### Packing
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|-----------------------|--------------------------------------------------------------|
|
||||||
| `create_packing_item` | Add an item to the packing checklist with optional category. |
|
| `create_packing_item` | Add an item to the packing checklist with optional category. |
|
||||||
| `update_packing_item` | Rename an item or change its category. |
|
| `update_packing_item` | Rename an item or change its category. |
|
||||||
| `toggle_packing_item` | Check or uncheck a packing item. |
|
| `toggle_packing_item` | Check or uncheck a packing item. |
|
||||||
@@ -160,7 +166,7 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Day Notes
|
### Day Notes
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|-------------------|-----------------------------------------------------------------------|
|
||||||
| `create_day_note` | Add a note to a specific day with optional time label and emoji icon. |
|
| `create_day_note` | Add a note to a specific day with optional time label and emoji icon. |
|
||||||
| `update_day_note` | Edit a day note's text, time, or icon. |
|
| `update_day_note` | Edit a day note's text, time, or icon. |
|
||||||
| `delete_day_note` | Remove a note from a day. |
|
| `delete_day_note` | Remove a note from a day. |
|
||||||
@@ -168,7 +174,7 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Collab Notes
|
### Collab Notes
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|----------------------|-------------------------------------------------------------------------------------------------|
|
||||||
| `create_collab_note` | Create a shared note visible to all trip members. Supports title, content, category, and color. |
|
| `create_collab_note` | Create a shared note visible to all trip members. Supports title, content, category, and color. |
|
||||||
| `update_collab_note` | Edit a collab note's content, category, color, or pin status. |
|
| `update_collab_note` | Edit a collab note's content, category, color, or pin status. |
|
||||||
| `delete_collab_note` | Delete a collab note and its associated files. |
|
| `delete_collab_note` | Delete a collab note and its associated files. |
|
||||||
@@ -176,19 +182,58 @@ TREK exposes **34 tools** organized by feature area. Use `get_trip_summary` as a
|
|||||||
### Bucket List
|
### Bucket List
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|---------------------------|--------------------------------------------------------------------------------------------|
|
||||||
| `create_bucket_list_item` | Add a destination to your personal bucket list with optional coordinates and country code. |
|
| `create_bucket_list_item` | Add a destination to your personal bucket list with optional coordinates and country code. |
|
||||||
| `delete_bucket_list_item` | Remove an item from your bucket list. |
|
| `delete_bucket_list_item` | Remove an item from your bucket list. |
|
||||||
|
|
||||||
### Atlas
|
### Atlas
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|---|---|
|
|--------------------------|--------------------------------------------------------------------------------|
|
||||||
| `mark_country_visited` | Mark a country as visited using its ISO 3166-1 alpha-2 code (e.g. "FR", "JP"). |
|
| `mark_country_visited` | Mark a country as visited using its ISO 3166-1 alpha-2 code (e.g. "FR", "JP"). |
|
||||||
| `unmark_country_visited` | Remove a country from your visited list. |
|
| `unmark_country_visited` | Remove a country from your visited list. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Screenshots
|
## Example
|
||||||
|
|
||||||
<!-- Add screenshots of MCP in action here -->
|
Conversation with Claude: https://claude.ai/share/51572203-6a4d-40f8-a6bd-eba09d4b009d
|
||||||
|
|
||||||
|
Initial prompt (1st message):
|
||||||
|
|
||||||
|
```
|
||||||
|
I'd like to plan a week-long trip to Kyoto, Japan, arriving April 5 2027
|
||||||
|
and leaving April 11 2027. It's cherry blossom season so please keep that
|
||||||
|
in mind when picking spots.
|
||||||
|
|
||||||
|
Before writing anything to TREK, do some research: look up what's worth
|
||||||
|
visiting, figure out a logical day-by-day flow (group nearby spots together
|
||||||
|
to avoid unnecessary travel), find a well-reviewed hotel in a central
|
||||||
|
neighbourhood, and think about what kind of food and restaurant experiences
|
||||||
|
are worth including.
|
||||||
|
|
||||||
|
Once you have a solid plan, write the whole thing to TREK:
|
||||||
|
- Create the trip
|
||||||
|
- Add all the places you've researched with their real coordinates
|
||||||
|
- Build out the daily itinerary with sensible visiting times
|
||||||
|
- Book the hotel as a reservation and link it properly to the accommodation days
|
||||||
|
- Add any notable restaurant reservations
|
||||||
|
- Put together a realistic budget in EUR
|
||||||
|
- Build a packing list suited to April in Kyoto
|
||||||
|
- Leave a pinned collab note with practical tips (transport, etiquette, money, etc.)
|
||||||
|
- Add a day note for each day with any important heads-up (early start, crowd
|
||||||
|
tips, booking requirements, etc.)
|
||||||
|
- Mark Japan as visited in my Atlas
|
||||||
|
|
||||||
|
Currency: CHF. Use get_trip_summary at the end and give me a quick recap
|
||||||
|
of everything that was added.
|
||||||
|
```
|
||||||
|
|
||||||
|
Database file: https://share.jubnl.ch/s/S7bBpj42mB
|
||||||
|
|
||||||
|
Email: admin@admin.com \
|
||||||
|
Password: admin123
|
||||||
|
|
||||||
|
PDF of the generated trip: [./docs/TREK-Generated-by-MCP.pdf](./docs/TREK-Generated-by-MCP.pdf)
|
||||||
|
|
||||||
|

|
||||||
BIN
docs/TREK-Generated-by-MCP.pdf
Normal file
BIN
docs/TREK-Generated-by-MCP.pdf
Normal file
Binary file not shown.
BIN
docs/screenshot-trip-mcp.png
Normal file
BIN
docs/screenshot-trip-mcp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
Reference in New Issue
Block a user