Weather MCP Server
Enables real-time weather information retrieval and local search history management using Open Meteo APIs. Allows users to get current weather data for any city and access their weather query history through natural language.
README
π€οΈ Weather Server - MCP Implementation (Node.js)
π§© Servidor MCP de Clima e Historial β VersiΓ³n Final
Este proyecto implementa un servidor MCP (Model Context Protocol) en Node.js que permite a modelos de lenguaje (como Claude o GPT) obtener informaciΓ³n climΓ‘tica en tiempo real y consultar un historial local de bΓΊsquedas, utilizando APIs abiertas y almacenamiento local en JSON.
π 1. ΒΏQuΓ© es el MCP (Model Context Protocol)?
El Model Context Protocol (MCP) es un protocolo abierto desarrollado por Anthropic y la comunidad de IA para conectar modelos de lenguaje con fuentes de informaciΓ³n externas y herramientas locales de manera segura y estructurada.
En tΓ©rminos simples:
El MCP permite que un modelo de IA hable con tu aplicaciΓ³n, acceda a datos o ejecute funciones, sin exponer directamente tu cΓ³digo ni tus APIs privadas.
βοΈ 2. CΓ³mo funciona el MCP
Un MCP Server es una aplicaciΓ³n que expone:
- π οΈ Tools (herramientas) β Acciones que el modelo puede ejecutar (por ejemplo:
get-weather,get-history). - π Resources (recursos) β Archivos o datos a los que el modelo puede acceder (por ejemplo:
weather-codes.json). - π Events (opcional) β Notificaciones o flujos de datos en tiempo real.
El modelo de IA actΓΊa como cliente MCP, que se comunica con tu servidor usando un canal seguro (en este caso, stdio, o entrada/salida estΓ‘ndar).
π§© 3. DescripciΓ³n del proyecto (main.ts)
El archivo main.ts define un servidor MCP en Node.js que ofrece dos herramientas y un recurso:
π οΈ Herramienta 1: get-weather
PropΓ³sito: Obtener el clima actual de una ciudad.
Flujo:
- Busca la ciudad en la Geocoding API de Open Meteo para obtener coordenadas.
- Consulta los datos del clima actual en la Weather API de Open Meteo.
- Guarda la consulta (ciudad, coordenadas, temperatura, fecha) en un archivo local
history.json. - Devuelve al modelo una respuesta simplificada con temperatura y humedad.
π Ejemplo de respuesta:
{
"city_searched": "Santiago",
"current_temperature_c": 22.5,
"relative_humidity_percent": 48,
"weather_code": 1
}
π§ **Arquitectura conceptual**
ββββββββββββββββββββββββββββββββ
β Modelo de IA (Cliente) β
β (Claude, GPT, etc.) β
βββββββββββββββ¬βββββββββββββββββ
β
JSON (via STDIO / MCP)
β
βββββββββββββββ΄βββββββββββββββββ
β Tu Servidor MCP (Node) β
β βββ Tool: get-weather β
β βββ Tool: get-history β
β βββ Resource: weather-codes β
βββββββββββββββ¬βββββββββββββββββ
β
βββββββββββββββ΄βββββββββββββββββ
β APIs externas (OpenMeteo)β
β Archivos locales (.json) β
ββββββββββββββββββββββββββββββββ
π¦ **InstalaciΓ³n y ejecuciΓ³n**
# Clonar el repositorio
git clone https://github.com/IAcademico/weather-mcp-server.git
cd weather-mcp-server
# Instalar dependencias
npm install
# Ejecutar el servidor MCP
npm run start
π **Estructura del proyecto**
π¦ weather-mcp-server
β£ π .vscode/
β£ π node_modules/
β£ π project_scanners/
β£ π main.ts
β£ π history.json
β£ π weather-codes.json
β π README.md
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.