MCP Weather & News Assistant
Click on "Install 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 & News AssistantWeather in Tokyo and latest tech news."
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 & News Assistant
An AI assistant project built with the Model Context Protocol (MCP) that connects an LLM to real-world data sources via custom MCP tools.
It provides real-time weather information and latest news headlines by allowing the model to call external APIs through an MCP server.
Features
Real-time Weather Data: Get current weather conditions (temperature, humidity, wind speed, description) for any city
Latest News Articles: Fetch top 5 news articles by topic using NewsAPI
MCP Protocol: Standards-based integration with any MCP-compatible client using FastMCP
Two Tools:
weather(city)andnews(topic)tools exposed via MCPSecure: API keys stored in environment variables using python-dotenv
Related MCP server: Weather and Stock Information MCP Server
Prerequisites
Before deploying this MCP server, ensure you have:
Python 3.8+ installed
API Keys (free):
An MCP-compatible client such as:
Claude Desktop
Continue (VS Code extension)
Cline
Installation
1. Clone the Repository
git clone https://github.com/ZiliOussema/mcp_weather_and_news_assistant.git
cd mcp_weather_and_news_assistant2. Create Virtual Environment
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate3. Install Dependencies
pip install -r requirements.txt4. Set Up Environment Variables
Create a .env file in the project root (you can copy from .env.sample):
# Copy the sample file
cp .env.sample .env
# Then edit .env and add your API keysYour .env file should contain:
OPENWEATHER_API_KEY=your_openweather_api_key_here
NEWS_API_KEY=your_newsapi_key_hereIMPORTANT: Never commit your .env file to version control!
Finding Your Project Path
Before configuring any MCP client, you need to know your project's full path.
Windows
Open Command Prompt in your project folder and run:
cdOr use PowerShell:
pwdmacOS/Linux
Open Terminal in your project folder and run:
pwdDeployment
1. Claude Desktop
Windows
Step 1: Locate the Claude Desktop configuration file
Path: %APPDATA%\Claude\claude_desktop_config.json
Step 2: Open claude_desktop_config.json and add your MCP server:
{
"mcpServers": {
"weather-news": {
"command": "C:\\path\\to\\your\\project\\venv\\Scripts\\python.exe",
"args": [
"src/server.py"
],
"cwd": "C:\\path\\to\\your\\project"
}
}
}Important Notes:
Replace
C:\\path\\to\\your\\project\\with your actual project pathUse double backslashes (
\\) in Windows pathsPaths must be absolute (full path from C:)
Step 3: Verify the paths exist
"C:\path\to\your\project\mcp_weather_and_news_assistant\venv\Scripts\python.exe" --versionStep 4: Restart Claude Desktop
Completely close Claude Desktop
Check Task Manager to ensure no Claude processes are running
Reopen Claude Desktop
Step 5: Verify the server is loaded
Look for a plug icon or "MCP" section in Claude Desktop
You should see
weatherandnewstools availableTry asking: "What's the weather in Paris?"
macOS
Step 1: Locate the configuration file
~/Library/Application Support/Claude/claude_desktop_config.jsonStep 2: Edit the configuration:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.jsonAdd:
{
"mcpServers": {
"weather-news": {
"command": "/Users/YOUR_USERNAME/mcp_weather_and_news_assistant/venv/bin/python",
"args": [
"src/server.py"
],
"cwd": "/Users/YOUR_USERNAME/mcp_weather_and_news_assistant"
}
}
}Step 3: Restart Claude Desktop
killall ClaudeThen reopen Claude Desktop from Applications.
Linux
Step 1: Configuration location
~/.config/Claude/claude_desktop_config.jsonStep 2: Edit configuration:
nano ~/.config/Claude/claude_desktop_config.jsonAdd:
{
"mcpServers": {
"weather-news": {
"command": "/home/YOUR_USERNAME/mcp_weather_and_news_assistant/venv/bin/python",
"args": [
"src/server.py"
],
"cwd": "/home/YOUR_USERNAME/mcp_weather_and_news_assistant"
}
}
}Step 3: Restart Claude Desktop
pkill claude2. Continue (VS Code)
Step 1: Install Continue extension
Open VS Code
Go to Extensions (
Ctrl+Shift+X)Search for "Continue"
Click Install
Step 2: Open Continue configuration
Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS)Type:
Continue: Open config.jsonPress Enter
Step 3: Add MCP server to Continue config
For Windows:
mcpServers:
weather-news:
command: C:\path\to\your\project\venv\Scripts\python.exe
args:
- src/server.py
cwd: C:\path\to\your\projectFor macOS/Linux:
mcpServers:
weather-news:
command: /Users/YOUR_USERNAME/mcp_weather_and_news_assistant/venv/bin/python
args:
- src/server.py
cwd: /Users/YOUR_USERNAME/mcp_weather_and_news_assistantStep 4: Reload VS Code
Press
Ctrl+Shift+P/Cmd+Shift+PType:
Developer: Reload WindowPress Enter
Step 5: Test in Continue
Open Continue sidebar and ask:
What's the weather in New York?3. Cline
Step 1: Install Cline
Open VS Code
Go to Extensions (
Ctrl+Shift+X)Search for "Cline"
Click Install
Step 2: Configure Cline MCP settings
Click the Cline icon in VS Code sidebar
Go to Cline Settings (gear icon)
Find "MCP Servers" section
Step 3: Add configuration
Click "Add MCP Server" and fill in:
Name:
weather-newsCommand: Path to your Python executable
Args: Path to your server.py
Or edit settings.json:
{
"cline.mcpServers": [
{
"name": "weather-news",
"command": "C:\\path\\to\\your\\project\\venv\\Scripts\\python.exe",
"args": [
"src/server.py"
],
"cwd": "C:\\path\\to\\your\\project"
}
]
}Step 4: Restart Cline or reload VS Code
Usage Examples
Weather Queries
User: What's the weather like in Tokyo?Response:
The current weather in Tokyo is 18°C with clear skies.
Humidity is at 65% with a light breeze of 5 m/s.News Queries
User: Show me the latest technology newsResponse:
Here are the top 5 tech headlines:
1. New AI breakthrough announced by researchers
Source: TechCrunch | Published: 2026-02-03
2. Tech company releases innovative product
Source: The Verge | Published: 2026-02-03
...Combined Queries
User: What's the weather in London and any technology news?Troubleshooting
Server Not Loading in Claude Desktop
Check configuration file location
# Windows echo %APPDATA%\Claude\claude_desktop_config.json # macOS echo ~/Library/Application\ Support/Claude/claude_desktop_config.json # Linux echo ~/.config/Claude/claude_desktop_config.jsonVerify JSON syntax at jsonlint.com
Check Python path
# Windows "C:\path\to\your\project\venv\Scripts\python.exe" --version # macOS/Linux /path/to/your/project/venv/bin/python --versionView Claude logs
Windows:
%APPDATA%\Claude\logs\macOS:
~/Library/Logs/Claude/Linux:
~/.local/state/Claude/logs/
"Module not found" Error
Activate virtual environment and reinstall
# Windows venv\Scripts\activate pip install -r requirements.txt # macOS/Linux source venv/bin/activate pip install -r requirements.txtVerify packages are installed
pip list
API Errors (401, 403, 404)
Verify API keys in
.envfilecat .envTest API keys manually
# Test OpenWeatherMap curl "https://api.openweathermap.org/data/2.5/weather?q=Paris&appid=YOUR_KEY&units=metric" # Test NewsAPI curl "https://newsapi.org/v2/everything?q=technology&apiKey=YOUR_KEY&pageSize=5"Check API key limits
OpenWeatherMap: 60 calls/minute
NewsAPI: 100 requests/day (free tier)
Tools Not Appearing in Continue/Cline
Reload VS Code:
Ctrl+Shift+P→ "Developer: Reload Window"Check logs in VS Code Output panel
Test server manually
python src/server.py
"Permission Denied" on macOS/Linux
chmod +x server.pyProject Structure
mcp_weather_and_news_assistant/
├── src/
│ ├── __pycache__/
│ ├── tools/
│ │ ├── __pycache__/
│ │ ├── __init__.py
│ │ ├── news.py # News tool implementation
│ │ └── weather.py # Weather tool implementation
│ └── server.py # Main MCP server entry point
├── test/
│ ├── interactive_test.py # Interactive testing script
│ └── test_tools.py # Unit tests for tools
├── venv/ # Virtual environment
├── .env # Environment variables
├── .env.sample # Sample environment file
├── .gitignore
├── requirements.txt # Python dependencies
└── README.md # DocumentationTesting the Server
Manual Testing
# Activate environment
source venv/bin/activate # or venv\Scripts\activate on Windows
# Run server
python src/server.pyInteractive Testing
The project includes an interactive test script to verify your API keys and tools:
# Activate environment
source venv/bin/activate # or venv\Scripts\activate on Windows
# Run interactive test
python test/interactive_test.pyThis will test both the weather and news tools with sample queries.
Unit Tests
Run the unit tests to verify tool functionality:
# Run all tests
python -m pytest test/
# Run specific test file
python test/test_tools.pySecurity Best Practices
Never commit API keys - Always use
.envfileAdd
.envto.gitignoreRotate keys regularly
Use read-only keys when possible
MCP Weather & News Assistant - A portfolio project demonstrating Model Context Protocol integration
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.15MIT
- FlicenseBqualityDmaintenanceAn MCP server that provides real-time weather alerts, forecasts, stock market data, and news information through various API integrations.5
- Flicense-qualityDmaintenanceA weather service MCP server that provides current weather data, resource endpoints, and report prompts for any location.1
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
This MCP server provides seamless access to Malaysia's government open data, including datasets, w…
An MCP server giving access to Grafana dashboards, data and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZiliOussema/mcp_weather_and_news_assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server