{"id":26570882,"url":"https://github.com/ferdousbhai/investor-agent","last_synced_at":"2026-01-27T13:36:41.996Z","repository":{"id":278697113,"uuid":"936468631","full_name":"ferdousbhai/investor-agent","owner":"ferdousbhai","description":"A Model Context Protocol server for building an investor agent","archived":false,"fork":false,"pushed_at":"2025-02-21T06:54:15.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T07:32:25.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferdousbhai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-21T06:20:12.000Z","updated_at":"2025-02-21T06:54:19.000Z","dependencies_parsed_at":"2025-02-21T07:42:33.637Z","dependency_job_id":null,"html_url":"https://github.com/ferdousbhai/investor-agent","commit_stats":null,"previous_names":["ferdousbhai/investor-agent"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdousbhai%2Finvestor-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdousbhai%2Finvestor-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdousbhai%2Finvestor-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdousbhai%2Finvestor-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferdousbhai","download_url":"https://codeload.github.com/ferdousbhai/investor-agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245026632,"owners_count":20549177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-22T22:19:20.719Z","updated_at":"2026-01-27T13:36:41.990Z","avatar_url":"https://github.com/ferdousbhai.png","language":"Python","funding_links":[],"categories":["Community Contributions","Finance","Finance \u0026 Market Data Mcp Servers","Finance \u0026 Fintech","📚 Projects (1974 total)","MCP 服务器精选列表","پیاده‌سازی‌های سرور","📦 Other","Legend","MCP Servers","Financial Data and Stock Market","カテゴリ","Table of Contents","Uncategorized","Server Implementations"],"sub_categories":["Cryptocurrency \u0026 Blockchain","Trading \u0026 Exchanges","How to Submit","MCP Servers","💰 金融与加密货币","💰 \u003ca name=\"finance--fintech\"\u003e\u003c/a\u003eمالی و فین‌تک","💰 \u003ca name=\"finance--fintech\"\u003e\u003c/a\u003eFinance \u0026 Fintech","💰Finance \u0026 Fintech","💰 \u003ca name=\"finance--crypto\"\u003e\u003c/a\u003e金融・暗号資産","Finance \u0026 Trading","Finance","Uncategorized"],"readme":"[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/ferdousbhai-investor-agent-badge.png)](https://mseep.ai/app/ferdousbhai-investor-agent)\n\n[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/ferdousbhai/investor-agent)](https://archestra.ai/mcp-catalog/ferdousbhai__investor-agent)\n\n# investor-agent: A Financial Analysis MCP Server\n\n## Overview\n\nThe **investor-agent** is a Model Context Protocol (MCP) server that provides comprehensive financial insights and analysis to Large Language Models. It leverages real-time market data, fundamental and technical analysis to deliver:\n\n- **Market Movers:** Top gainers, losers, and most active stocks with support for different market sessions\n- **Ticker Analysis:** Company overview, news, metrics, analyst recommendations, and upgrades/downgrades\n- **Options Data:** Filtered options chains with customizable parameters\n- **Historical Data:** Price trends and earnings history\n- **Financial Statements:** Income, balance sheet, and cash flow statements\n- **Ownership Analysis:** Institutional holders and insider trading activity\n- **Earnings Calendar:** Upcoming earnings announcements with date filtering\n- **Market Sentiment:** CNN Fear \u0026 Greed Index, Crypto Fear \u0026 Greed Index, and Google Trends sentiment analysis\n- **Technical Analysis:** SMA, EMA, RSI, MACD, BBANDS indicators (optional)\n\nThe server integrates with [yfinance](https://pypi.org/project/yfinance/) for market data and automatically optimizes data volume for better performance.\n\n## Architecture \u0026 Performance\n\n**Robust Caching \u0026 Error Handling Strategy:**\n\n1. **`yfinance[nospam]`** → Built-in smart caching + rate limiting for Yahoo Finance API\n2. **`hishel`** → HTTP response caching for external APIs (CNN, crypto, earnings data)\n3. **`tenacity`** → Retry logic with exponential backoff for transient failures\n\nThis multi-layered approach ensures reliable data delivery while respecting API rate limits and minimizing redundant requests.\n\n## Prerequisites\n\n- **Python:** 3.12 or higher\n- **Package Manager:** [uv](https://docs.astral.sh/uv/). Install if needed:\n  ```bash\n  curl -LsSf https://astral.sh/uv/install.sh | sh\n  ```\n\n### Optional Dependencies\n\n- **TA-Lib C Library:** Required for technical indicators. Follow [official installation instructions](https://ta-lib.org/install/).\n\n## Installation\n\n### Quick Start\n\n```bash\n# Core features only\nuvx investor-agent\n\n# With technical indicators (requires TA-Lib)\nuvx \"investor-agent[ta]\"\n```\n\n## Tools\n\n### Market Data\n- **`get_market_movers(category=\"most-active\", count=25, market_session=\"regular\")`** - Market movers data including top gainers, losers, or most active stocks. Supports different market sessions (regular/pre-market/after-hours) for most-active category. Returns up to 100 stocks with cleaned percentage changes, volume, and market cap data\n- **`get_ticker_data(ticker, max_news=5, max_recommendations=5, max_upgrades=5)`** - Comprehensive ticker report with essential field filtering and configurable limits for news, analyst recommendations, and upgrades/downgrades\n- **`get_options(ticker_symbol, num_options=10, start_date=None, end_date=None, strike_lower=None, strike_upper=None, option_type=None)`** - Options data with advanced filtering by date range (YYYY-MM-DD), strike price bounds, and option type (C=calls, P=puts)\n- **`get_price_history(ticker, period=\"1mo\")`** - Historical OHLCV data with intelligent interval selection: daily intervals for periods ≤1y, monthly intervals for periods ≥2y to optimize data volume\n- **`get_financial_statements(ticker, statement_types=[\"income\"], frequency=\"quarterly\", max_periods=8)`** - Financial statements with parallel fetching support. Returns dict with statement type as key\n- **`get_institutional_holders(ticker, top_n=20)`** - Major institutional and mutual fund holders data\n- **`get_earnings_history(ticker, max_entries=8)`** - Historical earnings data with configurable entry limits\n- **`get_insider_trades(ticker, max_trades=20)`** - Recent insider trading activity with configurable trade limits\n- **`get_nasdaq_earnings_calendar(date=None, limit=100)`** - Upcoming earnings announcements using Nasdaq API (YYYY-MM-DD format, defaults to today).\n\n### Market Sentiment\n- **`get_cnn_fear_greed_index(indicators=None)`** - CNN Fear \u0026 Greed Index with selective indicator filtering. Available indicators: fear_and_greed, fear_and_greed_historical, put_call_options, market_volatility_vix, market_volatility_vix_50, junk_bond_demand, safe_haven_demand\n- **`get_crypto_fear_greed_index()`** - Current Crypto Fear \u0026 Greed Index with value, classification, and timestamp\n- **`get_google_trends(keywords, period_days=7)`** - Google Trends relative search interest for market-related keywords. Requires a list of keywords to track (e.g., [\"stock market crash\", \"bull market\", \"recession\", \"inflation\"]). Returns relative search interest scores that can be used as sentiment indicators.\n\n### Technical Analysis\n- **`calculate_technical_indicator(ticker, indicator, period=\"1y\", timeperiod=14, fastperiod=12, slowperiod=26, signalperiod=9, nbdev=2, matype=0, num_results=100)`** - Calculate technical indicators (SMA, EMA, RSI, MACD, BBANDS) with configurable parameters and result limiting. Returns dictionary with price_data and indicator_data as CSV strings. matype values: 0=SMA, 1=EMA, 2=WMA, 3=DEMA, 4=TEMA, 5=TRIMA, 6=KAMA, 7=MAMA, 8=T3. Requires TA-Lib library.\n\n## Usage with MCP Clients\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"investor\": {\n      \"command\": \"uvx\",\n      \"args\": [\"investor-agent\"]\n    }\n  }\n}\n```\n\n## Local Testing\n\nFor local development and testing, use the included `chat.py` script:\n\n```bash\n# Install dev dependencies\nuv sync --group dev\n\n# Set up your API key\nexport OPENAI_API_KEY=\"your-api-key\"  # or ANTHROPIC_API_KEY, GEMINI_API_KEY, etc.\n\n# Optional: Set custom model (defaults to openai:gpt-5-mini)\nexport MODEL_IDENTIFIER=\"your-preferred-model\"\n\n# Run the chat interface\npython chat.py\n```\n\nFor available model providers and identifiers, see the [pydantic-ai documentation](https://ai.pydantic.dev/models/).\n\n## Debugging\n\n```bash\nnpx @modelcontextprotocol/inspector uvx investor-agent\n```\n\n## License\n\nMIT License. See [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdousbhai%2Finvestor-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferdousbhai%2Finvestor-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdousbhai%2Finvestor-agent/lists"}