Skip to main content
Glama

Weather MCP Server

A Model Context Protocol (MCP) server that provides weather information.

Installation

pnpm install

Related MCP server: Weather MCP

Usage

Start the Server

pnpm start

Run Tests

pnpm test

Using with MCP Inspector

To test your server with the MCP Inspector:

  1. Install the Inspector (if not already installed):

npx @modelcontextprotocol/inspector
  1. Configure the connection:

    • Command: npx

    • Args: tsx main.ts

    • Or use the full command: npx tsx /path/to/mcpWeather/main.ts

  2. Test the tool:

    • Select the fetch-Weather tool

    • Enter a city name (e.g., "Bogotá")

    • Call the tool

Tools

fetch-Weather

Get the weather for a given location.

Parameters:

  • city (string, required): City name like 'Bogotá'

Example:

{
  "city": "Bogotá"
}

Response:

{
  "content": [
    {
      "type": "text",
      "text": "The weather in Bogotá is sunny"
    }
  ]
}

Important Notes

⚠️ Zod Version: This project uses Zod v3.23.8 to match the MCP SDK requirements. Do not upgrade to Zod v4 as it will cause parameter registration issues.

Development

The server uses:

  • MCP SDK: @modelcontextprotocol/sdk v1.20.0

  • Zod: v3.23.8 (for parameter validation)

  • TSX: v4 (for running TypeScript)

Available Tools

1 tool
fetch-WeatherC

Get the weather for a given location

Inputs: city (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a distinct purpose of fetching weather data for a location.

    Naming Consistency5/5

    Since there is only one tool, naming consistency is inherently perfect. The tool name 'fetch-Weather' follows a verb-noun pattern, though the capitalization is inconsistent, but this does not affect the score due to the single-tool context.

    Tool Count2/5

    A single tool for a weather server is too few for the apparent scope, as it lacks basic operations like forecasts, historical data, or location searches. This minimal set limits functionality and is not well-scoped for typical weather-related tasks.

    Completeness2/5

    The tool surface is severely incomplete for a weather domain, covering only current weather fetching. There are significant gaps, such as missing forecasts, alerts, or multi-location queries, which will likely cause agent failures in broader weather-related workflows.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables users to get current weather information for any city using the Open-Meteo API. Provides detailed meteorological data including temperature, precipitation, day/night status, and hourly forecasts through natural language queries.
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables users to get real-time weather information for any city in the world. Provides current temperature and weather conditions through a simple city name query.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.
      ISC