Mcp Yfinance
A MCP stdio server shim around common yFinance calls.
Overview
Mcp Yfinance is a simple wrapper around the classic yFinance library that operates as an MCP tool, allowing users to easily access financial data through a command-line interface.
To use Mcp Yfinance, register it as an extension in your MCP host, configure it using the provided commands, and then invoke it to retrieve financial data such as stock history.
- Easy integration with MCP hosts - Command-line interface for accessing financial data - Ability to retrieve historical stock data and perform analysis
- Analyzing stock performance over specific time periods.
- Retrieving historical data for various stock symbols.
- Performing detailed financial analysis based on stock data.
Add to your AI client
Use these steps to connect Mcp Yfinance in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-yfinance-nicholasf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-yfinance-nicholasf"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-yfinance-nicholasf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-yfinance-nicholasf"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-yfinance-nicholasf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-yfinance-nicholasf"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-yfinance-nicholasf": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-yfinance-nicholasf"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-yfinance-nicholasf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-yfinance-nicholasf"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-yfinance-nicholasf": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-yfinance-nicholasf"
]
}
}
}FAQ
What data can I retrieve using Mcp Yfinance?
You can retrieve historical stock prices, including Open, High, Low, Close prices, Volume, Dividends, and Stock Splits.
Is Mcp Yfinance easy to set up?
Yes! It can be easily registered as an extension in your MCP host with simple configuration commands.
Can I analyze multiple stocks at once?
Yes! You can invoke commands for different stock symbols to analyze their performance.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3374,"uuid":"fde6775a-b903-4ff1-89b1-ff1bb07f05f8","name":"mcp-yfinance","title":"Mcp Yfinance","description":"A MCP stdio server shim around common yFinance calls.","avatar_url":"https://avatars.githubusercontent.com/u/19967?v=4","created_at":"2025-03-19T06:36:26.453Z","updated_at":"2025-03-19T06:52:16.391Z","status":"created","author_name":"nicholasf","author_avatar_url":"https://avatars.githubusercontent.com/u/19967?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/nicholasf/mcp-yfinance","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-27 11:36:15\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]