home / mcp / getweatherzip mcp server

Getweatherzip MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-interzoid-get-weather-by-zip-code-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "{\"name\":\"getweatherzip\"}",
        "SECURITY": "YOUR_SECURITY_VARS",
        "CONFIG_PATH": "mcp_server/mcp_config.json"
      }
    }
  }
}

You run an MCP (Model Context Protocol) Server that exposes the interzoid weather by ZIP code capability through a lightweight, transport-agn interface. You can start a local server instance and connect an MCP client to retrieve weather data by ZIP code in real time, perform testing, and integrate it into your workflow with consistent MCP semantics.

How to use

Start the MCP server in stdio mode and connect your MCP client over the standard inter-process communication channel. The server exposes a weather-by-zip endpoint you can query from your client to receive current weather data for a given ZIP code. Use the MCP client’s weather queries to obtain structured weather information, forecast notes, and related metadata, then handle the response in your application.

How to install

Prerequisites you need before installing and running the MCP server:

  • Python 3.9+
  • pip
  • uv

How to install

# Prerequisites (ensure Python 3.9+ and pip are installed)
# Install runtime dependencies in editable mode suitable for development
pip install -e ".[dev]"

# Alternatively, if you use uv as the launcher
uv pip install --editable ".[dev]"

Running the server

To start the MCP server in stdio mode, run the following command. It uses a standard Python invocation and the local script that launches the MCP server in stdio transport.

python mcp_server/main.py stdio

Configuration and environment

Configure runtime behavior using environment variables. You can provide a JSON configuration string or a path to a configuration file, along with security parameters.

  • CONFIG_PATH: Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)
  • CONFIG: A JSON string containing the configuration
  • SECURITY: Environment variables for security parameters (e.g., API keys)

Running tests and quality checks

If you contribute or want to verify quality, you can run linting, formatting, static analysis, and tests as part of your workflow.

ruff check
ruff format
./scripts/static-analysis.sh
./scripts/test.sh
./scripts/test-cov.sh

Notes on environment and security

Keep your security parameters protected. Do not commit API keys or secrets into your configuration. Use the SECURITY environment variable or a secure secret store in production.

Available tools

start_server

Launch the MCP server in a specified transport mode (stdio, sse, streamable-http) and keep it running to serve MCP clients.

query_weather_by_zip

Perform a weather lookup by ZIP code through the MCP interface and receive structured weather data in response.