mcpdemo
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"travel-company": {
"args": [
"-m",
"src.server"
],
"command": "python",
"cwd": "/path/to/mcpdemo"
}
}
}
服务介绍
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
-
Clone or download this repository
-
(Optional) Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Initialize the database:
python -m src.seed_data
Running the Server
The MCP server is designed to be run by Claude Desktop via stdio transport:
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
{
"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 IDget_customer_profile: Get detailed customer profile with trip statistics
Trip Tools
search_trips: Search trips by destination, date range, or statusget_trip_history: Get trip history for a specific customer
Request Tools
search_requests: Search information requests by various criteriaget_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