Skip to main content
Glama

MCP Weather Server

Servidor y cliente basados en SSE para MCP

Esto demuestra un patrón de funcionamiento para servidores MCP basados en SSE y clientes MCP independientes que utilizan herramientas de estos. Basado en una discusión original aquí .

Uso

Nota : asegúrese de proporcionar ANTHROPIC_API_KEY en .env o como una variable de entorno.

uv run weather.py uv run client.py http://0.0.0.0:8080/sse
Initialized SSE client... Listing tools... Connected to server with tools: ['get_alerts', 'get_forecast'] MCP Client Started! Type your queries or 'quit' to exit. Query: whats the weather like in Spokane? I can help you check the weather forecast for Spokane, Washington. I'll use the get_forecast function, but I'll need to use Spokane's latitude and longitude coordinates. Spokane, WA is located at approximately 47.6587° N, 117.4260° W. [Calling tool get_forecast with args {'latitude': 47.6587, 'longitude': -117.426}] Based on the current forecast for Spokane: Right now it's sunny and cold with a temperature of 37°F and ...

¿Por qué?

Esto significa que el servidor MCP ahora puede ser un proceso en ejecución al que los agentes (clientes) se conectan, usan y desconectan cuando y donde quieran. En otras palabras, un servidor basado en SSE y los clientes pueden ser procesos desacoplados (incluso, potencialmente, en nodos desacoplados). Esto es diferente y se adapta mejor a los casos de uso nativos de la nube que el patrón basado en STDIO, donde el propio cliente genera el servidor como un subproceso.

Instalación mediante herrería

Para instalar automáticamente el servidor y el cliente basados en SSE para Claude Desktop a través de Smithery :

npx -y @smithery/cli install @sidharthrajaram/mcp-sse --client claude

Servidor

weather.py es un servidor MCP basado en SSE que presenta herramientas basadas en las API del Servicio Meteorológico Nacional. Adaptado del ejemplo de implementación del servidor STDIO en la documentación de MCP.

De forma predeterminada, el servidor se ejecuta en 0.0.0.0:8080, pero se puede configurar con argumentos de línea de comando como:

uv run weather.py --host <your host> --port <your port>

Cliente

client.py es un cliente MCP que se conecta y utiliza herramientas del servidor MCP basado en SSE. Adaptado del ejemplo de implementación del cliente STDIO en la documentación de MCP.

De forma predeterminada, el cliente se conecta al punto final SSE proporcionado en el argumento de la línea de comando como:

uv run client.py http://0.0.0.0:8080/sse
-
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.

Este servidor MCP basado en SSE permite a los usuarios conectarse e interactuar con las API del Servicio Meteorológico Nacional para recuperar alertas y pronósticos meteorológicos.

  1. Uso
    1. ¿Por qué?
      1. Instalación mediante herrería
      2. Servidor
      3. Cliente

    Related MCP Servers

    • -
      security
      F
      license
      -
      quality
      This is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)
      Last updated -
      Python
      • Linux
      • Apple
    • -
      security
      F
      license
      -
      quality
      An MCP server that provides weather information like forecasts and alerts for US locations using the National Weather Service API.
      Last updated -
      2
      JavaScript
    • -
      security
      F
      license
      -
      quality
      An MCP server that provides weather information and alerts for US locations using the National Weather Service API, enabling retrieval of weather forecasts and active weather alerts.
      Last updated -
      Python
    • -
      security
      A
      license
      -
      quality
      A Python-based MCP server that provides real-time weather information using the National Weather Service API, supporting both synchronous and asynchronous HTTP requests.
      Last updated -
      Python
      MIT License

    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/sidharthrajaram/mcp-sse'

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