UK Weather & Travel Outfit Recommender MCP Server
Provides geocoding of location names to coordinates via Nominatim API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UK Weather & Travel Outfit Recommender MCP Server what to wear for a walk from London to Cambridge?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UK Weather & Travel Outfit Recommender MCP Server
A Model Context Protocol (MCP) server that combines Met Office weather data with travel routing to recommend what to wear for your journey.
Features
Outfit Recommendations: Get personalised clothing suggestions based on weather conditions and your travel plans
Weather Forecasts: Detailed hourly weather forecasts for UK locations
Travel Information: Calculate travel time and distance between locations
Supports multiple travel modes: walking, cycling, and driving
Real-time UK weather data from the Met Office DataHub API
Intelligent clothing recommendations based on temperature, precipitation, wind, and UV index
Related MCP server: AI Weather MCP Server
Prerequisites
Python 3.12 or higher
uv package manager
Met Office DataHub API key (register at https://datahub.metoffice.gov.uk/)
Installation
Clone the repository:
git clone <repository-url>
cd commute_mcpCreate a virtual environment and install dependencies:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .Set up your Met Office API key:
export MET_OFFICE_API_KEY="your-api-key-here"Usage
Running as an MCP Server
Start the server using stdio transport:
python -m src.serverThe server provides three tools:
1. Get Outfit Recommendation
Analyses your journey and provides clothing recommendations:
{
"name": "get_outfit_recommendation",
"arguments": {
"origin": "Bristol",
"destination": "Bath",
"travel_mode": "walking",
"hours_until_departure": 0
}
}Parameters:
origin(required): Starting location (e.g., "Bristol", "London Bridge")destination(required): Destination locationtravel_mode(optional): "walking", "cycling", or "driving" (default: "walking")hours_until_departure(optional): Hours until you leave, 0 for now (default: 0)
2. Get Weather Forecast
Get detailed hourly weather forecast for a UK location:
{
"name": "get_weather_forecast",
"arguments": {
"location": "Manchester",
"hours": 12
}
}Parameters:
location(required): Location name (e.g., "Bristol", "Edinburgh")hours(optional): Number of hours to forecast (default: 12)
3. Get Travel Information
Calculate travel time and distance:
{
"name": "get_travel_info",
"arguments": {
"origin": "London",
"destination": "Cambridge",
"mode": "driving"
}
}Parameters:
origin(required): Starting locationdestination(required): Destination locationmode(optional): "walking", "cycling", or "driving" (default: "walking")
Using with Claude Desktop
To use this MCP server with Claude Desktop, add it to your Claude configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"commute-mcp": {
"command": "uv",
"args": ["--directory", "/path/to/commute_mcp", "run", "python", "-m", "src.server"],
"env": {
"MET_OFFICE_API_KEY": "your-api-key-here"
}
}
}
}Then restart Claude Desktop. You can now ask Claude questions like:
"What should I wear for a walk from Bristol to Bath?"
"What's the weather forecast for Edinburgh for the next 6 hours?"
"How long would it take to cycle from Manchester to Salford?"
How It Works
Geocoding: Converts location names to coordinates using OpenStreetMap's Nominatim API
Routing: Calculates travel time and distance using OSRM (Open Source Routing Machine)
Weather Data: Fetches hourly forecasts from the Met Office DataHub API
Analysis: Analyses weather conditions for your journey window
Recommendations: Generates clothing suggestions based on:
Temperature and "feels like" temperature
Precipitation probability
Wind speed and gusts
UV index
Travel mode and duration
Development
Running Tests
pytest tests/Project Structure
commute_mcp/
├── src/
│ ├── __init__.py
│ ├── server.py # MCP server and tool handlers
│ ├── location.py # Geocoding and routing
│ ├── weather.py # Weather data and outfit recommendations
│ └── preferences.py # User preferences management
├── tests/
│ ├── test_api.py
│ └── test_geocode.py
├── pyproject.toml
└── README.mdAPIs Used
Met Office DataHub: Weather forecasts for UK locations
OSRM: Open-source routing engine for travel calculations
Nominatim: OpenStreetMap geocoding service
Available Tools
5 toolsget_outfit_recommendationA
Get clothing recommendations based on weather and travel plans. Analyses current location, destination, travel time, and weather forecast to suggest what to wear.
Inputs: origin (required), destination (required), travel_mode, hours_until_departure.
get_travel_infoA
Get travel time and distance between two locations
Inputs: origin (required), destination (required), mode.
get_user_preferencesA
Retrieve all stored user preferences or get a specific preference by key. Use this to see what locations the user has saved.
Inputs: key.
get_weather_forecastA
Get detailed hourly weather forecast for a UK location
Inputs: location (required), hours.
set_user_preferenceA
Store a user preference like home/work addresses or other settings. Use this when the user wants to save a location for future use (e.g., 'save my home as Bristol' or 'set work to Bath').
Inputs: key (required), value (required), category.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct purpose: outfit recommendation, weather forecast, travel info, and preference storage. No overlap or confusion between them.
All tool names follow a consistent verb_noun pattern: get_outfit_recommendation, get_weather_forecast, get_travel_info, set_user_preference, get_user_preferences. The pattern is clear and uniform.
With 5 tools, the server is well-scoped for its purpose. Each tool contributes to the core workflow of recommending outfits based on weather and travel, plus necessary preference management.
The core functionality is covered: weather, travel, recommendation, and preference storage/retrieval. Minor gaps include no explicit update/delete for preferences, but setting a preference can overwrite, so this is not a critical dead end.
Maintenance
Related MCP Connectors
Weather now and 9-day forecasts anywhere (MET Norway) and Great Britain place-name lookup
Weather decisions for outdoor plans: should I go, when, what to wear, what you will meet en route.
Plans a whole day out in any city, matched to the weather, your mood and diet.
What to wear today by city weather and travel packing lists by destination. Public, read-only.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables intelligent travel planning by combining weather forecasts and route calculations for destinations. Provides personalized travel recommendations based on weather conditions and supports trip planning with persistent conversation memory.-
- FlicenseNot gradedqualityDmaintenanceCombines real-time weather data with LLM-powered reasoning to deliver intelligent weather insights like clothing recommendations and travel advice.1-
- FlicenseNot gradedqualityDmaintenanceProvides current weather, forecasts, trend predictions, and personalized recommendations for any location using the Open-Meteo API.-
- AlicenseAqualityCmaintenanceEnables comparing door-to-door travel times by bicycle, motorbike, and public transport alongside local weather, and provides place lookup and API usage tracking.4Apache 2.0