Weather

Provides GitHub-authenticated weather lookups and per-user location management via Open-Meteo
  • javascript

12

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "f-komunite-mcp-bootcamp-weather-mcp": {
      "command": "node",
      "args": [
        "server.js"
      ],
      "env": {
        "PORT": "3000",
        "GITHUB_CLIENT_ID": "YOUR_GITHUB_CLIENT_ID",
        "GITHUB_REDIRECT_URI": "http://localhost:3000/oauth/callback",
        "GITHUB_CLIENT_SECRET": "YOUR_GITHUB_CLIENT_SECRET"
      }
    }
  }
}

You run a Weather MCP Server that authenticates users with GitHub, lets each person save labeled locations, and fetches real-time weather from a free Open-Meteo API. This enables personalized weather queries for saved labels like home or office, while keeping data isolated per user in a lightweight SQLite database.

How to use

Authenticate with GitHub to create a user profile and obtain an access token. Use the token in your client’s Authorization header as Bearer <token> to access weather data and manage your saved locations.

Save locations with a friendly label for quick weather lookups. For example, add a label home that points to your actual address, then query weather by that label instead of typing the full location each time.

Query weather by direct name or by a saved label. The server resolves labels to addresses, requests current weather data from Open-Meteo, and returns temperature, conditions, humidity, wind speed, and other details tailored to your user.

Manage your locations anytime: list all saved locations, add new labels, or delete existing ones. All operations occur within your authenticated user context, ensuring per-user isolation.

How to install

Prerequisites: Node.js (v18 or higher is recommended), a GitHub account, a GitHub OAuth App for authentication, and a text editor.

  1. Install dependencies and set up the project.
npm install
  1. Create a GitHub OAuth App and obtain credentials. You will need the Client ID and Client Secret, and set the redirect URI to your server’s callback endpoint.

  2. Configure environment variables. Copy the template and populate with your GitHub OAuth credentials and server port.

cp .env.example .env
  1. Start the MCP server. The server will listen on http://127.0.0.1:3000 by default.
node server.js

Configuration and usage notes

OAuth flow uses GitHub for authentication. The server exchanges the authorization code for an access token, creates or updates the user profile from GitHub data, and then uses Bearer tokens for subsequent requests.

Saved locations are stored per user in an SQLite database, providing fast, persistent storage with isolation between users.

Weather data comes from the Open-Meteo API, which does not require an API key. Weather lookups resolve saved labels to addresses automatically.

Additional setup for client integration

If you are wiring this MCP server to a client like Claude Desktop, you can configure the MCP endpoint as follows.

{
  "mcpServers": {
    "weather_mcp_http": {
      "type": "http",
      "name": "weather_mcp_http",
      "url": "http://127.0.0.1:3000/mcp",
      "args": []
    }
  }
}

Troubleshooting and tips

If you need to revoke access or refresh tokens, you can perform token revocation as described in the client configuration flow. If authentication tokens expire, re-authenticate by visiting the OAuth login flow again to obtain a new token.

For health checks, verify that the server is reachable at its endpoint and that the OAuth flow completes successfully. If the token is rejected, ensure the token is current and used in the Authorization header as Bearer <token>.

Notes

This server is designed to support per-user data isolation, with a lightweight SQLite database handling users and their saved locations.

Available tools

get_current_weather

Fetches real-time weather for a direct location or a saved label, resolving labels to addresses and returning temperature, conditions, humidity, wind, and more.

add_location

Save a location with a custom label for quick access later.

list_locations

List all saved locations for the authenticated user.

delete_location

Delete a saved location by its label.

get_user_info

Retrieve information about the currently authenticated user, including GitHub username and avatar.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational