quickstart_mcpserver_vibe_coding

quickstart_mcpserver_vibe_coding

0

The Quickstart MCP Server is designed to offer weather information through the National Weather Service API. It provides weather alerts for US states and forecasts for specific coordinates, making it a useful tool for weather monitoring in the United States.

Quickstart MCP Server

This is a quickstart implementation of a Model Context Protocol (MCP) server that provides weather information using the National Weather Service API.

Features

  • Get weather alerts for any US state
  • Get detailed weather forecasts for specific coordinates

Prerequisites

  • Python 3.10 or higher
  • MCP SDK 1.2.0 or higher

Installation

  1. Create a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -e .

Usage

To run the server:

python -m quickstart_mcpserver.weather

The server exposes two tools:

  1. get_alerts(state: str): Get weather alerts for a US state

    • Example: get_alerts("CA") for California alerts
  2. get_forecast(latitude: float, longitude: float): Get weather forecast for a location

    • Example: get_forecast(38.5816, -121.4944) for Sacramento, CA

Integration with Claude for Desktop

To use this server with Claude for Desktop:

  1. Make sure Claude for Desktop is installed and updated to the latest version
  2. Open the configuration file at:
    • Windows: %AppData%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  3. Add the following configuration:
{
  "mcpServers": {
    "weather": {
      "command": "python",
      "args": ["-m", "quickstart_mcpserver.weather"]
    }
  }
}
  1. Restart Claude for Desktop

Testing

You can test the server by asking Claude questions like:

  • "What's the weather in Sacramento?"
  • "What are the active weather alerts in Texas?"

Note: The server uses the National Weather Service API, so it only works for US locations.