mcp-weather-server
0
The MCP Weather Server is a simple server using the Model Context Protocol to provide weather data through an Express API. It's designed for integration with VS Code and provides current weather information for specified cities.
MCP Weather Server
A simple Model Context Protocol (MCP) server providing weather data via an Express API.
Prerequisites
- Node.js (>= 18.x)
- npm (>= 9.x)
Installation
- Clone the repository
- Install dependencies
Configuration
Add an API key in index.ts
. Get your API key from OpenWeatherMap.
Build
Compile the TypeScript sources using npm run build
to produce a dist/
folder with compiled JavaScript.
Integrating with VS Code
- Run
npm run build
. - Configure VSCode with MCP server settings.
- Query weather information for favorite cities.
API Endpoints
GET /weather?location={city}
: Returns current weather data for the specified city.