Weather-MCP-Server
Provides weather intelligence as MCP tools (current weather, forecast, air quality, UV index, alerts) with agentic orchestration, memory, and citation-grounded RAG.
README
Weather MCP Platform
Agentic weather intelligence, built production-first. Weather data exposed as MCP tools, orchestrated by a LangGraph agent with persistent memory, grounded by citation-aware RAG over disaster-management documents — with automated reports, severe-weather alerts, and published eval numbers gating every release.
<!-- CI badge activates once .github/workflows/ci.yml lands (Week 0) -->
Why this project
Most GenAI demos stop at "it answers questions." This one is built solo, to production standards, and every claim below has a testable definition of done:
- MCP-native — five typed weather tools + resources + prompts, served over stdio and streamable HTTP; plugs into Claude Desktop or any MCP host
- Agentic — LangGraph planning agent with per-user persistent memory, token streaming, human-in-the-loop on outbound actions, and a per-request cost ledger
- Grounded — hybrid retrieval (BM25 + pgvector, RRF-fused, cross-encoder reranked) over 20+ disaster/climate documents; every corpus-derived claim carries a citation, and empty retrieval means "the corpus has no answer" — never fabrication
- Evaluated — a frozen golden dataset and RAGAS-style quality gates wired into CI; releases are blocked if faithfulness or retrieval quality regresses
- Operated — HTTPS deployment with tracing, metrics, uptime monitoring, retries, and dead-letter queues; numbers, not vibes
Architecture (target)
flowchart TB
subgraph CLIENTS["Clients"]
CD["Claude Desktop / any MCP host"]
UI["Next.js chat UI"]
CRON["Schedules (cron)"]
end
subgraph APP["FastAPI · single deployable"]
REST["REST /v1 + WebSocket<br/>JWT · RBAC · rate limits"]
MCP["MCP server<br/>stdio + streamable HTTP"]
AGENT["LangGraph agent<br/>LiteLLM · memory · HITL"]
RAG["RAG pipeline<br/>hybrid retrieve · rerank · cite"]
JOBS["Workers<br/>APScheduler · retries · DLQ"]
end
subgraph DATA["Data"]
PG[("PostgreSQL 16 + pgvector")]
RS[("Redis 7")]
end
subgraph EXT["External (outbound only)"]
OM["Open-Meteo"]
LLM["OpenAI / Ollama"]
NOTIFY["Resend / Twilio"]
LS["LangSmith"]
end
CD --> MCP
UI --> REST
CRON --> JOBS
REST --> AGENT
AGENT --> MCP
AGENT --> RAG
AGENT --> LLM
AGENT -. traces .-> LS
MCP --> OM
MCP -. cache .-> RS
RAG --> PG
AGENT --> PG
JOBS --> NOTIFY
Full component rationale, data model, and non-functional targets live in docs/PRD.md.
MCP tools (ship in v0.1)
| Tool | Returns |
|---|---|
get_current_weather |
temp, feels-like, humidity, wind speed/direction, condition |
get_forecast |
1–7 day forecast: min/max, precipitation probability, sunrise/sunset |
get_air_quality |
AQI (US + EU), PM2.5, PM10, O₃, NO₂, category + health advice |
get_uv_index |
current + daily max UV, category, safe exposure minutes |
get_weather_alerts |
active alerts: type, severity, onset, expiry, area, source |
Shared conventions: location as {city} or {lat, lon}; metric/imperial units; structured errors (INVALID_INPUT, LOCATION_NOT_FOUND, UPSTREAM_UNAVAILABLE, RATE_LIMITED); Redis-cached with per-tool TTLs. Weather data from Open-Meteo (free, keyless).
Tech stack — and why
| Layer | Choice | Why |
|---|---|---|
| API | FastAPI (async) | typed, async-native, OpenAPI docs for free |
| Database | PostgreSQL 16 + pgvector | one store for relational + vectors + full-text (BM25) |
| Cache / queues | Redis 7 | response cache, semantic cache, rate limits, pub/sub |
| Agent runtime | LangGraph | explicit state graphs; checkpointing gives durable memory |
| LLM gateway | LiteLLM | OpenAI default, local Ollama fallback — swap via env |
| MCP | official Python SDK | stdio for Claude Desktop, streamable HTTP for the web |
| Evals | RAGAS / DeepEval | spiking both, keeping one (decision D-03) |
| Observability | LangSmith + OpenTelemetry | LLM traces + infra spans, separately cheap |
| Jobs | APScheduler + SQLAlchemy store | survives restarts; no Celery needed at this scale |
| Deploy | Docker Compose + Caddy + GitHub Actions | single VPS, automatic HTTPS, CD on tag |
| UI | Next.js + Tailwind | existing skills; hard one-week timebox |
Quickstart
The standing promise from v0.1 onward: clean machine → running MCP server in ≤ 10 minutes. Until then, this brings up the current state.
# Prerequisites: Python 3.12, uv, Docker
git clone https://github.com/AbhishekRaj0037/weather-mcp-platform.git
cd Weather-MCP-Server
cp .env.example .env # config is env-only, app fails fast on missing keys
docker compose up -d # Postgres 16 (+pgvector) and Redis 7
uv sync
uv run pytest # same suite CI runs
Connect to Claude Desktop (from v0.1)
Add the server to claude_desktop_config.json and the five tools appear in any conversation:
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/weather-mcp-platform",
"weather-mcp-server"
]
}
}
}
Docs
docs/PRD.md— requirements & architecture spec v1.0: functional requirements with acceptance criteria, NFRs, tool contracts, data model, risks, open decisions- Version acceptance gates and the 26-week execution cadence live in the PRD's companion weekly plan — this repo ships against it publicly
Author
Abhishek Raj — Python backend / GenAI engineer. Building this in public, Jul–Dec 2026. GitHub · LinkedIn
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。