MCP Server
An 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.
README
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.py
This 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-server
Windows (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 cam
This 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.
Available Tools & Resources
| Type | Name | What it does |
|---|---|---|
| Tool | get_current_time |
Returns current time with automatic timezone detection |
| Resource | weather://alerts/{state} |
Weather alerts for a US state (e.g. CA, NY) |
| Resource | weather://forecast/{lat}/{lon} |
5-period forecast for coordinates |
| Prompt | analyze_weather_prompt |
Guides Claude through a full weather analysis |
| Prompt | timezone_helper_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]"
pytest
Project 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 tools
License
MIT
Resources
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.