Skip to main content
Glama
bensinclair

Weather MCP Server

by bensinclair
README.md
# Weather MCP Server

A Model Context Protocol (MCP) server that provides weather information using the OpenWeatherMap API.

## Prerequisites

- Node.js (v14 or higher)
- npm
- OpenWeatherMap API key

## Setup

1. Clone or download this repository
2. Install dependencies:
   ```bash
   npm install
   ```

3. Create a `.env` file in the root directory:
   ```bash
   touch .env
   ```

4. Add your OpenWeatherMap API key to the `.env` file:
   ```
   OPENWEATHER_API_KEY=your_openweathermap_api_key_here
   ```

   You can get a free API key from [OpenWeatherMap](https://openweathermap.org/api).

## Usage with Claude Code

Add this server to your MCP configuration file:

```json
{
  "weather": {
    "command": "node",
    "args": ["index.js"],
    "cwd": "/path/to/weather-mcp-server"
  }
}
```

## Available Tools

- `getWeather`: Get current weather information for any city

## Testing

Run the test suite:
```bash
npm test
```

## Environment Variables

| Variable | Description | Required |
|----------|-------------|----------|
| `OPENWEATHER_API_KEY` | Your OpenWeatherMap API key | Yes |

## Example Usage

Once configured with Claude Code, you can ask for weather information:
- "What's the weather in London?"
- "Get me the current weather in Tokyo"
- "How's the weather in New York?"

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 'getWeather' has a clear and distinct purpose that cannot be confused with any other tool in this set.

Naming Consistency5/5

The naming follows a consistent verb_noun pattern with 'getWeather', and since there is only one tool, there are no deviations or mixed conventions to evaluate. The naming is straightforward and predictable.

Tool Count2/5

A single tool for a weather server is too few for the apparent scope, as it only provides current weather retrieval. This lacks essential operations like forecasts, historical data, or location-based queries, making it feel thin and incomplete for typical weather-related tasks.

Completeness2/5

The tool surface is severely incomplete for a weather domain. It only covers current weather retrieval, with significant gaps such as missing forecast data, historical weather information, or multi-location queries. This will likely cause agent failures when broader weather-related needs arise.

Maintenance

ActivityInactive
ResponsivenessSyncing