loading…
Search for a command to run...
loading…
A unified MCP server providing a single entry point to comprehensive travel planning services, including flights, hotels, weather, geocoding, events, and financ
A unified MCP server providing a single entry point to comprehensive travel planning services, including flights, hotels, weather, geocoding, events, and finance, for seamless integration with MCP clients like Claude Desktop.
A unified MCP (Model Context Protocol) server providing a single entry point to comprehensive travel planning services.
This project implements ONE unified MCP server that orchestrates multiple travel-related backend services (flights, hotels, weather, geocoding, events, finance). MCP clients like Claude Desktop connect to a single server interface and access all travel planning capabilities through it.
mcp_server.py) for all travel servicesReady-to-use MCP configuration examples are provided in the examples/ directory:
claude_desktop_config_uv_testpypi.json - Run from Test PyPI with UV (no installation)claude_desktop_config_uv_pypi.json - Run from PyPI with UV (stable release)claude_desktop_config_template.json - Standard Python installationSee examples/QUICK_REFERENCE.md for copy-paste configs and examples/MCP_CONFIG_README.md for complete documentation.
The project uses a multi-source runtime configuration system with proper precedence:
See docs/CONFIG_README.md for complete configuration documentation.
MCP Client (Claude Desktop)
↓ (stdio)
Unified MCP Server (single entry point)
↓ (orchestrates)
Backend Services (flight, hotel, weather, geocoder, finance, events)
py_mcp_travelplanner/.flight_server/, hotel_server/, weather_server/) with a main.py or server entrypoint.py_mcp_travelplanner/ — main package containing CLI, control server and per-service folders.flight_server/, hotel_server/, weather_server/, geocoder_server/, event_server/, finance_server/ — example service implementations.requirements.txt — pinned runtime/dev dependencies used by the project.tests/ — pytest-based unit tests and lifecycle tests.examples/ — MCP configuration examples for Claude Desktop and other clients.python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
Option A — pip (quick)
pip install -r requirements.txt
Option B — poetry (if you prefer pyproject/poetry workflows)
poetry install
Each server folder contains a runnable entrypoint (usually main.py). From the repository root you can start any server directly with Python. For example:
# run the flight server
python py_mcp_travelplanner/flight_server/main.py
# run the weather server
python py_mcp_travelplanner/weather_server/main.py
# run the control server (if present)
python py_mcp_travelplanner/control_server.py
Note: Some servers may expect environment variables or API keys; check the server's README under the corresponding server folder for provider-specific setup.
The unified MCP server (py_mcp_travelplanner/mcp_server.py) provides a single entry point to all travel planning services. Instead of running and configuring multiple separate MCP servers, you can use ONE server that automatically discovers and integrates all available subservices.
event.search_events, flight.search_flights)# Run the unified MCP server
python -m py_mcp_travelplanner.mcp_server
# Or via CLI
py-mcp-travel unified
The unified server integrates:
| Service | Tools | Description |
|---|---|---|
| event | search_events, get_event_details, list_events |
Event search and discovery |
| flight | search_flights, get_flight_details, list_flights |
Flight search and booking |
| hotel | search_hotels, get_hotel_details, list_hotels |
Hotel search and reservations |
| weather | get_weather, get_forecast |
Weather forecasts |
| geocoder | geocode, reverse_geocode |
Location geocoding |
| finance | get_exchange_rates, convert_currency |
Currency exchange |
list_services - Show all integrated services and their toolsget_service_manifest - Get detailed JSON manifest of all servicesget_status - Overall system statusstart_server / stop_server - Manage individual subserviceshealth_check - Check service healthAdd to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"travel_planner_local": {
"command": "python",
"args": ["-m", "py_mcp_travelplanner.mcp_server"],
"env": {
"SERPAPI_KEY": "your-api-key-here"
}
}
}
}
Once connected, use namespaced tool names:
# Search for events in New York
event.search_events({
"query": "concerts",
"location": "New York",
"date_filter": "week"
})
# Search for flights
flight.search_flights({
"departure_id": "JFK",
"arrival_id": "LAX",
"outbound_date": "2025-06-15"
})
# Get weather forecast
weather.get_forecast({
"location": "New York",
"days": 7
})
For complete details about the unified server architecture, see docs/UNIFIED_SERVER.md.
python py_mcp_travelplanner/weather_server/main.py
python py_mcp_travelplanner/control_server.py
**Note:** Some servers may expect environment variables or API keys; check the server's README under the corresponding server folder for provider-specific setup.
### CLI
A simple CLI is available under `py_mcp_travelplanner/cli.py` and `py_mcp_travelplanner/cli_handlers.py`. You can run the CLI script to access helper commands used in development:
```bash
python -m py_mcp_travelplanner.cli
(If the package isn't installed as a module, run the file directly: python py_mcp_travelplanner/cli.py.)
This project provides ONE unified MCP server that acts as a single entry point to all travel planner services. The server is located at py_mcp_travelplanner/mcp_server.py and orchestrates all backend services (flights, hotels, weather, geocoding, events, finance) through a single Model Context Protocol interface.
Ready-to-use configuration files are provided in the examples/ directory:
Option 1: UV with Test PyPI (recommended for testing)
{
"mcpServers": {
"py_mcp_travelplanner_testpypi": {
"command": "uv",
"args": [
"run",
"--index",
"https://test.pypi.org/simple",
"--with",
"py_mcp_travelplanner",
"--no-project",
"--",
"py_mcp_travelplanner_cli"
],
"env": {
"SERPAPI_KEY": "your_serpapi_key_here"
}
}
}
}
Option 2: UV with PyPI (stable release)
{
"mcpServers": {
"py_mcp_travelplanner": {
"command": "uv",
"args": [
"run",
"--with",
"py_mcp_travelplanner",
"--no-project",
"--",
"py_mcp_travelplanner_cli"
],
"env": {
"SERPAPI_KEY": "your_serpapi_key_here"
}
}
}
}
Option 3: Local Installation
{
"mcpServers": {
"py_mcp_travelplanner": {
"command": "python",
"args": ["-m", "py_mcp_travelplanner.mcp_server"],
"env": {
"SERPAPI_KEY": "your_serpapi_key_here"
}
}
}
}
Configuration locations by OS:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonSee examples/MCP_CONFIG_README.md for complete setup instructions.
Set these in the MCP config env section or in your shell:
Required:
SERPAPI_KEY - Your SerpAPI key (get from https://serpapi.com/)Optional (with defaults):
LOG_LEVEL - DEBUG, INFO, WARNING, ERROR (default: INFO)CONTROL_SERVER_PORT - Server port (default: 8787)DEBUG_MODE - Enable debug mode: true/false (default: false)DRY_RUN - Test mode without side effects: true/false (default: false)See docs/CONFIG_README.md for all configuration options.
list_servers, start_server, start_all_servers, stop_server, health_check, get_status, list_pids, verify_serpapi_keyGet a SERPAPI key from https://serpapi.com/ (free tier: 100 searches/month)
Choose a configuration from examples/:
claude_desktop_config_uv_testpypi.jsonclaude_desktop_config_uv_pypi.jsonclaude_desktop_config_template.jsonCopy to Claude Desktop config location (see paths above)
Edit the config and replace your_serpapi_key_here with your actual key
Restart Claude Desktop
The travel planner tools will now be available in your Claude conversations!
# Start the unified MCP server
python -m py_mcp_travelplanner.mcp_server
# Or use the CLI helper
python -m py_mcp_travelplanner.cli mcp
When connected to the unified MCP server, you'll have access to these tools:
When calling a tool via an MCP client you will call the tool by name and pass the corresponding arguments object. The exact outer envelope depends on the MCP client library you use; below are the argument payloads for the most common operations:
{ "server": "flight_server", "dry_run": true }
{ "server": "flight_server", "dry_run": false }
{ "dry_run": true }
{ "server": "flight_server", "timeout": 5.0 }
{ "server": 12345, "timeout": 5.0 }
{ "server": "flight_server" }
{}
The server returns an array of TextContent objects (the mcp library encodes this). When using an MCP client, you should inspect the returned text field(s). For example a get_status call may return a single element whose text contains a human-readable status summary.
For convenience there is a small HTTP control server (py_mcp_travelplanner/control_server.py) that wraps a subset of the MCP server functionality and exposes simple HTTP endpoints. This is recommended for quick scripting and interactive use.
python py_mcp_travelplanner/control_server.py
# or, using the CLI helper
python -m py_mcp_travelplanner.cli serve --host 127.0.0.1 --port 8787
curl -s http://127.0.0.1:8787/status | jq
curl -s "http://127.0.0.1:8787/health?server=flight_server" | jq
curl -X POST "http://127.0.0.1:8787/start?server=flight_server&dry=true" | jq
curl -X POST "http://127.0.0.1:8787/start_all?dry=false" | jq
curl -X POST "http://127.0.0.1:8787/stop?server=flight_server" | jq
curl -s http://127.0.0.1:8787/pids | jq
curl -X POST http://127.0.0.1:8787/test_key | jq
import requests
BASE = "http://127.0.0.1:8787"
# get status
print(requests.get(f"{BASE}/status").json())
# start flight server (dry-run)
print(requests.post(f"{BASE}/start?server=flight_server&dry=true").json())
# start all
print(requests.post(f"{BASE}/start_all?dry=false").json())
# verify serpapi
print(requests.post(f"{BASE}/test_key").json())
Each backend server (weather, event, hotel, flight, finance, geocoder) can be started with either stdio (default) or HTTP transport, and exposes a manifest for tool discovery:
# Start weather server with HTTP API
python -m py_mcp_travelplanner.weather_server.main --transport http --host 127.0.0.1 --port 8791
# Start event server with stdio (default)
python -m py_mcp_travelplanner.event_server.main
# Print tool manifest/schema for debugging
python -m py_mcp_travelplanner.weather_server.main --manifest
You can launch all servers from a single config file (YAML or JSON) using the provided script:
python scripts/run_mcp_from_config.py --config runtime_config.yaml
Example config (runtime_config.yaml):
servers:
weather:
enabled: true
transport: http
host: 127.0.0.1
port: 8791
event:
enabled: true
transport: http
host: 127.0.0.1
port: 8796
hotel:
enabled: true
transport: http
host: 127.0.0.1
port: 8795
flight:
enabled: true
transport: http
host: 127.0.0.1
port: 8793
finance:
enabled: true
transport: http
host: 127.0.0.1
port: 8792
geocoder:
enabled: true
transport: http
host: 127.0.0.1
port: 8794
SERPAPI_KEY: "your_serpapi_key_here"
This will launch all enabled servers with the specified transport and ports. Press Ctrl+C to stop all servers.
You can test HTTP endpoints and manifest output for any server:
# Test weather server HTTP endpoint
curl http://127.0.0.1:8791/manifest
# Or print manifest to stdout
python -m py_mcp_travelplanner.weather_server.main --manifest
You can also write integration tests in pytest to verify HTTP endpoints and manifest output. See the 'tests/' folder for examples.
Run the test suite with pytest:
# Run all tests
pytest -q
# Run MCP server tests specifically
pytest tests/test_mcp_server.py -v
# Run with coverage
pytest --cov=py_mcp_travelplanner --cov-report=html
Test Coverage:
The repository currently contains service-level metadata and possibly extra pyproject.toml files inside server folders. For a single-source-of-truth dependency management approach, consolidate those service-level pyproject.toml contents into the root pyproject.toml and remove or archive the per-server pyproject.toml files. This simplifies CI, local dependency installation, and version pinning.
Several service folders may declare their own requests version. To avoid mismatched runtime behavior, pin requests at the root pyproject.toml (or requirements.txt) to a single compatible version range and update any server-specific files to rely on the root manifest.
Some dependencies in the ecosystem (for example openapi-pydantic) declare compatibility for Python versions <4.0,>=3.8. To remain compatible with such packages while still using modern Python, set the project Python requirement to a range that excludes Python 4.0. For example in pyproject.toml set:
python = ">=3.12.1,<4.0"
This avoids dependency resolution errors if someone installs or runs the project on Python 4.x while the dependencies do not declare support for it.
When merging per-server manifests, ensure shared libraries (requests, aiohttp, pydantic, etc.) are pinned consistently. Run a dependency resolver (pip-tools, poetry) and test local execution after changes.
pip check or poetry lock to see conflicts and adjust the root manifest accordingly.pyproject.toml/requirements.txt and add a short rationale in the PR summary.See the LICENSE file in the repository root.
This repository is a learning / POC project showcasing modular service layouts, simple orchestration, and packaging considerations for small multi-service Python projects.
For questions or help, open an issue in this repository with details about your environment and the problem you're encountering.
Выполни в терминале:
claude mcp add mcp-travel-planner -- npx Payments, customers, subscriptions
автор: Stripe110+ tools for AI agents spanning social media, finance, gaming, music, AU-specific services, and utilities. Zero-config local tools plus platform connectors. n
автор: malamutemayhemUnified API hub for AI agents with 56+ tools across travel (Amadeus, Sabre), prediction markets (Polymarket), crypto, and weather. Pay-per-call via x402 micropa
автор: whiteknightonhorseDeploy live HTTPS websites in seconds. Instant subdomains ($1 USDC) or custom .xyz domains ($10 USDC) on Base chain. Templates for crypto tokens and AI agent pr
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории finance