Weather & Stock MCP Server
Utilized for version control and code management of the MCP server.
Serves as the runtime environment for the MCP server, allowing it to handle financial and weather data requests.
Used for managing the server's dependencies and running the application.
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., "@Weather & Stock MCP Serverwhat's the stock price for Tesla and weather in New York?"
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.
Weather & Stock MCP Server 🌦️📉
This project is an MCP (Model Context Protocol) server that provides weather alerts, forecasts, stock prices, historical data, and news using various APIs.
Features 🚀
🐼 Fetch real-time stock prices using Yahoo Finance
📊 Retrieve historical stock data (daily, weekly, monthly)
📰 Get stock-related news from NewsAPI
🌦️ Fetch weather alerts and forecasts using the National Weather Service API
Related MCP server: Weather MCP Server
Installation & Setup ⚙️
Installing via Smithery
This MCP Server uses latest StreamableHTTP to server MCP client request. To install Weather & Stock Data Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Jeetinida/stocknews-mcp --client claudePrerequisites
Node.js (v18 or higher)
Git
An API key for NewsAPI
Steps
Clone the repository:
git clone https://github.com/<your-username>/<repo-name>.git cd <repo-name>Install dependencies:
npm installSet up environment variables:
Create a.envfile and add:NEWS_API_KEY=your_newsapi_keyStart the server:
npm start
Debug
Inspector You can inspect your MCP server using:
npx @modelcontextprotocol/inspector
Usage 🛠️
The MCP server provides the following tools:
Get Stock Price
{
"tool": "get-stock-price",
"params": {
"symbol": "AAPL"
}
}Get Historical Stock Data
{
"tool": "get-historical-data",
"params": {
"symbol": "AAPL",
"startDate": "2024-01-01",
"endDate": "2024-03-01",
"interval": "1d"
}
}Get News
{
"tool": "get-news",
"params": {
"stockName": "Tesla",
"startDate": "2024-03-01",
"endDate": "2024-03-10"
}
}Docker
Dockerfile is attached with the project, you will have to set your NEWS_API_KEY and run the following docker command: Docker build:
docker build -t weather-mcp .Docker run:
docker run -d --name {CONTAINER_NAME} --env NEWS_API_KEY={news_api_key} -p 3333:3333 weather-mcp Contributing 🤝
Feel free to fork this repo, make changes, and submit a pull request! 🚀
License 🐟
This project is licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Unlock the power of real-time financial data with our Finance MCP. Easily retrieve the latest
Financial data MCP for market, company, news, macro, and US Congress research.
MCP server giving AI agents one-connection access to China A-share market intelligence: financials,
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that provides real-time weather alerts, forecasts, stock market data, and news information through various API integrations.5-
- FlicenseBqualityDmaintenanceEnables users to get weather alerts and forecasts through natural language interactions. Provides real-time weather information and alert notifications via MCP tools.2-
- FlicenseNot gradedqualityDmaintenanceProvides real-time stock analysis tools including price lookup, comprehensive investment scoring, and company-to-ticker conversion through a MCP interface.1-
- FlicenseNot gradedqualityDmaintenanceProvides real-time financial data including stock quotes, news, and market movers through a secure FastMCP gateway, enabling conversational finance queries.17-