Skip to main content
Glama

Wisnu MCP - Travel Booking Server šŸŒ

A Model Context Protocol (MCP) server for travel booking operations, built with FastMCP.

Features

This MCP server provides the following tools for travel booking:

Available Tools

  1. search_flights - Search for available flights

    • Origin/destination airport codes

    • Departure and optional return dates

    • Passenger count and cabin class selection

  2. search_hotels - Search for hotels in a location

    • Location-based search

    • Check-in/check-out dates

    • Guest count, room requirements, and rating filters

  3. search_destinations - Get destination recommendations

    • Interest-based suggestions (beach, culture, adventure, food, etc.)

    • Budget range filtering

    • Seasonal preferences

  4. calculate_trip_cost - Estimate total trip costs

    • Flight and hotel cost inputs

    • Daily expense calculations

    • Per-person cost breakdown

  5. get_travel_tips - Get travel tips for destinations

    • Destination-specific advice

    • Trip type considerations (business, leisure, adventure, family)

Installation

This project uses uv for dependency management.

Prerequisites

  • Python 3.13+

  • uv package manager

Setup

  1. Clone or navigate to this repository:

cd wisnu-mcp
  1. The virtual environment and dependencies are already set up. If you need to reinstall:

uv sync

Usage

Running the Server

Start the MCP server with:

uv run main.py

Or if you want to run it directly with Python:

source .venv/bin/activate  # On Windows: .venv\Scripts\activate
python main.py

Connecting to Claude Desktop

To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "wisnu-travel": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/adrian/Dev/@wisatabook/wisnu-mcp",
        "run",
        "main.py"
      ]
    }
  }
}

After updating the configuration, restart Claude Desktop.

Testing the Server

You can test individual tools by modifying main.py to call them directly:

if __name__ == "__main__":
    # Test a tool
    result = search_flights(
        origin="JFK",
        destination="LHR",
        departure_date="2024-06-15",
        return_date="2024-06-22",
        passengers=2
    )
    print(result)

    # Or run the server
    # mcp.run()

Development

Project Structure

wisnu-mcp/
ā”œā”€ā”€ main.py              # Main MCP server implementation
ā”œā”€ā”€ pyproject.toml       # Project configuration and dependencies
ā”œā”€ā”€ uv.lock             # Locked dependency versions
ā”œā”€ā”€ README.md           # This file
└── .venv/              # Virtual environment (auto-generated)

Adding New Tools

To add a new tool to the MCP server:

  1. Define a new function in main.py

  2. Decorate it with @mcp.tool()

  3. Add comprehensive docstrings (they become tool descriptions)

  4. Use type hints for all parameters

Example:

@mcp.tool()
def search_car_rentals(
    location: str,
    pickup_date: str,
    return_date: str,
    car_type: Literal["economy", "compact", "suv", "luxury"] = "economy"
) -> dict:
    """
    Search for available car rentals.

    Args:
        location: Pickup location
        pickup_date: Pickup date in YYYY-MM-DD format
        return_date: Return date in YYYY-MM-DD format
        car_type: Type of car needed

    Returns:
        Dictionary with car rental search results
    """
    return {
        "location": location,
        "pickup_date": pickup_date,
        "return_date": return_date,
        "car_type": car_type,
        "status": "success"
    }

Adding Dependencies

To add new Python packages:

uv add package-name

For example, to add a real flight API client:

uv add amadeus

Next Steps

The current implementation provides mock responses. To build a production-ready travel booking system:

  1. Integrate Real APIs: Connect to actual flight, hotel, and destination APIs

  2. Add Resources: Use FastMCP's @mcp.resource() decorator to expose travel data

  3. Add Prompts: Create @mcp.prompt() templates for common travel queries

  4. Error Handling: Implement robust error handling for API failures

  5. Caching: Add caching for frequently searched routes/destinations

  6. Authentication: Add API key management for external services

  7. Testing: Add unit and integration tests

Resources

License

MIT

Available Tools

5 tools
calculate_trip_costB

Calculate total estimated trip cost.

Args: flight_cost: Cost of flights per person hotel_cost_per_night: Hotel cost per night num_nights: Number of nights daily_expenses: Estimated daily expenses per person (default: $100) num_travelers: Number of travelers (default: 1)

Returns: Dictionary with cost breakdown

Inputs: flight_cost (required), hotel_cost_per_night (required), num_nights (required), daily_expenses, +1 more. Returns: object

get_travel_tipsC

Get travel tips and recommendations for a destination.

Args: destination: Destination city or country trip_type: Type of trip

Returns: Dictionary with travel tips

Inputs: destination (required), trip_type. Returns: object

search_destinationsB

Get destination recommendations based on interests and preferences.

Args: interests: List of interests (e.g., ["beach", "culture", "adventure", "food"]) budget_range: Budget category season: Preferred travel season

Returns: Dictionary with destination recommendations

Inputs: interests (required), budget_range, season. Returns: object

search_flightsB

Search for available flights between two locations.

Args: origin: Origin airport code (e.g., "JFK", "LAX") destination: Destination airport code (e.g., "LHR", "CDG") departure_date: Departure date in YYYY-MM-DD format return_date: Optional return date in YYYY-MM-DD format for round trips passengers: Number of passengers (default: 1) cabin_class: Cabin class preference

Returns: Dictionary with flight search results

Inputs: origin (required), destination (required), departure_date (required), return_date, +2 more. Returns: object

search_hotelsA

Search for available hotels in a location.

Args: location: City or location name (e.g., "Paris", "New York") checkin_date: Check-in date in YYYY-MM-DD format checkout_date: Check-out date in YYYY-MM-DD format guests: Number of guests (default: 1) rooms: Number of rooms needed (default: 1) min_rating: Minimum hotel rating (0-5, optional)

Returns: Dictionary with hotel search results

Inputs: location (required), checkin_date (required), checkout_date (required), guests, +2 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: calculate_trip_cost handles cost estimation, get_travel_tips provides destination advice, search_destinations recommends places based on preferences, search_flights finds flights, and search_hotels finds accommodations. The descriptions reinforce these unique functions, making misselection unlikely.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case: calculate_trip_cost, get_travel_tips, search_destinations, search_flights, and search_hotels. This uniformity makes the set predictable and easy to understand, with no deviations in style or convention.

    Tool Count5/5

    With 5 tools, this server is well-scoped for travel planning, covering key aspects like cost calculation, destination recommendations, tips, flights, and hotels. Each tool earns its place without feeling excessive or insufficient for the domain.

    Completeness4/5

    The tool set covers core travel planning workflows: search (destinations, flights, hotels), cost estimation, and tips. Minor gaps exist, such as no booking or reservation tools, but agents can work around this by using search results for manual follow-up, and the surface supports most agent-driven planning tasks effectively.

    Related MCP Connectors