A-Simple-MCP-Server
If you are the rightful owner of A-Simple-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A simple Model Context Protocol (MCP) server that provides stock price information using the yfinance library.
The Stock Price MCP Server is designed to provide users with the ability to retrieve and compare stock prices using the yfinance library. It is a functional MCP server that offers multiple capabilities, including fetching current stock prices, accessing historical stock data, comparing prices between different stocks, and exposing stock data as resources. The server is built to handle market closures and invalid symbols gracefully, ensuring robust error handling and meaningful error messages. It is implemented using Python and requires dependencies such as mcp-server, yfinance, FastAPI, and Uvicorn.
Features
- Stock Price Retrieval: Retrieve the latest stock price for any valid ticker symbol with graceful handling of market closures and invalid symbols.
- Historical Data Access: Get historical stock data in CSV format for different time periods, customizable beyond the default 1 month.
- Stock Comparison: Compare prices between two different stocks with a human-readable output.
- Resource Exposure: Access stock information through a resource-based interface using the pattern `stock://{symbol}`.
Tools
get_stock_price
Returns the current price of a stock as a float.
get_stock_history
Returns historical stock data in CSV format.
compare_stocks
Compares prices between two stocks.