Skip to main content
Glama
raviraval79

weather-mcp-server

by raviraval79

weather-mcp-server

An MCP server wrapping the Open-Meteo API, deployed on GCP Cloud Run. No API key required — Open-Meteo is free and open.

Tools

Tool

Description

get_current_weather

Current conditions for a lat/lon

get_forecast

Up to 16-day daily (or hourly) forecast

get_historical_weather

Historical daily data for a date range

Related MCP server: Simple Weather MCP

Local development

# Install dependencies
pip install -r requirements.txt

# Run the server
uvicorn app.main:app --reload --port 8080

# Health check
curl http://localhost:8080/health

# Test with MCP Inspector
npx @modelcontextprotocol/inspector http://localhost:8080/mcp

GCP Setup (one-time)

1. Enable APIs

gcloud services enable run.googleapis.com artifactregistry.googleapis.com \
  --project=weather-mcp-project

2. Create Artifact Registry repository

gcloud artifacts repositories create mcp-images \
  --repository-format=docker \
  --location=us-central1 \
  --description="Docker images for weather-mcp-server" \
  --project=weather-mcp-project

3. Set cleanup policy (keeps storage within free 0.5 GB tier)

gcloud artifacts repositories set-cleanup-policies mcp-images \
  --project=weather-mcp-project \
  --location=us-central1 \
  --policy='[{"name":"keep-last-2","action":{"type":"Keep"},"mostRecentVersions":{"keepCount":2}}]'

4. Create a Service Account for GitHub Actions

gcloud iam service-accounts create github-actions-sa \
  --display-name="GitHub Actions SA" \
  --project=weather-mcp-project

# Grant required roles
for role in roles/run.admin roles/artifactregistry.writer roles/iam.serviceAccountUser; do
  gcloud projects add-iam-policy-binding weather-mcp-project \
    --member="serviceAccount:github-actions-sa@weather-mcp-project.iam.gserviceaccount.com" \
    --role="$role"
done

# Export key
gcloud iam service-accounts keys create sa-key.json \
  --iam-account=github-actions-sa@weather-mcp-project.iam.gserviceaccount.com

5. Add GitHub repository secrets

In your repo → Settings → Secrets and variables → Actions, add:

Secret

Value

GCP_SA_KEY

Contents of sa-key.json (delete the file after!)

The project ID and region are hardcoded in the workflow — no secret needed for those.

Deployment

Push to main — GitHub Actions builds the Docker image, pushes it to Artifact Registry, and deploys to Cloud Run automatically.

Smoke test (post-deploy)

CLOUD_RUN_URL=https://<your-cloud-run-url>

# Health
curl $CLOUD_RUN_URL/health

# List MCP tools
curl -X POST $CLOUD_RUN_URL/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

Cost

Everything runs within GCP free tier limits at typical personal/dev usage. See PLAN.md for the full breakdown.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raviraval79/weather-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server