MCPInstall
mcp-lightning-lesson logo

mcp-lightning-lesson

by rafaelpierre 2 stars rafaelpierre/mcp-lightning-lesson

A Python project using OpenAI GPT models and MCP to fetch weather data.

READMEmain

Build Your First Agentic AI App with MCP

Maven Lightning Lesson

A Python project demonstrating the use of OpenAI GPT models and MCP (Model Context Protocol) agents to fetch and process real-world data.

Overview

This project provides an example of using a custom agent to retrieve weather forecasts for Hintertux, Austria, by fetching data from the meteoblue.com website. It leverages the openai-agents library and its capabilities to run and expose MCP Servers.

Features

  • Custom agent implementation using OpenAI GPT models
  • Integration with MCP server for data fetching
  • Example function tool (get_time) for current time retrieval
  • Returns structured JSON output

Requirements

  • Python 3.13+
  • OpenAI API key

Installation

  1. Clone the repository:
    git clone ...
    cd mcp-lightning-lesson
    
  2. Create a venv using uv:
    uv venv
    
  3. Copy the example environment file and add your OpenAI API key:
    cp .env.example .env
    # Edit .env and set your OPENAI_API_KEY
    

Usage

Run the main script:

uv run python main.py

The agent will:

  • Fetch the weather forecast for Hintertux, Austria
  • Get the current time
  • Return the results as a JSON payload

Project Structure

  • main.py – Main application logic
  • pyproject.toml – Project dependencies and metadata
  • .env.example – Example environment variable file

Dependencies

  • openai-agents >= 0.0.15
  • python-dotenv >= 1.1.0

Frontend

Coming soon!

More Research & Data MCP servers

Similar servers from the same category.

WeatherXM PRO

weatherxm

Integrates with WeatherXM PRO APIs to provide access to hyperlocal weather data, historical observations, and forecast performance metrics for location-specific analysis and planning.

APICLI+6

Gralio

tymonte

Access 3+ million SaaS reviews, detailed pricing data, alternatives, ratings, funding information, growth metrics, user sentiment analysis, and functional feature data for over 30,000 software products.

Research & Data

Integrates with professional cryptocurrency data APIs from DefiLlama Pro, CoinGecko Pro, and Arkham Intelligence to provide real-time token prices, market data, blockchain analytics, and on-chain intelligence for crypto researchers and traders.

search

Enables semantic and keyword searches across Space Frontiers' library, telegram, and reddit databases through a FastAPI-based server with flexible authentication options.

databaseauthentication+1