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 Endpoint: https://yfin-h.tigzig.com/mcp
API Documentation: https://yfin-h.tigzig.com/docs
Feel free to try out these endpoints, subject to rate limits and server load. 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