MCP.so
登录

Weather MCP (MCP) Demo

@sturlese

基本信息

分类

媒体与设计

传输方式

stdio

作者

sturlese

关于 Weather MCP (MCP) Demo

暂无概览

Weather MCP (MCP) Demo 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

Weather MCP (MCP) Demo 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Weather MCP (Model Context Protocol) Demo?

Weather MCP (Model Context Protocol) Demo is a demonstration project that implements a Model Context Protocol (MCP) system for weather information. It consists of a Python-based MCP server that provides weather data and an OpenAI GPT-4 client that processes natural language queries, enabling users to ask about weather through a command-line interface.

How to use Weather MCP (Model Context Protocol) Demo?

Clone the repository, create a .env file with your OpenAI API key in both server_weather/ and client_weather_openai/ directories, install dependencies using a Python virtual environment and pip install -r requirements.txt. Start the server with python server_weather.py, then start the client with python weather_agent_openai.py and ask natural language questions like "What's the weather in New York today?"

Key features of Weather MCP (Model Context Protocol) Demo

  • Server exposes weather endpoint via SSE (http://localhost:4000/sse)
  • Provides a fetch-weather tool discoverable by MCP clients
  • Client integrates with OpenAI GPT-4 for natural language processing
  • Automatic tool discovery from the MCP server
  • Interactive command-line interface for user interactions

Use cases of Weather MCP (Model Context Protocol) Demo

  • Query current weather in any city using natural language
  • Demonstrate Model Context Protocol integration between an AI agent and a weather service
  • Experiment with MCP tool discovery and SSE transport
  • Showcase OpenAI GPT-4's ability to invoke external tools

常见问题

1

What does this server do?

The Weather MCP server provides a `fetch-weather` tool that returns weather information. The client uses OpenAI's GPT-4 to interpret natural language questions and calls the server tool to answer them.

2

What are the runtime requirements?

You need Python 3.x, an OpenAI API key (obtainable from the OpenAI Platform), and a properly configured `.env` file with your key.

3

What transport protocol does it use?

The server communicates via Server-Sent Events (SSE) and listens on `http://localhost:4000/sse`.

4

Where does the weather data come from?

The README does not specify the data source; the server provides weather information through its `fetch-weather` tool.

5

Is this project ready for production?

No, this is a demonstration project meant for learning and experimentation with the Model Context Protocol. It is open source under the MIT License and welcomes contributions.

评论

媒体与设计 分类下的更多 MCP 服务器