mcp-weather
README.md
# mcp-weather
Open-Meteo weather MCP server.
Tools:
- `geocode_search(name)` — city name to coordinates.
- `get_weather(city)` — current temperature, wind, condition, time.
## Setup
```bash
python3 -m venv .venv
.venv/bin/pip install "mcp>=2.3"
```
Run manually over stdio:
```bash
.venv/bin/python server.py
```
Every client below needs the **absolute** path to the venv interpreter and to `server.py`. Restart the client after editing its config.
## Registering the MCP
### 1. Cursor
Project config `.cursor/mcp.json`, or global `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"weather": {
"command": "/absolute/path/to/mcp-weather/.venv/bin/python",
"args": ["/absolute/path/to/mcp-weather/server.py"]
}
}
}
```
### 2. Claude Code / Claude Desktop
Claude Code:
```bash
claude mcp add weather -- /absolute/path/to/mcp-weather/.venv/bin/python /absolute/path/to/mcp-weather/server.py
```
Or project `.mcp.json`:
```json
{
"mcpServers": {
"weather": {
"type": "stdio",
"command": "/absolute/path/to/mcp-weather/.venv/bin/python",
"args": ["/absolute/path/to/mcp-weather/server.py"]
}
}
}
```
Claude Desktop uses the same `mcpServers` object in `claude_desktop_config.json`:
- Linux: `~/.config/Claude/claude_desktop_config.json`
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
### 3. Codex
`~/.codex/config.toml`:
```toml
[mcp_servers.weather]
command = "/absolute/path/to/mcp-weather/.venv/bin/python"
args = ["/absolute/path/to/mcp-weather/server.py"]
```
Verify with `codex mcp list`.
### 4. OpenCode
`~/.config/opencode/opencode.json`:
```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"weather": {
"type": "local",
"command": [
"/absolute/path/to/mcp-weather/.venv/bin/python",
"/absolute/path/to/mcp-weather/server.py"
],
"enabled": true
}
}
}
```
## Notes
- Point at `.venv/bin/python`, not system `python3`.
- Use stdio; do not add flags or transports.
- Missing city or provider failure returns an MCP error result; the server stays up.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues