Skip to main content
Glama

Weather MCP Server

mcp-poc

Proyecto de prueba de concepto (POC) para un servidor MCP (Model Context Protocol) usando TypeScript y el SDK oficial.

Descripción

Este proyecto implementa un servidor MCP sencillo que expone una herramienta para obtener el clima actual de una ciudad utilizando la API de Open-Meteo. El servidor se comunica a través de stdin/stdout, lo que lo hace ideal para integraciones o pruebas automatizadas.

Requisitos

  • Node.js (recomendado v18+)
  • pnpm (o npm/yarn)

Instalación

pnpm install # o npm install # o yarn install

Uso

Para iniciar el servidor:

pnpm start # o node main.ts

El servidor expondrá una herramienta llamada get-weather que recibe el nombre de una ciudad y retorna información meteorológica actual.

Dependencias principales

  • @modelcontextprotocol/sdk: SDK oficial para implementar servidores MCP.
  • zod: Validación de esquemas para los parámetros de las herramientas.

Estructura principal

  • main.ts: Implementación del servidor MCP y la herramienta de clima.
  • .gitignore: Configuración para ignorar archivos y carpetas comunes en proyectos Node.js.

Para poder probar el servidor MCP con el inspector, se puede usar el siguiente comando:

npx @modelcontextprotocol/inspector npx -y tsx main.ts

Para agregar el mcp dentro del IDE, hay que seguir el siguiente formato json:

{ "mcpServers": { "demo":{ "command": "npx", "args": [ "-y", "tsx", "<path_to>/mcp-poc/main.ts" ] } } }
-
security - not tested
F
license - not found
-
quality - not tested

A simple MCP server that provides a tool to fetch current weather information for cities using the Open-Meteo API, communicating through stdin/stdout.

  1. Descripción
    1. Requisitos
      1. Instalación
        1. Uso
          1. Dependencias principales
            1. Estructura principal

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that retrieves current weather information for specified cities using the Open-Meteo API, requiring no API key.
                Last updated -
                4
                Python
                Apache 2.0
                • Linux
                • Apple
              • 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
                F
                license
                -
                quality
                An MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.
                Last updated -
                Python
                • Linux
                • Apple

              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/panchocorderos/poc-mcp'

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