TRAVEL-PLANNER-MCP-Server
The Travel Planner MCP Server is an implementation designed to interact with Google Maps and travel planning services. It enables LLMs to perform travel-related tasks such as location searches, place details retrieval, and travel time calculations. It can be easily installed via Smithery and allows for setting the Google Maps API key using environment variables.
GitHub Stars
78
User Rating
Not Rated
Favorites
0
Views
30
Forks
27
Issues
3
Installation
Difficulty
IntermediateEstimated Time
10-20 minutes
Requirements
Node.js: 18.0.0以上npm: 8.0.0以上+1 more
Installation
Installation
Prerequisites
Please specify required software and versions:Node.js: 18.0.0 or higher
npm: 8.0.0 or higher
Claude Desktop: Latest version
Installation Steps
1. Clone Repository
bash
git clone https://github.com/GongRzhe/TRAVEL-PLANNER-MCP-Server
cd TRAVEL-PLANNER-MCP-Server
2. Install Dependencies
bash
npm install
3. Configure Claude Desktop
Editclaude_desktop_config.json to add the MCP server:
json
{
"mcpServers": {
"travel-planner": {
"command": "npx",
"args": ["@gongrzhe/server-travelplanner-mcp"],
"env": {
"GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
}
}
}
}
4. Start Server
bash
npm start
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Not recognized by Claude Desktop Solution: Verify configuration file path and syntax.Configuration
Configuration
Basic Configuration
Claude Desktop Setup
Edit~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or
%APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
"mcpServers": {
"travel-planner": {
"command": "npx",
"args": ["@gongrzhe/server-travelplanner-mcp"],
"env": {
"GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
}
}
}
}
Environment Variables
Set the following environment variables as needed:bash
export GOOGLE_MAPS_API_KEY="your_google_maps_api_key"
Security Settings
Store API keys in environment variables or secure configuration files
Set appropriate file access permissions
Configuration Examples
Basic Configuration
json
{
"mcpServers": {
"travel-planner": {
"command": "npx",
"args": ["@gongrzhe/server-travelplanner-mcp"],
"env": {
"GOOGLE_MAPS_API_KEY": "your_google_maps_api_key"
}
}
}
}
Examples
Examples
Basic Usage
Here are basic usage examples for the MCP server:Using with Claude Desktop
1Verify MCP Server Startup
Open Claude Desktop and confirm that the configuration has been loaded correctly.
2Execute Basic Commands
Available tools from this MCP server:
- searchPlaces: Search for places using Google Places API
- getPlaceDetails: Get detailed information about a specific place
- calculateRoute: Calculate route between two locations
- getTimeZone: Get timezone information for a location
Programmatic Usage
javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');
const client = new MCPClient();
await client.connect();
// Execute tool
const result = await client.callTool('searchPlaces', {
query: 'Tokyo',
location: '35.6895,139.6917',
radius: 1000
});
console.log(result);
Advanced Examples
Automation Script
bash
#!/bin/bash
Batch processing example
for file in *.txt; do
mcp-tool process "$file"
done
API Integration
python
Python example
import requests
import json
def call_mcp_tool(tool_name, params):
response = requests.post(
'http://localhost:3000/mcp/call',
json={
'tool': tool_name,
'parameters': params
}
)
return response.json()
Usage example
result = call_mcp_tool('getPlaceDetails', {
'placeId': 'ChIJLz0r2n3jAzsR5w4H3t3h5bI'
})
Use Cases
Implementing location search functionality in a travel planning application
Retrieving detailed information for specified locations by users
Calculating travel routes and suggesting optimal modes of transportation
Supporting travel planning across different time zones