Travel Itinerary Backend System with MCP
LocalAbout Travel Itinerary Backend System with MCP
This FastAPI-based travel itinerary backend is for AI assistants and applications that create or view trip plans. It combines a REST API, SQLAlchemy data models, MCP support, and sample data for Phuket and Krabi.
Key features
- 01Manage itineraries and related data models
- 02Create and view trips through a REST API
- 03Includes Phuket and Krabi seed data
- 04Provides recommended trips of 2–8 nights
Use cases
- 01Ask for recommended itineraries in conversation
- 02View details for a specific itinerary
- 03Create a new travel plan
MCP support
The MCP server integrates with FastAPI to expose itinerary API operations to compatible clients; its configuration uses SSE at the local `/mcp` endpoint.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMETravel Itinerary Backend System with MCP
A FastAPI-based backend system for managing travel itineraries. This project implements the Model Context Protocol (MCP) for enhanced AI assistant integration.
Features
- Database Architecture: SQLAlchemy models for itineraries, accommodations, transfers, and activities
- RESTful API: Endpoints to create and view trip itineraries
- Seed Data: Pre-populated database with realistic data for Phuket and Krabi regions
- Recommended Itineraries: Sample itineraries ranging from 2-8 nights
- MCP Integration: Full Model Context Protocol support for AI assistants
Installation
-
Ensure you have Python 3.8+ installed
-
Install uv (fast Python package installer) from here:
-
Clone this repository and navigate to the project directory:
git clone https://github.com/aryanranderiya/itinerary-mcp-server cd itinerary-mcp-server -
Create a virtual environment and install dependencies:
uv venv uv sync -
Activate the virtual environment:
On Linux/macOS:
source .venv/bin/activateOn Windows (Command Prompt):
.venv\Scripts\activate.batOn Windows (PowerShell):
.venv\Scripts\Activate.ps1
Running the Project
Development Mode
Run the server in development mode with auto-reload: Only run in development mode if you need to edit the code.
fastapi dev
Production Mode
Run the server in production mode:
fastapi start
The API will be available at http://localhost:8000 and the API documentation at http://localhost:8000/docs.
Using the Model Context Protocol (MCP)
This project implements the Model Context Protocol (MCP), which enables AI assistants to interact with your API directly. This means AI tools can understand your API's capabilities, data structures, and execute operations on your behalf.
MCP Configuration
The project is already configured with the necessary MCP setup:
- fastapi_mcp Library: We use fastapi_mcp library to integrate MCP functionality with FastAPI
- mcp.json: The configuration is located in the
.vscode/mcp.jsonfile, which defines the MCP server settings:
This configuration connects to the MCP endpoint at{ "servers": { "stay-often-mcp1": { "type": "sse", "url": "http://localhost:8000/mcp" } } }http://localhost:8000/mcpusing Server-Sent Events (SSE).
No additional setup is required to use the MCP functionality - it's built into the server and ready to use.
Supported MCP Clients
You can use any MCP-compatible client to interact with this API. MCP clients include:
- GitHub Copilot
- Claude Desktop
- And other MCP-compatible assistants
For more information about MCP, visit the official MCP documentation.
Example: Using with GitHub Copilot
Here's how you can interact with this API using GitHub Copilot:
-
Start the server:
fastapi dev -
In your conversation with GitHub Copilot, you can request operations like:
-
Get all itineraries:
Can you show me all the recommended itineraries for Phuket? -
Get a specific itinerary:
Show me the details for itinerary ID 3 -
Create a new itinerary:
Create a new 5-night itinerary in Krabi with the following details: Name: "Krabi Adventure", day 1 at hotel 5 with activities 10 and 11, day 2 at hotel 5 with activity 12, etc.
-
GitHub Copilot will understand these requests and execute the appropriate API calls on your behalf through the MCP protocol.
Screenshots
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.