Submit

🌦️ MCP Weather Scraper

@EXPESRaza

A lightweight prototype demonstrating how to integrate an LLM (via OpenAI) with a Model Context Protocol (MCP) server to extract real-time weather data by scraping and processing open web content using HTML parsing and caching.
Overview

What is MCP Weather Scraper?

MCP Weather Scraper is a lightweight prototype that integrates a Large Language Model (LLM) via OpenAI with a Model Context Protocol (MCP) server to extract real-time weather data by scraping and processing open web content using HTML parsing and caching.

How to use MCP Weather Scraper?

To use MCP Weather Scraper, clone the repository, set up a virtual environment, install the dependencies, and run the server. You can then make requests to the API to fetch weather data for specific locations.

Key features of MCP Weather Scraper?

  • 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

Use cases of MCP Weather Scraper?

  1. Fetching real-time weather data for various locations.
  2. Integrating weather data into applications that require up-to-date information.
  3. Demonstrating the capabilities of LLMs in processing and reasoning over unstructured web data.

FAQ from MCP Weather Scraper?

  • Can MCP Weather Scraper handle multiple locations at once?

Currently, it is designed to handle one location per request, but this can be extended.

  • Is there a limit to the number of requests I can make?

The limit depends on the OpenAI API usage policies and your account's quota.

  • How accurate is the weather data provided?

The accuracy depends on the sources being scraped and the parsing logic implemented.

© 2025 MCP.so. All rights reserved.

Build with ShipAny.