MCP ExplorerExplorer

Qweather Mcp Go

@overstarryon 9 months ago
1 MIT
FreeCommunity
AI Systems
qweather-mcp-go is a tool for QWeather API providing weather queries and forecasts.

Overview

What is Qweather Mcp Go

qweather-mcp-go is an implementation of the Model Context Protocol (MCP) designed to interface with the QWeather API, providing various weather-related functionalities.

Use cases

Use cases include integrating weather data into personal assistant applications, providing weather updates in smart home systems, and developing educational tools that teach about climate and weather patterns.

How to use

To use qweather-mcp-go, set the required environment variables for the QWeather API, choose between stdio or SSE mode for running, and execute the appropriate command based on your operating system.

Key features

Key features include real-time weather queries, weather forecasts, air quality queries, and life indices queries, all accessible through a user-friendly API.

Where to use

qweather-mcp-go can be used in applications requiring weather data, such as mobile apps, web applications, and AI assistants that need real-time environmental information.

Content

qweather-mcp-go

smithery badge

MCP (Model Context Protocol) tool implementation for QWeather API.

Features

This project provides a series of QWeather API tools, including:

  • Real-time weather query
  • Weather forecast
  • Air quality query
  • Life indices query

Running Methods

This project supports two running modes:

  1. stdio mode: Communicate with clients through standard input and output
  2. SSE mode: Provide API on HTTP server through Server-Sent Events (default mode)

Environment Variables Setup

The following environment variables need to be set before running:

  • QWEATHER_API_BASE: Base URL of QWeather API (e.g., https://api.qweather.com)
  • QWEATHER_API_KEY: QWeather API key

Windows Running Method

  1. Edit the run.bat file to set your API key
  2. Double-click to run the run.bat file or run run.bat in the command line

Linux/Mac Running Method

  1. Edit the .env file to set your API key
  2. Run the following commands:
chmod +x run.sh
./run.sh

Command Line Arguments

You can use the following command line arguments to control the program’s behavior:

  • -t or --transport: Specify the transport type, options are stdio or sse (default is sse)
  • -p or --port: Specify the port for the SSE server to listen on (default is 8080)

For example:

go run main.go -t stdio  # Run in stdio mode
go run main.go -p 3000   # Run in SSE mode, listening on port 3000

Usage

SSE Mode

When running in SSE mode, the server will provide HTTP API on the specified port. You can connect to this server using a client that supports the MCP protocol.

By default, the server address is: http://localhost:8080

stdio Mode

When running in stdio mode, the server will communicate with clients through standard input and output. This mode is suitable for integration with AI assistants (such as Claude) that support the MCP protocol.

Installing via Smithery

To install qweather-mcp-go for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @overstarry/qweather-mcp-go --client claude

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers