yahoo-finance
A Model Context Protocol (MCP) server that lets your AI interact with Yahoo Finance to get comprehensive stock market data, news, financials, and more
claude mcp add --transport stdio agentx-ai-yahoo-finance-server python -m yahoo_finance_server \ --env PROXY_URL="Proxy URL to route requests (optional). Example: http://proxy.example.com:8080 or socks5://user:pass@127.0.0.1:1080/"
How to use
This MCP server exposes Yahoo Finance data to your AI agents through a set of ready-made tools. You can fetch detailed ticker information, recent news, and price history; search for equities, ETFs, and funds; retrieve top entities by sector; and access option chains and earnings data. The server runs asynchronously to keep AI responses fast, and it supports proxies if you need to route traffic through a proxy network. Typical usage involves sending structured tool calls like { name: "get-ticker-info", arguments: { symbol: "AAPL" } } or { name: "search", arguments: { query: "Tesla", count: 10 } } and receiving JSON responses with the requested data. Tools include: get-ticker-info for company details and metrics; get-ticker-news for related articles; search for instruments with related news; get-top-entities by sector; get-price-history for historical data with selectable periods and intervals; ticker-option-chain for options data; and ticker-earning for earnings information. You can also configure a PROXY_URL to improve reliability or bypass rate limits. Use the MCP inspector to test interactively or invoke tools directly from your AI agent as part of your decision loop.
How to install
Prerequisites:
- Python 3.11 or higher -pip (or uvx) for package management
- (Optional) Proxy server for reliability
Installation steps:
-
Install the package from PyPI:
pip install yahoo-finance-server -
Run the server locally (uses the module installed by the package):
yahoo-finance-server -
(Optional) If you prefer to run via uvx, you can install the package using uvx and run a similar command depending on the entry point provided by the package:
uvx yahoo-finance-server -
If you want to run from source (development)
git clone https://github.com/AgentX-ai/AgentX-mcp-servers.git cd AgentX-mcp-servers/yahoo_finance_server pip install -e . -
Optional: configure a proxy to improve reliability
export PROXY_URL="http://proxy.example.com:8080" yahoo-finance-server
Additional notes
Tips and common considerations:
- Proxy support: Set PROXY_URL to route requests through HTTP/HTTPS or SOCKS proxies for reliability and rate-limit avoidance.
- Environment variables: The server reads PROXY_URL if you need proxying; other variables may be introduced by future updates—check the docs if behavior changes.
- Data freshness: Yahoo Finance data is updated with market hours; plan caching strategies if your AI requires very fresh quotes.
- API surface: The provided tools map to common finance data needs; if you need additional endpoints (e.g., more granular historical intervals), consider extending the MCP server or contributing a feature.
- Debugging: Use the MCP Inspector with npx @modelcontextprotocol/inspector yahoo-finance-server to validate tool calls and responses during development.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP