mcp-server
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-server What time is it?"
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 Server
An extensible Model Context Protocol (MCP) server with weather and time tools. Built for learning — connect it to Claude Desktop and start chatting.
Getting Started
1. Clone & Install
git clone <repo-url> && cd mcp-server
python3 -m venv .venv
source .venv/bin/activate # macOS / Linux / WSL
pip install -e .Or with uv:
git clone <repo-url> && cd mcp-server
uv venv
source .venv/bin/activate
uv pip install -e .2. Connect to Claude Desktop
Run the setup script to automatically write the Claude Desktop config file:
macOS:
python setup_claude_agent.pyThis writes ~/Library/Application Support/Claude/claude_desktop_config.json pointing to your project's .venv/bin/python.
If your project is in a non-standard location, pass it explicitly:
python setup_claude_agent.py --project-path /path/to/mcp-serverWindows (via WSL):
python3 setup_claude_agent.py --windows --win-user <YourWindowsUser> --wsl-user <YourWSLUser>For example:
python3 setup_claude_agent.py --windows --win-user Cam --wsl-user camThis writes %APPDATA%\Claude\claude_desktop_config.json and configures Claude Desktop to launch the server through WSL.
3. Restart Claude Desktop
Close and reopen Claude Desktop. To verify the server is connected, go to Settings → Developer — you should see mcp-server with a green running badge.
4. Try It Out
Ask Claude any of the following:
"What time is it?" — uses the
get_current_timetool"Get weather alerts for California" — uses the
weather://alerts/CAresource"What's the forecast for latitude 40.7128, longitude -74.0060?" — uses the forecast resource
You don't need to start the server manually — Claude Desktop launches it automatically.
Related MCP server: MCP Server
Available Tools & Resources
Type | Name | What it does |
Tool |
| Returns current time with automatic timezone detection |
Resource |
| Weather alerts for a US state (e.g. |
Resource |
| 5-period forecast for coordinates |
Prompt |
| Guides Claude through a full weather analysis |
Prompt |
| Helps with timezone checks, conversions, comparisons |
Adding Your Own Tools
Open src/mcp_server/server.py and add a function with the @mcp.tool() decorator:
@mcp.tool()
async def my_tool(param: str) -> str:
"""Description of what this tool does."""
return f"Result for {param}"Restart Claude Desktop to pick up the change.
For resources and prompts, see CONTRIBUTING.md.
Running Tests
pip install -e ".[dev]" # or: uv pip install -e ".[dev]"
pytestProject Structure
src/mcp_server/
├── server.py # MCP server entry point — register tools here
└── tools/
├── weather/ # Weather alerts & forecasts (NWS API)
├── time/ # IP-based timezone & current time
└── conversation/ # Conversation toolsLicense
MIT
Resources
Available Tools
4 toolsclear_old_cacheA
Clear expired weather cache entries.
Args: max_age_minutes: Maximum age in minutes before considering expired
Returns: Status message with number of entries removed
Inputs: max_age_minutes. Returns: result
get_alertsA
Get active weather alerts for a US state.
Provides current weather alerts and warnings for the specified state. Checks cache first (30 min expiry), fetches fresh if needed.
Args: state: Two-letter US state code (e.g. CA, NY)
Inputs: state (required). Returns: result
get_current_timeA
Get the current time based on the user's IP address.
This tool determines the user's timezone from their IP address using geolocation and returns the current local time in that timezone.
Args: ip_address: Optional IP address to determine timezone. If not provided or empty string, attempts to detect automatically or defaults to UTC.
Returns: Formatted string with current time, timezone, day, and ISO timestamp
Inputs: ip_address. Returns: result
get_forecastA
Get weather forecast for geographic coordinates.
Provides a 5-day forecast for the specified location. Checks cache first (60 min expiry), fetches fresh if needed.
Args: latitude: Latitude of the location (-90 to 90) longitude: Longitude of the location (-180 to 180)
Inputs: latitude (required), longitude (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool serves a distinct purpose: clear_old_cache for cache maintenance, get_alerts for weather alerts, get_current_time for time retrieval, and get_forecast for weather forecast. No overlap in functionality.
All tool names follow a consistent verb_noun pattern using snake_case: clear_old_cache, get_alerts, get_current_time, get_forecast. The naming convention is uniform.
With 4 tools, the server is well-scoped. The number is appropriate for a focused set of utilities, not too few or too many.
The tool set lacks cohesion: it combines weather (alerts, forecast) with time and cache maintenance, but omits common weather operations like current conditions or location search. The cache clearing tool is specific to weather cache, yet the time tool is unrelated, leaving gaps in both potential domains.
Maintenance
Related MCP Connectors
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server built with the mcp-framework to provide weather-related tools and data to AI clients. It enables integration of weather capabilities and custom tools into the MCP ecosystem for use with platforms like Claude Desktop.-
- AlicenseAqualityDmaintenanceAn extensible MCP server with weather and time tools for Claude Desktop. It provides current time with automatic timezone detection, weather alerts for US states, and 5-period forecasts for coordinates.4MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing AI-powered weather tools via Google Generative AI, enabling real-time weather data retrieval through natural language queries.MIT
- FlicenseBqualityBmaintenanceA zero-config MCP server that provides real-time weather data and 5-day forecasts for any location without requiring API keys, enabling natural language weather queries through Claude.2-