Skip to main content
Glama
README.md
# mcp-weather

Worldwide weather MCP server. It turns a place name into coordinates, then returns current conditions over stdio for MCP clients such as Cursor.

Repository: [github.com/deep3036/mcp-weather](https://github.com/deep3036/mcp-weather)

## What it does

The server registers one tools:


| Tools                  | Input                                             | Output                                                                                                          |
| --------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `get-current-weather` | `location` (city or place name, min 2 characters) | Current temperature, feels like, humidity, precipitation, wind, condition, day/night, timezone, and coordinates |


Examples of `location`: `Delhi`, `Greater Noida`, `Mumbai`, `London`.

Geocoding uses [Open-Meteo Geocoding](https://open-meteo.com/en/docs/geocoding-api). Forecast data uses [Open-Meteo Forecast](https://open-meteo.com/en/docs). Neither API requires a key for this usage.

If several places match a name, the first geocoding result is used.

## Requirements

- Node.js 20 or later
- npm



## Setup

```bash
npm install
```



## Run

Development (TypeScript via `tsx`):

```bash
npm run dev
```

Production:

```bash
npm run build
npm start
```

This process speaks MCP over stdin/stdout. Logs go to stderr. Do not run it as a normal web app.

## Cursor MCP config

Point the client at this project directory:

```json
{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["tsx", "src/index.ts"],
      "cwd": "D:\\mcp\\weather-mcp"
    }
  }
}
```

After a build you can use `node` and `dist/index.js` instead of `tsx`.

## Project layout


| Path            | Role                                               |
| --------------- | -------------------------------------------------- |
| `src/index.ts`  | MCP server, tool, and Open-Meteo calls             |
| `tsconfig.json` | TypeScript (`ES2022`, `NodeNext`, `src` to `dist`) |
| `package.json`  | Scripts: `dev`, `build`, `start`                   |




## License

ISC