MCP Weather Server — Demo
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 Server — Demowhat'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 — Demo
Demo project from the YouTube video: "What is MCP? Model Context Protocol Explained (2026)"
This is a minimal Model Context Protocol (MCP) server written in Python. It exposes two tools that an AI assistant can call:
Tool | Description |
| Returns weather data for a given city |
| Lists all cities with available data |
Prerequisites
Python 3.10 or higher
pip
Related MCP server: openweather-mcp
Setup & Run
# 1. Clone or download this folder
cd demo/
# 2. (Optional) Create a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS / Linux
.venv\Scripts\activate # Windows
# 3. Install the MCP SDK
pip install -r requirements.txt
# 4. Run the server
python weather_server.pyThe server starts and listens on stdio — it's ready for an MCP host (like Claude Desktop or a custom client) to connect.
Connect to Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["/full/path/to/demo/weather_server.py"]
}
}
}Restart Claude Desktop. Then ask it:
"What's the weather in Tokyo?"
Claude will automatically call the get_weather tool and return:
🌍 Weather in Tokyo:
🌡️ Temperature: 18°C
☁️ Condition: Clear
💧 Humidity: 55%
💨 Wind: 10 km/h NEExtend to a Real Weather API
Replace the WEATHER_DATA dict with a live API call:
import httpx
async def fetch_live_weather(city: str) -> dict:
url = f"https://api.openweathermap.org/data/2.5/weather"
params = {"q": city, "appid": "YOUR_API_KEY", "units": "metric"}
async with httpx.AsyncClient() as client:
resp = await client.get(url, params=params)
data = resp.json()
return {
"temp": data["main"]["temp"],
"condition": data["weather"][0]["description"].title(),
"humidity": data["main"]["humidity"],
"wind": f"{data['wind']['speed']} m/s"
}Project Structure
demo/
├── weather_server.py # MCP server — all logic here
├── requirements.txt # pip install mcp
└── README.md # This fileHow MCP Works (Quick Recap)
Claude Desktop (Host)
└── MCP Client (built into host)
└── MCP Protocol (JSON-RPC 2.0 over stdio)
└── weather_server.py (YOUR server)
└── Returns weather dataThe AI model never calls your server directly — the MCP client handles discovery, schema validation, and communication. You just implement the logic.
Next Steps
Add more tools:
get_forecast,get_air_qualitySwitch transport from
stdiotoHTTP + SSEfor a remote serverPublish your server to the MCP community registry
Official MCP Resources
📖 Documentation
Resource | Link |
Official Docs | |
Getting Started | |
All Examples | |
GitHub Organization | |
All Official Servers |
🔌 Official MCP Server Examples (from the video)
These are production-ready servers maintained by Anthropic — install and use them today:
Server | What it does | GitHub |
🐙 GitHub | Browse repos, read files, manage PRs and issues via AI | https://github.com/modelcontextprotocol/servers/tree/main/src/github |
🗄️ PostgreSQL | Query your database with natural language | https://github.com/modelcontextprotocol/servers/tree/main/src/postgres |
📁 Filesystem | Read and write local files directly from AI | https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem |
🔍 Brave Search | Real-time web search inside any AI chat | https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search |
💬 Slack | Read channels, summarize threads, post messages | https://github.com/modelcontextprotocol/servers/tree/main/src/slack |
🧠 Memory | Persistent AI memory via a knowledge graph | https://github.com/modelcontextprotocol/servers/tree/main/src/memory |
📦 SDKs
Language | Install | GitHub |
Python |
| |
TypeScript / Node.js |
|
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Related MCP Servers
- FlicenseBqualityDmaintenanceA demonstration server showcasing MCP capabilities with basic tools including addition calculations and weather API integration for fetching city weather data.2-
- FlicenseAqualityDmaintenanceMCP server that integrates OpenWeatherMap API to fetch current weather for a specified city.1-
- FlicenseNot gradedqualityDmaintenanceA proof-of-concept MCP server that provides weather information using the Open-Meteo API, with tools for greeting, getting weather by coordinates, and by location name.-
- FlicenseNot gradedqualityCmaintenanceA simple MCP server providing weather lookup and number addition tools.-