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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.