Weather & Stock
STREAMABLE HTTPMCP server providing weather alerts, forecasts, stock prices, historical data, and news
MCP server providing weather alerts, forecasts, stock prices, historical data, and news
This project is an MCP (Model Context Protocol) server that provides weather alerts, forecasts, stock prices, historical data, and news using various APIs.
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 claude
git clone https://github.com/<your-username>/<repo-name>.git cd <repo-name>
npm install
.env file and add:
NEWS_API_KEY=your_newsapi_key
npm start
npx @modelcontextprotocol/inspector
The MCP server provides the following tools:
{ "tool": "get-stock-price", "params": { "symbol": "AAPL" } }
{ "tool": "get-historical-data", "params": { "symbol": "AAPL", "startDate": "2024-01-01", "endDate": "2024-03-01", "interval": "1d" } }
{ "tool": "get-news", "params": { "stockName": "Tesla", "startDate": "2024-03-01", "endDate": "2024-03-10" } }
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
Feel free to fork this repo, make changes, and submit a pull request! 🚀
This project is licensed under the MIT License.