Skip to main content
Glama

Weather Query MCP Server

by eternachen

Ejemplo de servidor/cliente MCP de consulta meteorológica

Este proyecto es un cliente de consulta meteorológica que interactúa con un servidor MCP (Modelo-Cliente-Protocolo) para obtener y mostrar información meteorológica de una ciudad específica.

Características

  • Se conecta a un servidor MCP para enumerar las herramientas disponibles.
  • Consulta información meteorológica de una ciudad específica.
  • Muestra información meteorológica formateada, incluida la temperatura, la humedad, la velocidad del viento y la descripción del clima.

Requisitos

  • Python 3.8+
  • biblioteca openai
  • biblioteca dotenv
  • biblioteca mcp

Configuración

  1. Clonar el repositorio:
    git clone <repository_url> cd <repository_directory>
  2. Crea un entorno virtual y actívalo:
    python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
  3. Instale las dependencias necesarias:
    pip install -r requirements.txt
  4. Cree un archivo .env en el directorio raíz y agregue su clave API de OpenAI y otras configuraciones:
    OPENAI_API_KEY=<your_openai_api_key> BASE_URL=<your_base_url> MODEL=<your_model>

Uso

  1. Inicie el servidor MCP:
    python server.py
  2. Ejecute el cliente y conéctese al servidor:
    python client.py <path_to_server_script>
  3. Interactuar con el cliente:
    • Escriba el nombre de la ciudad en inglés para obtener la información meteorológica.
    • Escriba quit para salir del cliente.

Estructura del proyecto

  • server.py : Contiene la implementación del servidor MCP y la herramienta de consulta meteorológica.
  • client.py : Contiene la implementación del cliente MCP para interactuar con el servidor.
  • .env : Variables de entorno para claves API y configuraciones.
  • .gitignore : especifica los archivos y directorios que Git debe ignorar.
  • README.md : Documentación del proyecto.

Licencia

Este proyecto está licenciado bajo la licencia MIT.

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Una implementación de servidor MCP que permite a los usuarios obtener y mostrar información meteorológica para ciudades específicas, incluida la temperatura, la humedad, la velocidad del viento y descripciones del clima.

  1. Características
    1. Requisitos
      1. Configuración
        1. Uso
          1. Estructura del proyecto
            1. Licencia

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                An MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.
                Last updated -
                1
                Python
                MIT License
                • Linux
                • Apple
              • -
                security
                F
                license
                -
                quality
                A simple MCP service that allows users to query weather conditions for cities worldwide through the Cursor AI assistant.
                Last updated -
                JavaScript
              • -
                security
                A
                license
                -
                quality
                An MCP server that connects to OpenWeatherMap's API to provide current weather data and multi-day forecasts for locations worldwide in different measurement units.
                Last updated -
                12
                TypeScript
                MIT License
              • A
                security
                F
                license
                A
                quality
                MCP server that provides Korean weather information using grid coordinates and the Korea Meteorological Administration API, allowing users to query current weather conditions and forecasts for specific locations in Korea.
                Last updated -
                2
                3
                Python
                • Apple
                • Linux

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/eternachen/mcp-playground'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server