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

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYescity name like 'Bogotá'

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'Get the weather' but doesn't disclose behavioral traits like rate limits, error handling, data freshness, or authentication needs. This leaves significant gaps for a tool that likely interacts with external data.

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, clear sentence with no wasted words, making it highly concise and front-loaded. Every part of the sentence contributes directly to understanding the tool's function.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what weather data is returned (e.g., temperature, conditions), potential errors, or usage constraints, which are crucial for effective tool invocation in this context.

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 description implies a 'location' parameter, but the input schema already fully documents the single parameter 'city' with 100% coverage. No additional semantic details are added beyond what the schema provides, so it meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('weather'), specifying it's for a given location. It's not a tautology of the name, but since there are no sibling tools, it doesn't need to differentiate from alternatives, so it doesn't achieve the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or exclusions. It only states what it does, without context for usage, which is minimal guidance.

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.

  1. 1 tool updatev1.0.0
    • Changedfetch-Weather2 fields changed
      • addedInput schema / $schema
        Added value: +"http://json-schema.org/draft-07/schema#"
      • addedInput schema / additionalProperties
        Added value: +false
  2. 1 tool update
    • First observedfetch-Weather

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
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    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.
    -
  • 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
  • F
    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.
    -