← Back to Home

API Documentation

Authentication

All API requests require OAuth 2.0 authentication via Auth0. Get a token using the client credentials flow:

curl --request POST \
  --url https://YOUR_AUTH0_DOMAIN/oauth/token \
  --header 'content-type: application/json' \
  --data '{
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_SECRET",
    "audience": "https://api.trip-planner.app",
    "grant_type": "client_credentials"
  }'

Include the token in the Authorization header: Bearer YOUR_TOKEN

MCP Endpoint

The main API endpoint for all MCP tools:

POST /api/mcp

Request format:

{
  "tool": "trip_create",
  "arguments": {
    "name": "Paris Vacation",
    "destination": "Paris, France",
    "startDate": "2026-06-01",
    "endDate": "2026-06-07"
  }
}

Available Tools

Trip Management

  • trip_create - Create a new trip
  • trip_get - Get trip details
  • trip_list - List all trips
  • trip_update - Update trip details
  • trip_delete - Delete a trip

Trip Items

  • trip_item_add - Add flight, hotel, or activity
  • trip_item_list - List trip items
  • trip_item_update - Update an item
  • trip_item_delete - Delete an item

Locations

  • trip_location_add - Save a location with coordinates
  • trip_location_list - List saved locations
  • trip_location_nearby - Find nearby locations
  • trip_location_delete - Delete a location

Itinerary

  • trip_itinerary_get - Get full itinerary with timeline

Example Request

curl -X POST https://your-app.vercel.app/api/mcp \
  -H "Authorization: Bearer eyJ..." \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "trip_create",
    "arguments": {
      "name": "Tokyo Adventure",
      "destination": "Tokyo, Japan",
      "startDate": "2026-09-15",
      "endDate": "2026-09-22",
      "currency": "JPY",
      "budgetTotal": 300000,
      "timezone": "Asia/Tokyo"
    }
  }'

Claude Desktop Integration

Configure the MCP server in your Claude Desktop config to use natural language for trip planning:

{
  "mcpServers": {
    "trip-planner": {
      "url": "https://your-app.vercel.app/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Then ask Claude: "Create a 7-day trip to Barcelona starting June 1st with a €2000 budget"