- Home
- MCP servers
- Yahoo Finance
Yahoo Finance
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can access real-time stock quotes, historical prices, news, and stock comparisons through a dedicated MCP server that streams data over HTTP or runs locally for development. This server is designed for production readiness with a modular, type-safe implementation and built-in health checks, making it practical for integrations that need up-to-the-minute market data.
How to use
To work with this MCP server, connect an MCP client to the available endpoints and use the provided tools to fetch quotes, historical data, news, or comparisons. The HTTP transport is the primary production interface, while the STDIO transport offers a straightforward development workflow for local testing. You can perform real-time quotes, retrieve historical OHLCV data, pull latest headlines, and compare multiple tickers side by side. Always verify the server health before relying on data inside automated workflows.
How to install
Prerequisites: you need Node.js installed on your system. Ensure you have a compatible package manager such as npm.
Step 1: Install dependencies and build the project.
# Install dependencies
npm install
# Build the project
npm run build
Step 2: Run the HTTP server for production use. This starts the streamable HTTP transport and exposes health checks.
npm start
Step 3: Optional health check and local testing. After starting, verify the health endpoint is reachable and returns a healthy status.
curl http://localhost:8080/health
Additional configuration and transport options
You have two transport options for this MCP server: the streamable HTTP transport used in production and the STDIO transport intended for local development. The HTTP endpoint exposes the MCP interface at /mcp, with a backward-compatible /sse endpoint available for SSE clients.
Configuration snippet
{
"mcpServers": [
{
"type": "http",
"name": "yahoo_finance",
"url": "http://localhost:8080/mcp",
"args": []
},
{
"type": "stdio",
"name": "yahoo_finance_stdio",
"command": "npm",
"args": ["run", "start:stdio"]
}
]
}
Security and environment
Key environment settings to be aware of include PORT for the server port and NODE_ENV to indicate production mode. Set these when starting the server to ensure proper behavior and logging.
If you run the STDIO transport locally, keep sensitive keys out of the command line and consider using a .env file to manage environment variables in development.
Tools and data capabilities
The server provides a set of MCP tools to access Yahoo Finance data programmatically. Available tools include: get_quote for current price and market snapshot, get_historical_data for OHLCV data, get_news for latest headlines, and compare_stocks to compare multiple tickers side by side.
Notes on usage
When you deploy to production, prefer the HTTP transport to take advantage of streamable HTTP capabilities. Use the STDIO transport only during development for quick local testing and tool experimentation.
Available tools
get_quote
Fetches the current price and key market metrics for a single stock ticker.
get_historical_data
Retrieves OHLCV historical data for a specified ticker and time range.
get_news
Returns the latest news headlines for a given ticker.
compare_stocks
Compares multiple tickers side by side to analyze relative performance.