README.md•2.76 kB
# Travel Company MCP Server
An MCP (Model Context Protocol) server that provides Claude with access to a travel company's customer data, trip history, and information requests.
## Features
- **Customer Management**: Search and retrieve customer profiles
- **Trip History**: Query past and upcoming trips by customer or destination
- **Request Tracking**: Manage customer inquiries and follow-up requests
## Requirements
- Python 3.10 or higher
- pip package manager
## Installation
1. Clone or download this repository
2. (Optional) Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Initialize the database:
```bash
python -m src.seed_data
```
## Running the Server
The MCP server is designed to be run by Claude Desktop via stdio transport:
```bash
python -m src.server
```
## Configuration for Claude Desktop
Add this to your Claude Desktop MCP configuration:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"travel-company": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/path/to/mcpdemo"
}
}
}
```
## Available Tools
### Customer Tools
- `search_customers`: Search for customers by name, email, phone, or ID
- `get_customer_profile`: Get detailed customer profile with trip statistics
### Trip Tools
- `search_trips`: Search trips by destination, date range, or status
- `get_trip_history`: Get trip history for a specific customer
### Request Tools
- `search_requests`: Search information requests by various criteria
- `get_pending_requests`: Get pending customer requests for follow-up
## Example Queries
Try asking Claude:
- "Show me all customers named John"
- "What trips has customer ID 5 taken?"
- "List all pending requests from the last 7 days"
- "Find trips to Paris in 2024"
- "Show me the profile for customer@email.com"
## Project Structure
```
mcpdemo/
├── src/
│ ├── server.py # Main MCP server
│ ├── database.py # Database layer
│ ├── seed_data.py # Demo data generator
│ └── tools/ # Tool implementations
├── data/ # SQLite database
├── config/ # Configuration files
└── logs/ # Server logs
```
## Development
The server uses SQLite for storage with demo data including:
- 100+ customer records
- 200+ trip records
- 50+ information requests
All data is synthetic and for demonstration purposes only.
## License
MIT