rudra-weather-mcp
by r-u-d-r-a-a
README.md
# š¤ļø Weather MCP Server
A simple **Model Context Protocol (MCP) server** that provides weather alerts to AI assistants such as **Claude Code**.
The server runs locally and communicates with the MCP client using **stdio (standard input/output)**. It fetches weather information from an external weather API and exposes it as an MCP tool.
## Architecture
```text
Claude Code
ā
stdio
ā
Weather MCP Server
ā
Weather API
```
The MCP server runs as a local Node.js process. It does **not** expose a web server or listen on a port such as `localhost:3000`.
## Features
* š”ļø Get current weather alerts
* š Query weather for a specified location
* š MCP-compatible tool interface
* š» Runs locally using stdio
* š¦ Installable through npm
* š¤ Designed for use with Claude Code
## Requirements
* Node.js
* npm
* Claude Code
* An API key for the weather service, if required by the implementation
## Installation
### Using npm
The package is available on npm as:
```bash
npx rudra-weather-mcp
```
No global installation is required.
### From source
Clone the repository:
```bash
git clone <YOUR_GITHUB_REPOSITORY_URL>
cd weather
```
Install dependencies:
```bash
npm install
```
Run the server:
```bash
npm start
```
## Using with Claude Code
Add the MCP server to Claude Code:
```bash
claude mcp add weather -- npx rudra-weather-mcp
```
Claude Code will automatically start the MCP server locally when it needs to communicate with it.
You can verify the MCP configuration with:
```bash
claude mcp list
```
## Example Prompt
After adding the MCP server, ask Claude Code:
```text
Use the weather MCP server to get the current weather alerts in Boston, Massachusetts.
Do not answer from your own knowledge. Use the MCP tool.
```
Claude Code should invoke the weather MCP tool and return the information provided by the server.
## How It Works
MCP defines how an AI application communicates with external tools.
In this project, **stdio is the transport mechanism** used to send MCP messages between Claude Code and the local MCP server.
```text
Claude Code
ā
ā MCP messages
ā
ā¼
stdio
ā
ā¼
Weather MCP Server
ā
ā HTTP request
ā¼
Weather API
ā
ā Weather data
ā¼
Weather MCP Server
ā
ā MCP response
ā¼
Claude Code
```
The MCP server itself is not an HTTP server. It runs as a local process and communicates through:
* `stdin` ā receives messages from Claude Code
* `stdout` ā sends responses to Claude Code
* `stderr` ā used for errors/logging
## Local vs Remote MCP
This project is designed as a **local MCP server**.
### Local
```text
Claude Code
ā
stdio
ā
MCP Server
```
Each user runs their own copy of the MCP server on their computer.
### Remote
A remote MCP server could instead communicate over HTTP:
```text
Claude Code
ā HTTP
Remote MCP Server
ā
Weather API
```
This project does not currently require a remote server.
## Development
Start the server directly with:
```bash
npm start
```
The project uses:
* **TypeScript** ā MCP server implementation
* **Node.js** ā runtime
* **tsx** ā TypeScript execution
* **Zod** ā schema validation
* **MCP SDK** ā MCP server implementation
## Project Structure
```text
weather/
āāā bin/
ā āāā weather-mcp.js
āāā src/
ā āāā index.ts
āāā package.json
āāā README.md
```
## npm Package
The published npm package is:
```text
rudra-weather-mcp
```
Run it with:
```bash
npx rudra-weather-mcp
```
## License
MIT
TDQS
A3.8/5.0
Scored across 1 tool
Disambiguation5/5
Only one tool exists, so there is no possibility of confusion between tools. The purpose is clearly defined as retrieving active weather alerts for a US state.
Naming Consistency5/5
The single tool name 'get-alerts' follows a clear verb-noun pattern. With only one tool, naming is trivially consistent.
Tool Count3/5
One tool is borderline; it feels thin for a server named 'weather-mcp', but it is appropriately focused for a single-purpose alerts service.
Completeness2/5
The server only provides alerts, leaving obvious gaps in weather data such as current conditions and forecasts. The surface is too limited for a weather-focused MCP.
Maintenance
ActivityMaintained
ResponsivenessNo issues