Basic information
About 🌦️ MCP Weather Scraper Server
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.
🌦️ MCP Weather Scraper is a MCP server in the Browser Automation category listed in the AddMCP.net directory, published by EXPESRaza. Supported transport: stdio. Runtime: python. License: MIT. Source code is hosted on github.com. Related topics: fastapi, llm, llm-mcp-openai-fastapi-pydantic-selectolax, mcp, openai.
Setup
{
"mcpServers": {
"mcp_weather_scraper": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}
{
"mcpServers": {
"mcp_weather_scraper": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}
{
"servers": {
"mcp_weather_scraper": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}
🌦️ MCP Weather Scraper config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp_weather_scraper": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}
🌦️ MCP Weather Scraper tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is 🌦️ MCP Weather Scraper?
An experimental MCP (Model Context Protocol) server that uses OpenAI and FastAPI to fetch and structure real-time weather information from open web sources. It is designed for developers exploring how LLMs can interact with tools to retrieve and reason over unstructured web data.
How to use 🌦️ MCP Weather Scraper?
After cloning the repo, creating a virtual environment, installing dependencies, and setting the OPENAI_API_KEY environment variable, start the server with uvicorn server:app --reload. The server listens at http://localhost:8000. You can send a POST request to /weather with a JSON body containing a "location" field (e.g., {"location": "Seattle"}) using client.py or curl.
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 exposing weather as a callable MCP tool
- Automatic HTML parsing using
selectolaxfor performance - Streamlit app frontend for user interaction
- Response caching and token usage metrics
Use cases of 🌦️ MCP Weather Scraper
- Fetching structured current weather data for any location
- Integrating real-time weather retrieval into AI agent workflows
- Prototyping MCP-based tool‑calling systems with LLMs
- Exploring how LLMs parse unstructured web content into structured schemas
Frequently asked questions
1 What is the Model Context Protocol (MCP)?
MCP is a new protocol for tool‑calling in LLMs that powers structured AI‑agent communication.
2 What are the runtime requirements?
Python 3.9 or higher and dependencies listed in requirements.txt. You also need an OpenAI API key stored in a .env file.
3 How does the server fetch weather data?
The server performs a browser search on open web sources and uses selectolax (a high‑speed HTML parser) to extract raw weather content. The LLM then structures that content into a JSON response.
4 Does this server have a user interface?
Yes, a Streamlit app frontend is included. It displays results along with response time, prompt tokens, completion tokens, and total tokens per request.
5 What transport and authentication does the server use?
The server uses HTTP (FastAPI) and authenticates with an OpenAI API key via an environment variable. There is no additional authentication for the server endpoint itself.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In