Skip to main content
Glama
Weather & HR Management MCP Server

Weather & HR Management MCP Server

by yashdhokane
README.md
# Custom MCP Servers: Live Weather and HR Recruitment Tools for AI Agents

A set of **Model Context Protocol (MCP)** servers, built in Node.js, that give AI assistants such as Claude Desktop real tools to call: live weather for any city, job-application search and interview-schedule lookup from an HR system. Each capability runs as its own small, independent MCP server, so services can be added or removed without touching the others.

![Node.js](https://img.shields.io/badge/Node.js-18%2B-339933?logo=node.js&logoColor=white)
![MCP](https://img.shields.io/badge/Model%20Context%20Protocol-SDK-6E56CF)
![Zod](https://img.shields.io/badge/Validation-Zod-3E67B1?logo=zod&logoColor=white)
![Open-Meteo](https://img.shields.io/badge/API-Open--Meteo-F29F05)

---

## Tools exposed

| Server | File | MCP tool | Input | What it answers |
|---|---|---|---|---|
| Live Weather | `index.js` | `askWeather` | `city`, `question` | Temperature, wind, rain and forecast for any city (geocoding → weather lookup) |
| Job Applications | `job_application_carrer_gaffis.js` | `askJobApplications` | `question` | Today's applications, search by name or role, counts, latest 5 |
| Interview Schedules | `schedule_interview_carrer_gaffis.js` | `askSchedules` | `question` | Today's interviews, online/offline, by candidate or role, counts |

All inputs are schema-validated with **Zod**, and every server talks to the client over the MCP **stdio** transport.

## Architecture

```mermaid
flowchart LR
    C[AI assistant<br/>e.g. Claude Desktop] <-- MCP over stdio --> W[Live Weather MCP]
    C <-- MCP over stdio --> J[Job Applications MCP]
    C <-- MCP over stdio --> S[Interview Schedule MCP]
    W --> G[Open-Meteo<br/>Geocoding API]
    W --> F[Open-Meteo<br/>Forecast API]
    J --> H[(HR system REST API)]
    S --> H
```

The weather server makes two calls: city name → latitude/longitude (geocoding), then coordinates → current conditions. It then turns the raw weather code into a readable forecast. The HR servers fetch live data from the HR system's REST API and answer natural-language questions with deterministic filters (date, name, role, interview type, counts), which keeps answers predictable.

## Getting started

```bash
git clone https://github.com/yashdhokane/Custom-MCP-Server-for-Weather-Data-HR-Modules.git
cd Custom-MCP-Server-for-Weather-Data-HR-Modules
npm install
```

The weather server needs no API key. The HR servers read their API location from the environment (see `.env.example`):

```bash
export HR_API_BASE_URL=https://hr.example.com/public/api
export HR_API_TOKEN=...        # optional, sent as a Bearer token
```

### Connect to Claude Desktop

Add the servers to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "live-weather": {
      "command": "node",
      "args": ["/absolute/path/to/index.js"]
    },
    "job-applications": {
      "command": "node",
      "args": ["/absolute/path/to/job_application_carrer_gaffis.js"],
      "env": { "HR_API_BASE_URL": "https://hr.example.com/public/api" }
    },
    "interview-schedules": {
      "command": "node",
      "args": ["/absolute/path/to/schedule_interview_carrer_gaffis.js"],
      "env": { "HR_API_BASE_URL": "https://hr.example.com/public/api" }
    }
  }
}
```

Restart Claude Desktop, then ask, for example:

- *"Is it going to rain in Edinburgh today?"*
- *"How many marketing applications came in today?"*
- *"Show me today's offline interviews."*

## Project structure

```
├── index.js                               # Live Weather MCP server
├── job_application_carrer_gaffis.js       # Job Applications MCP server
├── schedule_interview_carrer_gaffis.js    # Interview Schedule MCP server
├── package.json                           # npm scripts: start:weather, start:jobs, start:schedules
└── .env.example                           # HR API settings
```

## Data protection

The HR tools handle candidates' personal data, so the API location and token come only from environment variables, never from the code. No candidate data is stored in this repository.

## Roadmap

- Streamable HTTP / SSE transport alongside stdio, for remote deployment
- Return structured JSON content alongside text, so agents can chain tools
- Unit tests for the question filters, using recorded API fixtures
- Multi-day forecast tool

## Author

**Yash Dhokane**, AI Engineer · MSc Artificial Intelligence, Heriot-Watt University
[LinkedIn](https://www.linkedin.com/in/yash-dhokane-3a914821b) · [GitHub](https://github.com/yashdhokane)

TDQS

D1.7/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The agent cannot misselect among multiple options since only 'askWeather' exists.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns or conventions. The name 'askWeather' stands alone without any inconsistencies.

Tool Count2/5

The server name 'Weather & HR Management MCP Server' suggests a broad scope covering both weather and HR domains, but only one tool is provided. This is a significant mismatch, as a single tool cannot adequately cover such diverse functionalities, making it too few for the apparent scope.

Completeness1/5

The server implies coverage of weather and HR management, but only a weather-related tool is present, with no HR tools at all. This represents a severe gap, as the tool surface is incomplete for the stated purpose, likely causing agent failures in HR-related tasks.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues