mcp-weather-server

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

  1. Clone the repository
  2. 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

  1. Run npm run build.
  2. Configure VSCode with MCP server settings.
  3. Query weather information for favorite cities.

API Endpoints

  • GET /weather?location={city}: Returns current weather data for the specified city.