home / mcp / getweatherzip mcp server
MCP Server generated by mcp.ag2.ai
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.
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.
Prerequisites you need before installing and running the MCP server:
# 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]"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 stdioConfigure runtime behavior using environment variables. You can provide a JSON configuration string or a path to a configuration file, along with security parameters.
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.shKeep 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.
Launch the MCP server in a specified transport mode (stdio, sse, streamable-http) and keep it running to serve MCP clients.
Perform a weather lookup by ZIP code through the MCP interface and receive structured weather data in response.