home / mcp / weather city mcp server

Weather City 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-city-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "{...} (JSON config)",
        "SECURITY": "YOUR_API_KEYS",
        "CONFIG_PATH": "path/to/mcp_config.json"
      }
    }
  }
}

You deploy an MCP server to provide a stable, programmable interface to the Interzoid Get Weather City API. This server exposes a consistent MCP surface you can query from any MCP client, enabling you to fetch weather city data through a defined transport, with configurable startup and security options.

How to use

Start the MCP server in stdio mode and connect your MCP client to it. Your client can request weather city information and receive responses through the MCP protocol. Use the server’s transport options to fit your deployment scenario, and adjust security parameters to protect access to the API.

How to install

Prerequisites: Python 3.9+ and a working Python toolchain (pip and uv). Ensure you have internet access to install dependencies.

# Step 1: Clone the project
git clone <repository-url>
cd mcp_server

# Step 2: Install dependencies (dev setup)
pip install -e ".[dev]"

# Alternative: use uv to run locally
uv pip install --editable ".[dev]"

Run the server

You run the MCP server in stdio mode with a single command. This starts the Python-based server listening for MCP clients.

python mcp_server/main.py stdio

Configuration and environment

Configure the server via environment variables to control its behavior and security.

{
  "CONFIG_PATH": "/path/to/mcp_server/mcp_config.json",
  "CONFIG": "{\"key\":\"value\"}",
  "SECURITY": "API_KEYS=your_api_key_here"
}

Available tools

start_server_stdio

Start the MCP server in stdio mode using the Python entry point. Command: python mcp_server/main.py stdio

lint

Check code for linting issues and format using ruff. Run: ruff check and ruff format

static_analysis

Run static analysis tools (mypy, bandit, semgrep) via the provided script.

run_tests

Execute tests with coverage and generate reports. Command: ./scripts/test.sh or similar if provided in the project.

build_and_publish

Build and publish the MCP server package using Hatch tooling.