A Model Context Protocol (MCP) server for fetching weather data using the Open-Meteo API. This server can be integrated with Cursor IDE to provide weather information through the MCP protocol.
npx @rehmatalisayany/weather-mcp-server
Add the following configuration to your cursor.json
:
{
"mcp": {
"servers": {
"weather": {
"command": "@rehmatalisayany/weather-mcp-server",
"transport": "stdio"
}
}
}
}
check get-weather.ts for source code, you can run this file to connect to MCP Server
git clone https://github.com/rehmat123/weather-mcp-server.git
go to directory and than
npm i
npm build
const transport = new StdioClientTransport({
command: 'node',
args: ['dist/index.js']
});
const transport = new StdioClientTransport({
command: 'npx',
args: ['@rehmatalisayany/weather-mcp-server']
});
The server provides the following tool:
-
getWeather
: Get current weather for a location- Arguments:
-
location
: String (city name or location)
-
- Returns:
-
temperature
: Current temperature in Celsius -
conditions
: Weather conditions description -
humidity
: Humidity percentage -
windSpeed
: Wind speed in m/s
-
- Arguments:
MIT