What It Does
#A comprehensive financial data extraction platform that combines FastAPI endpoints and Model Context Protocol (MCP) integration:
- Three endpoint types:
/docs- interactive API documentation/yfin/*- FastAPI endpoints for direct programmatic access/mcp- Model Context Protocol endpoint for AI/LLM integration
- Enhanced with MCP capabilities using the
fastapi-mcppackage - Detailed API documentation with Pydantic models
- Both financial statements and market data
- Excel-friendly data formats available
How to Use
#Endpoints
Base URL: https://yfin-h.tigzig.com/
MCP (Streamable HTTP, recommended): https://yfin-h.tigzig.com/v1/mcp/http
MCP (SSE): https://yfin-h.tigzig.com/v1/mcp/sse
MCP (legacy SSE, still works): https://yfin-h.tigzig.com/mcp
API Documentation: https://yfin-h.tigzig.com/docs
Streamable HTTP (2025-03-26) is the recommended transport for modern clients (Claude.ai, Cursor, n8n). The legacy /mcp SSE endpoint is kept for backward compatibility. If you deploy your own instance, the base URL will change according to your deployment configuration.
Access Methods
- API Documentation: visit
/docsfor interactive Swagger UI - Direct API: make HTTP requests to
/yfin/*endpoints - MCP/LLM: connect to
/mcpusing any MCP-compatible client
How It Works
#Financial Statements
- Balance Sheet, Income Statement, Cash Flow
- Annual and quarterly data available
- Excel-friendly formats supported
Market Data
- Historical price data with adjustments
- Market cap and share statistics
- Comprehensive OHLCV data
AI Integration
- Natural language query support via MCP
- Structured responses for AI consumption
- Automatic request/response validation
How to Replicate
#- Clone the repository:
git clone https://github.com/amararun/shared-yfin-coolify.git - Install dependencies:
pip install -r requirements.txt - Run the server:
uvicorn main:app --reload
Key Dependencies
- FastAPI & fastapi-mcp
- yfinance & pandas
- python-dotenv
- OpenAPI tools