Skip to main content
Glama
MCP Weather Server

MCP Weather Server

by VISHAL-MK

MCP Weather Server

A simple MCP (Model Context Protocol) server built during an Agentic AI Internship. This server demonstrates how MCP can be used to provide tools, resources, and prompts to AI applications.

Features

MCP servers can provide the following functionalities:

Resources

File-like data that can be read by clients, such as API responses or file contents.

Tools

Functions that can be called by Large Language Models (LLMs) with user approval.

Prompts

Pre-written templates that help users accomplish specific tasks efficiently.

Related MCP server: Weather Service MCP

Requirements

  • Python 3.10 or higher

  • uv package manager

  • Python MCP SDK 1.2.0 or higher

  • httpx

Project Setup

1. Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh

2. Initialize the Project

uv init .

3. Install Dependencies

uv add "mcp[cli]" httpx

4. Create the Server File

Create a file named weather.py and add the MCP server implementation.

5. Run the Server

uv run weather.py

Project Structure

.
├── weather.py
├── pyproject.toml
├── uv.lock
├── README.md
└── .gitignore

Learning Outcomes

  • Understanding MCP architecture

  • Building custom MCP tools

  • Integrating APIs using Python

  • Running MCP servers with uv

  • Working with Agentic AI applications

Author

Vishal M K B.E. CSE (AI & ML)

Available Tools

1 tool
get_alertsA

Get weather alerts for a US state.

Args: state: Two-letter US state code (e.g. CA, NY)

Inputs: state (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no ambiguity. The tool name and description clearly convey its purpose.

    Naming Consistency5/5

    The single tool uses a clear verb_noun pattern (get_alerts), which is consistent and appropriate.

    Tool Count2/5

    One tool is significantly fewer than expected for a weather server, which typically includes forecasts, current conditions, and other weather data. The server seems under-scoped.

    Completeness2/5

    The server only provides alerts for US states, missing core weather functionalities like forecasts, current conditions, or radar. This is a severe gap for a weather server.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers