MCP Weather Server
Provides hourly weather forecasts using the AccuWeather API, including current conditions and 12-hour forecast with temperature, precipitation, and weather description.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Weather Serverwhat's the weather in Tokyo?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Weather Server
A simple MCP server that provides hourly weather forecasts using the AccuWeather API.
Setup
Install dependencies using
uv:
uv venv
uv syncCreate a
.envfile with your AccuWeather API key:
ACCUWEATHER_API_KEY=your_api_key_hereYou can get an API key by registering at AccuWeather API.
Related MCP server: Weather MCP Server
Running the Server
STDIO Mode (Default)
For local MCP client connections via stdio:
{
"mcpServers": {
"weather": {
"command": "uvx",
"args": ["--from", "git+https://github.com/adhikasp/mcp-weather.git", "mcp-weather"],
"env": {
"ACCUWEATHER_API_KEY": "your_api_key_here"
}
}
}
}HTTP Streaming Mode
To run the server as a streamable HTTP server:
Option 1: Using the command line
python -m mcp_weather.weather --httpOption 2: Using the entry point
mcp-weather-httpOption 3: Using environment variables
export MCP_HOST=0.0.0.0
export MCP_PORT=8000
python -m mcp_weather.weather --httpThe server will start on http://0.0.0.0:8000 (or your specified host/port) and expose the MCP endpoint at /mcp. The streamable-http transport supports:
JSON responses for standard requests
Server-Sent Events (SSE) for streaming long-running operations
Remote access via HTTP endpoints
Horizontal scaling with load balancing
Connecting to HTTP Server:
For MCP clients that support HTTP transport, configure the connection URL:
http://localhost:8000/mcpAgent UI Configuration:
When configuring your MCP server in the Agent UI (e.g., Cursor, Claude Desktop, etc.):
URL: Provide the full endpoint URL (e.g.,
http://localhost:8000/mcporhttps://your-ngrok-url.ngrok.io/mcp)Authentication: Not required by default - No API keys, tokens, or scopes need to be configured in the Agent UI
Headers: No custom headers needed for basic operation
The MCP protocol handles communication automatically. Your AccuWeather API key is stored server-side and never needs to be shared with the client.
Note: If you implement custom authentication (API keys, tokens) at the HTTP layer for production use, you would configure those in your server code, not in the Agent UI. The Agent UI would then need to include those credentials in HTTP requests, but this is not needed for basic operation.
Production Deployment:
For production, you can use environment variables or configure a reverse proxy:
# Set custom host and port
export MCP_HOST=0.0.0.0
export MCP_PORT=8080
mcp-weather-httpExposing via Public URL (Tunneling)
To make your local server accessible via a public URL, use a tunneling service:
Option 1: ngrok (Recommended)
Install ngrok on Windows:
Option A: Using winget (Windows 10/11 - Recommended)
winget install ngrok.ngrokOption B: Using Chocolatey (if you have Chocolatey installed)
choco install ngrokOption C: Manual Download
Go to ngrok.com/download
Download the Windows ZIP file
Extract
ngrok.exeto a folder (e.g.,C:\ngrok)Add that folder to your PATH, or run ngrok from that folder
Or simply run:
.\ngrok.exe http 8000from the extracted folder
Option D: Using Scoop (if you have Scoop installed)
scoop install ngrokAfter installation, verify it works:
ngrok versionStart your MCP server:
python -m mcp_weather.weather --httpCreate a tunnel (in a separate terminal):
ngrok http 8000Use the public URL: ngrok will provide a public URL like
https://abc123.ngrok-free.dev.Important: The MCP endpoint is at
/mcp, not the root URL. Use:https://abc123.ngrok-free.dev/mcpNote about ngrok warning page: Free ngrok accounts show a warning page when visiting the root URL. This is normal and expected. The
/mcpendpoint will work correctly for MCP clients. To remove the warning page, you can:Upgrade to a paid ngrok account
Set the
ngrok-skip-browser-warningheader in your MCP client (if supported)Use a custom domain with a paid account
For a custom domain (requires paid ngrok account):
ngrok http 8000 --domain=your-custom-domain.ngrok.io
Option 2: Cloudflare Tunnel (cloudflared)
Install cloudflared: Download from developers.cloudflare.com
Start your MCP server:
python -m mcp_weather.weather --httpCreate a tunnel (in a separate terminal):
cloudflared tunnel --url http://localhost:8000Use the public URL: Cloudflare will provide a public URL like
https://random-subdomain.trycloudflare.com. Your MCP endpoint will be:https://random-subdomain.trycloudflare.com/mcp
Option 3: localtunnel
Install localtunnel:
npm install -g localtunnelStart your MCP server:
python -m mcp_weather.weather --httpCreate a tunnel (in a separate terminal):
lt --port 8000Use the public URL: localtunnel will provide a public URL like
https://random-name.loca.lt. Your MCP endpoint will be:https://random-name.loca.lt/mcp
Security Note: When exposing your server publicly, consider:
Adding authentication/API keys if your MCP server handles sensitive data
Using HTTPS (all tunneling services above provide HTTPS)
Limiting access to specific IPs if possible
Monitoring usage and rate limiting
API Usage
Get Hourly Weather Forecast
Response:
{
"location": "Jakarta",
"location_key": "208971",
"country": "Indonesia",
"current_conditions": {
"temperature": {
"value": 32.2,
"unit": "C"
},
"weather_text": "Partly sunny",
"relative_humidity": 75,
"precipitation": false,
"observation_time": "2024-01-01T12:00:00+07:00"
},
"hourly_forecast": [
{
"relative_time": "+1 hour",
"temperature": {
"value": 32.2,
"unit": "C"
},
"weather_text": "Partly sunny",
"precipitation_probability": 40,
"precipitation_type": "Rain",
"precipitation_intensity": "Light"
}
]
}The API provides:
Current weather conditions including temperature, weather description, humidity, and precipitation status
12-hour forecast with hourly data including:
Relative time from current time
Temperature in Celsius
Weather description
Precipitation probability, type, and intensity
Available Tools
1 toolget_hourly_weatherA
Get hourly weather forecast for a location.
Args: location: The city or location name (e.g., "Chicago", "New York") unit: Temperature unit - "C" for Celsius (default) or "F" for Fahrenheit
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | C | |
| location | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden for behavioral disclosure. It only states 'Get hourly weather forecast' but does not describe the response format, potential limitations (e.g., number of hours returned, timezone handling), or any side effects. The description is essentially a restatement of the tool's name with no added behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a one-sentence purpose followed by clearly labeled arguments. Every sentence is essential, and the Args section is formatted for easy parsing. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, so the description should explain what the tool returns to be fully complete. It only states 'hourly weather forecast' without detailing the response fields (e.g., temperature, precipitation, wind). For an AI agent, this lack of return-value information leaves a significant gap in understanding the tool's full output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides only parameter names and types, with no descriptions (0% coverage). The description compensates by explaining 'location' as a city or location name with examples, and 'unit' with its default and allowed values ('C' for Celsius, 'F' for Fahrenheit). This adds meaningful semantics beyond the schema, though it could be more comprehensive (e.g., supporting zip codes or other formats).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Get hourly weather forecast for a location.' This is a specific verb (get) and resource (hourly weather forecast), and it is distinct from any potential siblings. No ambiguity in purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives, but with no sibling tools listed, the context is clear. It provides the required input (location) and optional unit, implying the tool is for any location's hourly forecast. It lacks explicit exclusions or alternative recommendations, but this is acceptable given no alternatives exist.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
get_hourly_weather
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of confusion or overlap. The tool's purpose is clear and distinct.
The tool name 'get_hourly_weather' follows a clear verb_noun pattern, which is consistent even though it is the only tool. Naming conventions are not violated.
A single tool is too few for a server that claims to be a weather server. The apparent scope is broader than just hourly forecasts, so the tool count feels inadequate.
The tool surface only covers hourly forecasts, missing standard weather operations like current conditions, daily forecasts, or alerts. This leaves significant gaps for agents expecting comprehensive weather data.
Maintenance
Related MCP Connectors
Provide real-time and forecast weather information for locations in the United States using natura…
Current weather and forecasts for any coordinates, backed b… — paid per call (x402/credits), 1 tools
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
Pirate Weather forecast API (Dark Sky-compatible). Free key required.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides hourly weather forecasts using the AccuWeather API, enabling users to access current weather conditions and detailed 12-hour forecasts tailored to specific locations.136-
- FlicenseNot gradedqualityDmaintenanceEnables users to get current weather information for any city using the Open-Meteo API. Provides detailed meteorological data including temperature, precipitation, day/night status, and hourly forecasts through natural language queries.-
- AlicenseAqualityDmaintenanceProvides hourly and daily weather forecasts using the free Open-Meteo API without requiring an API key.213 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather forecasts for any global location using the UK Met Office DataHub API, with hourly, 3-hourly, and daily forecasts in Markdown or JSON.-