Skip to main content
Glama
tomw66

UK Weather & Travel Outfit Recommender MCP Server

by tomw66

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: Training Condition Check MCP

Prerequisites

Installation

  1. Clone the repository:

git clone <repository-url>
cd commute_mcp
  1. Create a virtual environment and install dependencies:

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e .
  1. 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.server

The 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 location

  • travel_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 location

  • destination (required): Destination location

  • mode (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

  1. Geocoding: Converts location names to coordinates using OpenStreetMap's Nominatim API

  2. Routing: Calculates travel time and distance using OSRM (Open Source Routing Machine)

  3. Weather Data: Fetches hourly forecasts from the Met Office DataHub API

  4. Analysis: Analyses weather conditions for your journey window

  5. 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.md

APIs Used

  • Met Office DataHub: Weather forecasts for UK locations

  • OSRM: Open-source routing engine for travel calculations

  • Nominatim: OpenStreetMap geocoding service

Available Tools

5 tools
get_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
originYesStarting location (e.g., 'Bristol', 'London Bridge')
destinationYesDestination (e.g., 'city centre', 'Manchester')
travel_modeNoMode of travelwalking
hours_until_departureNoHours until you leave (0 for now)

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the full burden. It explains that the tool analyzes four factors to generate a recommendation, which provides some transparency about its internal logic. However, it does not disclose potential side effects, dependencies on external services, or what happens if data is unavailable. For a simple get-type tool, this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no filler. The first sentence immediately states the tool's purpose, and the second clarifies the analysis logic. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is present, and the description does not describe the return format (e.g., text vs. list of items) or any edge cases. It covers the core functionality and inputs but leaves the exact response shape ambiguous. Given the moderate complexity, this is acceptable but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so parameters are well documented. The description's mention of 'location, destination, travel time' maps to origin/destination/hours_until_departure but adds no extra semantic detail beyond what the schema already provides. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get clothing recommendations' with a specific verb and resource, and explains the inputs it uses ('current location, destination, travel time, and weather forecast'). This distinguishes it from sibling tools like get_weather_forecast and get_travel_info which focus on single data types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: when you need clothing advice informed by weather and travel plans. It does not explicitly name alternatives or exclusion scenarios, but the distinct purpose ('suggest what to wear') is clear enough for an agent to choose this over the weather-only or travel-only siblings. However, it lacks explicit 'when not to use' guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_travel_infoA

Get travel time and distance between two locations

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNowalking
originYesStarting location
destinationYesDestination

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry the transparency burden. The verb 'Get' signals a non-destructive read operation, which is useful, but the description does not disclose any limitations, default behavior, or side effects. It is neither misleading nor exceptionally informative.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with no redundant terms or filler. It communicates the core purpose efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 3 parameters, no output schema, and no annotations. The description covers the main function but omits the mode parameter's behavior and return format details. For a simple tool, it is adequate but leaves clear gaps given missing annotation support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67% (origin and destination have descriptions; mode does not). The description adds no semantic value beyond the schema—'between two locations' merely restates origin/destination, and the 'mode' parameter is left unexplained in both description and schema. The default of walking is only in the schema, not the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' with a clear resource 'travel time and distance between two locations.' It fully distinguishes the tool from siblings like weather or outfit recommendations, leaving no ambiguity about its function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for travel-related queries but provides no explicit when-to-use guidance or exclusions. Given that sibling tools are unrelated, there is no direct alternative to contrast, so the guidance is merely implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
keyNoOptional: specific preference key to retrieve. If omitted, returns all preferences.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of disclosing behavior. It clearly indicates a read-only operation via 'Retrieve' and clarifies the optional key behavior, but it does not mention return format, error handling, or what happens if a key is not found. These gaps are minor for a simple getter but leave some ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the action, and every sentence earns its place. It is appropriately sized for the tool's simplicity with no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has only one optional parameter and no output schema, the description adequately explains the core functionality and even gives a practical use case ('see what locations the user has saved'). It does not detail the return structure, but for a simple preferences getter this is not a significant omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains the 'key' parameter well. The description merely restates what the schema says ('get a specific preference by key' and 'If omitted, returns all preferences') without adding extra meaning like examples or default behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb 'Retrieve' with a clear resource 'user preferences', and explains both modes: all preferences or a specific key. This clearly distinguishes it from sibling tools like get_weather_forecast or set_user_preference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a concrete use case: 'Use this to see what locations the user has saved.' It does not explicitly exclude alternatives or mention when to use set_user_preference instead, but the context is clear enough for a simple getter.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_weather_forecastA

Get detailed hourly weather forecast for a UK location

ParametersJSON Schema
NameRequiredDescriptionDefault
hoursNoNumber of hours to forecast
locationYesLocation name (e.g., 'Bristol', 'Edinburgh')

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It states it returns 'detailed hourly weather forecast' but doesn't disclose data sources, units, location matching behavior, potential errors, or any other operational details. It adds little beyond the core purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the core action and object. It is appropriately concise with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple weather tool with schema-covered parameters and no output schema, the description provides adequate context to understand the tool's purpose. However, it lacks any mention of return value shape, units, or edge cases, making it minimally viable but not richly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both 'location' and 'hours' having descriptions. The description's mention of 'hourly' loosely maps to the hours parameter but doesn't add format or constraints beyond what the schema already provides. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states a specific verb ('Get'), a resource ('weather forecast'), and scope ('hourly', 'UK location'). It distinctly separates this tool from siblings like get_travel_info and get_outfit_recommendation by domain.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the name and description; it's obviously for weather forecasts. However, there is no explicit guidance on when to use it vs alternatives, nor any exclusions or prerequisites beyond the required location parameter.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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').

ParametersJSON Schema
NameRequiredDescriptionDefault
keyYesPreference key (e.g., 'home', 'work', 'gym', 'favourite_cafe')
valueYesPreference value (e.g., 'Bristol City Centre', 'London Bridge')
categoryNoCategory of preferencelocation

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full burden of disclosing behavior. It only says 'Store' and gives examples; it does not mention whether existing keys are overwritten, what the tool returns, or any prerequisites or side effects. This is a significant gap for a mutation operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and includes a 'Use this when' clause. Every word earns its place with no redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a low-complexity tool with a well-described schema, the description provides enough context to invoke it correctly. It gives clear usage triggers and examples. However, it omits behavioral details like overwrite semantics and return value, which would be relevant for a complete picture, but given the simplicity, the gap is minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does not add significant meaning beyond the schema; its examples ('home' as key, 'Bristol' as value) merely mirror what the schema already provides, so no extra credit is earned.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Store a user preference like home/work addresses or other settings.' It uses a specific verb ('store') and resource ('user preference'), and gives concrete examples that distinguish it from the sibling get_user_preferences tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says 'Use this when the user wants to save a location for future use' and provides examples of when to apply it. However, it does not explicitly mention when not to use it or name the alternative getter tool as an exclusion, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedget_outfit_recommendation
    • First observedget_travel_info
    • First observedget_user_preferences
    • First observedget_weather_forecast
    • First observedset_user_preference

TDQS

A4/5.0
Disambiguation5/5

Each tool has a distinct purpose: outfit recommendation, weather forecast, travel info, and preference storage. No overlap or confusion between them.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tomw66/commute_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server