home / mcp / weather city mcp server
MCP Server generated by mcp.ag2.ai
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.
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.
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]"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 stdioConfigure 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"
}Start the MCP server in stdio mode using the Python entry point. Command: python mcp_server/main.py stdio
Check code for linting issues and format using ruff. Run: ruff check and ruff format
Run static analysis tools (mypy, bandit, semgrep) via the provided script.
Execute tests with coverage and generate reports. Command: ./scripts/test.sh or similar if provided in the project.
Build and publish the MCP server package using Hatch tooling.