Weather MCP Server
Servidor MCP Weather (Laravel)
Un pequeño proyecto de aprendizaje/prueba para explorar el Protocolo de Contexto de Modelo (MCP) usando el paquete laravel/mcp. Expone un servidor MCP Weather con una única herramienta get-weather, además de una consola basada en navegador para conectar con el servidor y llamar a la herramienta manualmente.
Este repositorio existe únicamente para aprender cómo funcionan los servidores MCP de Laravel, las herramientas y el transporte Streamable HTTP — no es un servicio de producción.
Qué hay aquí
WeatherServer(app/Mcp/Servers/WeatherServer.php) — un servidor MCP registrado en/mcp/weatherque expone la herramientaget-weathere instruye al LLM sobre cuándo usarla.GetWeather(app/Mcp/Tools/GetWeather.php) — una herramienta MCP de solo lectura y mundo abierto que:Acepta una
location(obligatoria) yunits(metricoimperial, por defecto métrico).Geocodifica la ubicación mediante la API de Geocodificación de Open-Meteo.
Obtiene las condiciones actuales en vivo de la API de Pronóstico de Open-Meteo.
Devuelve contenido estructurado (temperatura, temperatura aparente, humedad, viento, condición, zona horaria, etc.) o un error amigable si no se encuentra la ubicación o el proveedor no está disponible.
CrmServer(app/Mcp/Servers/CrmServer.php) — un esqueleto de servidor vacío (registrado en/mcp/crm) que se mantiene para experimentar con un segundo conjunto de servidor/herramientas.Consola MCP Weather (resources/views/mcp-tester.blade.php) — una página HTML/JS simple servida en
/y/mcp-testerpara conectar al endpoint MCP Streamable HTTP local, descubrir sus herramientas y llamar aget-weatherde forma interactiva.Rutas MCP (routes/ai.php) — registra los dos servidores con
Mcp::web(...).
Related MCP server: Weather MCP Server
Requisitos
PHP ^8.1
Composer
Node.js + npm (para los assets de Vite de la consola)
Configuración
composer install
npm install
cp .env.example .env
php artisan key:generate
npm run dev # or: npm run build
php artisan serveNo se necesita base de datos para usar la herramienta meteorológica, pero el .env por defecto de Laravel sigue apuntando a una si se desea ejecutar migraciones.
Probándolo
Inicia la aplicación con
php artisan servey ejecutanpm run dev(o construye los assets) para que el JS/CSS de la consola estén disponibles.Abre
http://127.0.0.1:8000/(o/mcp-tester) en un navegador.Apunta el Endpoint MCP a
http://127.0.0.1:8000/mcp/weathery haz clic en Conectar y descubrir para listar las herramientas del servidor.Llama a
get-weathercon unalocation(ej.Bengaluru) y un valor opcional deunitspara ver una respuesta estructurada en vivo.
También puedes comunicarte con el servidor directamente como cliente MCP (ej. Claude Desktop, Claude Code u otro cliente compatible con MCP) apuntándolo al endpoint Streamable HTTP /mcp/weather.
Pruebas
php artisan testtests/Feature/GetWeatherToolTest.php simula las llamadas HTTP a Open-Meteo y verifica que la herramienta devuelva datos meteorológicos correctamente estructurados.
Licencia
El framework Laravel es software de código abierto licenciado bajo la licencia MIT.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables users to get current weather information for any city worldwide using the Open-Meteo API. Provides temperature and wind speed data through natural language queries.17MIT
- FlicenseBqualityDmaintenanceEnables real-time weather information and forecasts using the Open-Meteo API. Provides current weather conditions and forecast data for any location specified by latitude and longitude coordinates.1
- Alicense-qualityDmaintenanceProvides current weather information for any city worldwide using the free Open-Meteo API, enabling users to query temperature, wind speed, humidity, and weather conditions through natural language.14MIT
- Alicense-qualityDmaintenanceProvides current weather information for any city using the Open-Meteo API. Returns temperature, humidity, wind speed, and other weather data in JSON format.17MIT
Related MCP Connectors
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ranjan7586/Laravel-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server