mcp-weather-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-weather-serverwhat's the weather in Tokyo?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Weather Server Tutorial
This project demonstrates how to build a simple Model Context Protocol (MCP) server that provides weather information for any city using the Open-Meteo API.
Features
MCP server using
@modelcontextprotocol/sdkOne tool:
get-weather(returns weather for a given city)Uses geocoding and weather APIs from Open-Meteo
Returns weather data in JSON format
Related MCP server: Weather MCP Server
How It Works
The MCP server exposes a tool called
get-weather.When a city name is provided, the server:
Uses Open-Meteo's geocoding API to get latitude and longitude for the city.
Fetches current weather data for those coordinates.
Returns the weather data as a JSON response.
If the city is not found, a helpful error message is returned.
Prerequisites
Node.js (v18+ recommended)
MCP Inspector (or any MCP client)
Setup
Clone this repository or copy the files to your workspace.
Install dependencies:
npm install npm install node-fetchUpdate your
main.tsto importfetchfromnode-fetchif running in Node.js:import fetch from "node-fetch";Start the MCP server using MCP Inspector:
npx -y @modelcontextprotocol/inspector npx tsx main.ts
Usage
Open MCP Inspector and connect to your server.
Use the
get-weathertool, enter a city name (e.g., "Paris", "Bangalore", "Chennai").The server will respond with the current weather data for that city.
Example Tool Response
{
"latitude": 13,
"longitude": 80.125,
"current": {
"temperature_2m": 30,
"relative_humidity_2m": 66,
"wind_speed_10m": 14.9,
"cloud_cover": 94,
"apparent_temperature": 33.2
}
}Troubleshooting
If you see
fetch is not defined, make sure you have installed and importednode-fetch.If the city is not found, check for typos or try a nearby major city.
License
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
- Flicense-qualityDmaintenanceEnables users to get current weather information for any city using the Open-Meteo API. Provides detailed meteorological data including temperature, precipitation, day/night status, and hourly forecasts through natural language queries.
- Flicense-qualityDmaintenanceEnables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.
- 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.16MIT
- 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.15MIT
Related MCP Connectors
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
Global weather API: forecasts, historical data, marine, ski, astronomy and timezone.
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/spraveenitpro/mcp-weather-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server