MCP weather scraper server

MCP weather scraper server

mcp_weather_scraper•byexpesraza

An experimental MCP-compliant FastAPI server that scrapes real-time weather information from open web sources and returns it as structured data.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Offers weather scraping through browser search on an MCP-compliant server.
  • •Uses an OpenAI LLM to extract unstructured web content into a structured schema.
  • •Parses HTML using selectolax for performance.
  • •Caches responses using functools.lru_cache.

BEST FOR

  • •Retrieving structured weather data such as temperature, humidity, air quality and condition for a location.
  • •Exploring how LLMs interact with tools as intelligent agents over unstructured web data.

ABOUT MCP_WEATHER_SCRAPER

MCP weather scraper server is cataloged as an MCP server attributed to expesraza. An experimental MCP-compliant FastAPI server that scrapes real-time weather information from open web sources and returns it as structured data. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP weather scraper server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What weather fields does the server return?

It returns JSON weather data including location, temperature, humidity, air quality and condition.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 7b9fb8842972 · 采集于 2026-11-13 13:40:27 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

🌦️ MCP Weather Scraper

This project is an experimental implementation of the Model Context Protocol (MCP) using a lightweight LLM via ** OpenAI** and FastAPI to fetch and structure real-time weather information from open web sources. The goal is to explore how LLMs can interact with tools and serve as intelligent agents for retrieving and reasoning over unstructured web data.


Python License Issues


🚀 Features

  • ✅ MCP-compliant server with weather scraping via browser search
  • ✅ Integration with OpenAI LLM (e.g., gpt-3.5-turbo)
  • ✅ FastAPI server provides weather info as callable MCP tool
  • ✅ Automatic HTML parsing using selectolax for performance
  • ✅ LLM handles unstructured web content extraction into structured schema
  • ✅ Streamlit app frontend for user interaction
  • ✅ Response caching using functools.lru_cache

🧠 Refresh Before You Dive In

Top 5 Concepts to Brush Up On for This Repo

🧩 Concept🔍 What It Is⚙️ Why It Matters
Model Context Protocol (MCP)A new protocol for tool-calling in LLMsPowers structured AI-agent communication
UvicornFast ASGI server for Python web appsHosts the FastAPI-based MCP server
SelectolaxHigh-speed HTML parserEfficiently scrapes and extracts weather data
functools.lru_cacheBuilt-in Python decorator to cache function callsBoosts performance by avoiding repeated fetches
Token Usage Metrics (OpenAI)Info on how many tokens were used in an LLM callHelps track cost and optimize prompt design

💡 Even if you're familiar with Python and APIs, these tools represent cutting-edge AI stack engineering and are worth a quick look!


📊 Token Usage & Performance Metrics

The Streamlit UI now includes:

  • ⏱️ Response Time
    Time taken to fetch and process weather info

  • 🧠 Prompt Tokens
    Tokens used in the LLM prompt

  • 💬 Completion Tokens
    Tokens generated in the LLM response

  • 🔢 Total Tokens
    Total token count per request, useful for cost tracking

These are displayed in a clean visual layout under each result card.


🖥️ Streamlit App Preview


Requirements

  • Python 3.9 or higher
  • Dependencies listed in requirements.txt

🛠️ Setup

  1. Clone the repo
    git clone https://github.com/your-username/mcp_weather_scraper.git
    cd mcp_weather_scraper
    
  2. Create and activate a virtual environment
    python -m venv .venv
    .venv\Scripts\activate  # On Windows
    
  3. Install dependencies
    pip install -r requirements.txt
    
  4. Set environment variables Create a .env file in the root directory and add your OpenAI API key
    OPENAI_API_KEY=your_openai_api_key
    
  5. Running the Server
    uvicorn server:app --reload
    
    The server will be available at http://localhost:8000. You can access the API documentation at:
  6. Making a Request
    python client.py
    
    OR
    curl -X POST http://localhost:8000/weather -H "Content-Type: application/json" -d '{"location": "Seattle"}'
    
    The script sends a POST request with the following payload:
    {
      "location": "Seattle"
    }
    
    The server will respond with weather data in JSON format, such as:
    {
      "location": "Seattle",
      "temperature": "15°C",
      "humidity": "80%",
      "air_quality": "Good",
      "condition": "Cloudy"
    }
    

📦 Folder Structure

.
📁 mcp_weather_scraper/
│
├── assets/
│   └── streamlit_screenshot.png
├── server.py          # MCP-compatible tool server
├── client.py          # MCP client that interacts with model + tools
├── data_models.py     # Pydantic schemas for request/response
├── utils.py           # HTML cleaning, scraping, etc.
├── requirements.txt
└── .env

📄 License

This project is licensed under the MIT License.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP weather scraper server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp_weather_scraper)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research