Weather MCP Server demo with an OpenAI GPT-4 client

Weather MCP Server demo with an OpenAI GPT-4 client

client_server_mcp•bysturlese

A Python MCP server that provides weather information over SSE, paired with an OpenAI GPT-4 client for natural language weather queries.

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

WHAT IT DOES

  • •Implements an MCP server exposing a weather information endpoint via SSE.
  • •Provides a fetch-weather tool discoverable by MCP clients.
  • •Includes a client that uses OpenAI's GPT-4 model with automatic MCP tool discovery for natural language weather queries.

BEST FOR

  • •Querying weather information through a natural language interface powered by GPT-4.
  • •Demonstrating MCP communication between an AI agent client and a weather service.

ABOUT CLIENT_SERVER_MCP

Weather MCP Server demo with an OpenAI GPT-4 client is cataloged as an MCP server attributed to sturlese. A Python MCP server that provides weather information over SSE, paired with an OpenAI GPT-4 client for natural language weather queries. 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 Weather MCP Server demo with an OpenAI GPT-4 client 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

How does the AI agent connect to the weather service?

It communicates with the MCP server over SSE using the Model Context Protocol.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 4c03f8696757 · 采集于 2026-11-13 13:27:57 UTC

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

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

🌦️ Weather MCP (Model Context Protocol) Demo

This project demonstrates the implementation of a Model Context Protocol (MCP) system for weather information, consisting of a client using OpenAI's agents and a dedicated MCP server. The system allows users to query weather information through a natural language interface powered by GPT-4.


🌟 Overview

The project is split into two main components:

  • Weather MCP Server: A Python-based server that provides weather information.
  • Weather OpenAI Client: A client that uses OpenAI's GPT-4 model to process natural language requests and interact with the MCP server.

🚀 Components

🌐 Weather MCP Server

📁 Located in: /server_weather/

The server component implements a Model Context Protocol server that:

  • Exposes a weather information endpoint via SSE (Server-Sent Events).
  • Provides a fetch-weather tool that can be discovered by MCP clients.
  • Runs on http://localhost:4000/sse.

🤖 Weather OpenAI Client

📁 Located in: /client_weather_openai/

The client component features:

  • Integration with OpenAI's GPT-4 model.
  • Automatic tool discovery from the MCP server.
  • Natural language processing for weather queries.
  • Interactive command-line interface for user interactions.

📋 Prerequisites

  • Python 3.x
  • OpenAI API Key (Get yours from OpenAI Platform)
  • Environment Variables properly configured (.env file)

🔧 Setup

1. Clone this repository

git clone git@github.com:sturlese/client_server_mcp.git
cd client_server_mcp

2. Set up environment variables

  • Create a .env file in the root of each component (/server_weather/ and /client_weather_openai/).
  • Add your OpenAI API key:
# Example of .env file
OPENAI_API_KEY='your-api-key-here'

3. Install dependencies

Server component:

cd server_weather/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Client component:

cd ../client_weather_openai/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

🎮 Usage

Start the MCP Server

cd server_weather/
source venv/bin/activate
python server_weather.py

Start the OpenAI Client

cd client_weather_openai/
source venv/bin/activate
python weather_agent_openai.py

Example Usage

What's the weather in New York today?

🏗️ Architecture

The system uses the Model Context Protocol (MCP) to enable seamless communication between the AI agent and the weather service:

User ---> OpenAI Agent (Client) ---> MCP Server ---> Weather Data

📝 License

This project is open-source and available under the MIT License.


🤝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the project.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add your feature').
  5. Push to your branch (git push origin feature/your-feature).
  6. Open a pull request.

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 Weather MCP Server demo with an OpenAI GPT-4 client 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/client_server_mcp)

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