Uses .ENV for secure API key management, storing Alpha Vantage and News API credentials needed for the server's data retrieval functions.
Provides repository access for downloading the MCP server code, allowing users to clone the server implementation from GitHub.
Leverages Python as the implementation language for all server functionality, requiring Python 3.x for operation.
MCP Server - Weather and Stock Information Service
This MCP (Model Control Protocol) server provides real-time weather alerts, forecasts, stock market data, and news information through various API integrations.
Features
- Weather Alerts: Get active weather alerts for US states
- Weather Forecast: Get detailed weather forecasts for specific locations
- Stock Market Data: Access top gainers and losers in the US stock market
- Stock News and Sentiments: Get news and sentiment analysis for specific stocks
- General News: Search for news articles by keyword and date
Prerequisites
- Python 3.x
uv
package manager- API Keys for:
- Alpha Vantage (for stock data)
- News API (for news data)
Setup
- Clone the repository:
- Create a virtual environment and install dependencies:
- Create a
.env
file in the project root with your API keys:
Configuration
To use this MCP server with Claude, you need to add the following configuration to Claude's config file:
- Open Claude's settings
- Go to File > Settings > Developer > Edit Config
- Add the following configuration:
Note: Make sure to adjust the path (C:\\Users\\asus\\code\\mcpServer
) to match your actual project location.
Available Tools
Weather Tools
get_weather_alerts(state)
: Get active weather alerts for a US state- Example:
get_weather_alerts("CA")
- Example:
get_forecast(latitude, longitude)
: Get weather forecast for a location- Example:
get_forecast(37.7749, -122.4194)
- Example:
Stock Market Tools
get_top_gainers_losers()
: Get top gainers and losers in the US stock marketget_news_and_sentiments(ticker)
: Get news and sentiment analysis for a stock- Example:
get_news_and_sentiments("AAPL")
- Example:
News Tools
get_news_today(keyword, date)
: Get news articles for a keyword and date- Example:
get_news_today("technology", "2024-03-20")
- Example:
Error Handling
The server includes robust error handling for API requests and will return appropriate error messages if:
- API keys are missing
- API requests fail
- Invalid parameters are provided
- No data is found for the given criteria
Contributing
Feel free to submit issues and enhancement requests!
This server cannot be installed
An MCP server that provides real-time weather alerts, forecasts, stock market data, and news information through various API integrations.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.Last updated -1PythonMIT License
- -securityAlicense-qualityProvides real-time weather alerts, forecasts, stock prices, historical data, and stock-related news through an MCP interface.Last updated -75JavaScriptMIT License
- -securityFlicense-qualityAn MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.Last updated -Python
- -securityAlicense-qualityAn MCP server that connects to OpenWeatherMap's API to provide current weather data and multi-day forecasts for locations worldwide in different measurement units.Last updated -12TypeScriptMIT License