OpenAI-MCP-WeatherStack

omkarwazulkar/OpenAI-MCP-WeatherStack

3.2

If you are the rightful owner of OpenAI-MCP-WeatherStack and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

WeatherFullStackMCP is a comprehensive full-stack Weather AI Agent that integrates various technologies to provide real-time weather data.

Tools
2
Resources
0
Prompts
0

📌 OpenAI-MCP-WeatherStack

A full-stack Weather AI Agent built using:

  • OpenAI Agents SDK (TypeScript) as the backend agent runner
  • Python MCP Server (FastMCP + Requests) for weather tools
  • Node Express to expose the agent to the frontend
  • React + Vite + Tailwind as the UI client

Weather data is fetched in real-time using the wttr.in API.


🚀 Tech Stack

LayerTech
MCP ToolsPython • FastMCP • Requests
Backend AgentNode • TypeScript • @openai/agents
API GatewayExpress Server
FrontendReact • Vite • Tailwind

🏗 Architecture Flow

graph TD
    A((React UI :5173)) --> B[(Express API :3001)]
    B --> C[[OpenAI Agent Runtime - TypeScript SDK]]
    C --> D[(MCP Weather Server :8000 Python)]
    D --> E[(wttr.in API)]

📂 Final Project Structure

alt text


🔑 Requirements (at current stage)

  • Python 3.11
  • Node 22.14.0
  • npm 10.9.2
  • OpenAI API Key sk-proj-ABCD1234

🧪 Setup Instructions

Clone Project

git clone https://github.com/omkarwazulkar/OpenAI-MCP-WeatherStack.git
cd OpenAI-MCP-WeatherStack

Step 1: MCP Python Server

  • Setup Python MCP Server
python3.11 -m venv .venv
source .venv/bin/activate
pip install fastmcp requests
  • Run MCP Server Command
python mcp_server.py

MCP Server Running : http://localhost:8000/mcp (Note: Selecting streamable-http in mcp.run(transport="streamable-http") gets the mcp server running locally at /mcp endpoint)

Step 2: Node Backend (Open New Terminal)

  • Setup Node Backend
cd OpenAI-MCP-WeatherStack
npm install
npm install dotenv
  • Create .env (Root)
touch .env
  • Add:
OPENAI_API_KEY=your_openai_api_key_here
  • Run Express Server Command
npx ts-node express_server.ts

Express Server Running : http://localhost:3001/

Step 3: React Frontend (Open New Terminal)

  • Setup Frontend UI
cd OpenAI-MCP-WeatherStack
cd frontend
npm install
  • Run React Command
npm run dev

Frontend Running : http://localhost:5173/

💬 Usage

What is the weather in New York?
  • Click "Ask".

  • Response: alt text

  • Response Path: React → Express → Agent → MCP → Weather API → UI

⭐ Features

  • Real Weather Retrieval via MCP
  • Clean Tailwind UI
  • .env Key With dotenv
  • Modular Component Structure

🤝 Contribute

  • Pull Requests Welcome.
  • If you like this project, ⭐ star the repo!