investor-agent

investor-agent

Comprehensive Financial Analysis Server for LLMs via Model Context Protocol

286
Stars
51
Forks
286
Watchers
0
Issues
investor-agent is an MCP server designed to deliver in-depth financial insights and market analysis to Large Language Models. It leverages real-time data sources and advanced analysis tools to provide information such as market movers, ticker data, options chains, historical prices, financial statements, ownership structure, and sentiment indices. The platform features robust caching and error handling for reliable and efficient data delivery while supporting extensible financial analytics with optional technical indicators and intraday data.

Key Features

Market movers data with session support
Comprehensive company and ticker analysis
Filtered options chains with advanced parameters
Historical OHLCV price data with adaptive intervals
Financial statements retrieval (income, balance, cash flow)
Ownership analysis for institutional and insider activity
Earnings calendar with customizable filtering
Market sentiment from multiple indices (CNN, Crypto, Google Trends)
Optional technical indicators (SMA, EMA, RSI, MACD, BBANDS)
Robust multi-layered caching and API error handling

Use Cases

Enabling LLMs and AI agents to access real-time financial intelligence
Automated financial analysis for investment decision making
Generating comprehensive company and market reports
Evaluating stock performance with technical and fundamental analysis
Monitoring market sentiment and trends
Conducting options trading research and filtering
Assessing company ownership changes and insider trading
Historical data analysis for backtesting strategies
Preparing earnings announcements and market calendars
Integrating augmented financial context into conversational AI or assistants

README

MseeP.ai Security Assessment Badge

Trust Score

investor-agent: A Financial Analysis MCP Server

Overview

The 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:

  • Market Movers: Top gainers, losers, and most active stocks with support for different market sessions
  • Ticker Analysis: Company overview, news, metrics, analyst recommendations, and upgrades/downgrades
  • Options Data: Filtered options chains with customizable parameters
  • Historical Data: Price trends and earnings history
  • Financial Statements: Income, balance sheet, and cash flow statements
  • Ownership Analysis: Institutional holders and insider trading activity
  • Earnings Calendar: Upcoming earnings announcements with date filtering
  • Market Sentiment: CNN Fear & Greed Index, Crypto Fear & Greed Index, and Google Trends sentiment analysis
  • Technical Analysis: SMA, EMA, RSI, MACD, BBANDS indicators (optional)
  • Intraday Data: 15-minute historical stock bars via Alpaca API (optional)

The server integrates with yfinance for market data and automatically optimizes data volume for better performance.

Architecture & Performance

Robust Caching & Error Handling Strategy:

  1. yfinance[nospam] → Built-in smart caching + rate limiting for Yahoo Finance API
  2. hishel → HTTP response caching for external APIs (CNN, crypto, earnings data)
  3. tenacity → Retry logic with exponential backoff for transient failures

This multi-layered approach ensures reliable data delivery while respecting API rate limits and minimizing redundant requests.

Prerequisites

  • Python: 3.12 or higher
  • Package Manager: uv. Install if needed:
    bash
    curl -LsSf https://astral.sh/uv/install.sh | sh
    

Optional Dependencies

Installation

Quick Start

bash
# Core features only
uvx investor-agent

# With technical indicators (requires TA-Lib)
uvx "investor-agent[ta]"

# With Alpaca intraday data (requires Alpaca API keys)
uvx "investor-agent[alpaca]"

# With all optional features
uvx "investor-agent[ta,alpaca]"

Tools

Market Data

  • 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
  • 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
  • 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)
  • 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
  • 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
  • get_institutional_holders(ticker, top_n=20) - Major institutional and mutual fund holders data
  • get_earnings_history(ticker, max_entries=8) - Historical earnings data with configurable entry limits
  • get_insider_trades(ticker, max_trades=20) - Recent insider trading activity with configurable trade limits
  • get_nasdaq_earnings_calendar(date=None, limit=100) - Upcoming earnings announcements using Nasdaq API (YYYY-MM-DD format, defaults to today).
  • fetch_intraday_data(stock, window=200) - Fetch 15-minute historical stock bars using Alpaca API. Returns CSV string with timestamp and close price data in EST timezone. Requires investor-agent[alpaca] installation and ALPACA_API_KEY/ALPACA_API_SECRET environment variables.

Market Sentiment

  • get_cnn_fear_greed_index(indicators=None) - CNN Fear & 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
  • get_crypto_fear_greed_index() - Current Crypto Fear & Greed Index with value, classification, and timestamp
  • 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.

Technical Analysis

  • 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.

Usage with MCP Clients

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "investor": {
      "command": "uvx",
      "args": ["investor-agent"]
    }
  }
}

Local Testing

For local development and testing, use the included chat.py script:

bash
# Install dev dependencies
uv sync --group dev

# Set up your API key
export OPENAI_API_KEY="your-api-key"  # or ANTHROPIC_API_KEY, GEMINI_API_KEY, etc.

# Optional: Set custom model (defaults to openai:gpt-5-mini)
export MODEL_IDENTIFIER="your-preferred-model"

# Run the chat interface
python chat.py

For available model providers and identifiers, see the pydantic-ai documentation.

Debugging

bash
npx @modelcontextprotocol/inspector uvx investor-agent

License

MIT License. See LICENSE file for details.

Star History

Star History Chart

Repository Owner

Repository Details

Language Python
Default Branch main
Size 528 KB
Contributors 4
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Crypto Indicators MCP Server

    Crypto Indicators MCP Server

    Technical analysis indicators and strategies for AI trading via the Model Context Protocol.

    Crypto Indicators MCP Server provides over 50 cryptocurrency technical analysis indicators and quantitative trading strategies through an MCP-compliant server interface. The tool is designed for AI trading agents and can integrate seamlessly with platforms like Claude Desktop. It offers support for multiple exchanges via CCXT, modular design for easy maintenance, and outputs actionable trading signals based on market trends.

    • 91
    • MCP
    • kukapay/crypto-indicators-mcp
  • Octagon MCP Server

    Octagon MCP Server

    AI-powered financial research and market intelligence via MCP.

    Octagon MCP Server enables specialized, AI-powered financial research and analysis by integrating with the Octagon Market Intelligence API. It provides the ability to analyze public filings, earnings call transcripts, financial metrics, stock data, and private market transactions within Claude Desktop and other MCP-compatible clients. The server orchestrates multiple specialized agents for comprehensive market analysis and can aggregate, extract, and structure data from financial sources and public websites. Designed for seamless use in standardized Model Context Protocol environments, it supports rapid integration into advanced AI workflows.

    • 78
    • MCP
    • OctagonAI/octagon-mcp-server
  • Yahoo Finance MCP Server

    Yahoo Finance MCP Server

    A simple MCP server to access Yahoo Finance data via standardized tools.

    Yahoo Finance MCP Server provides a Model Context Protocol (MCP) server enabling seamless access to financial data from Yahoo Finance. It offers a set of standardized tools to fetch stock information, news, historical prices, and perform advanced searches. The server can be deployed using either Docker or uv with straightforward configuration. It is designed to easily integrate with MCP-compatible AI environments and workflows.

    • 68
    • MCP
    • narumiruna/yfinance-mcp
  • FinData MCP Server

    FinData MCP Server

    Open-source MCP server for LLM access to professional financial data.

    FinData MCP Server offers standardized financial data access to large language models by implementing the Model Context Protocol. It supports multiple data providers such as Tushare and Wind, and enables retrieval of both market and macroeconomic data via Stdio or SSE transports. The server is configurable and integrates into AI systems, providing tools for market, fundamental, and financial data queries.

    • 45
    • MCP
    • zlinzzzz/finData-mcp-server
  • tasty-agent

    tasty-agent

    Model Context Protocol server for TastyTrade portfolio monitoring and trading.

    tasty-agent is a Model Context Protocol (MCP) server designed to enable LLMs to interface with TastyTrade brokerage accounts. It provides functionality for monitoring portfolios, analyzing market positions, and executing trades through a standardized API. The tool offers automated implied volatility (IV) analysis, supports real-time market data streaming, and features robust rate limiting and error handling to ensure reliability. Authentication is handled via OAuth, and the tool is easily configurable for MCP clients.

    • 47
    • MCP
    • ferdousbhai/tasty-agent
  • cryptopanic-mcp-server

    cryptopanic-mcp-server

    Provides real-time cryptocurrency news to AI agents via Model Context Protocol.

    cryptopanic-mcp-server delivers up-to-date cryptocurrency news to AI agents by integrating with the CryptoPanic API. It exposes an MCP-compliant server with a tool for fetching news or media headlines, supporting customization via API keys and configuration files. The implementation is intended for streamlined context integration into AI workflows, enhancing agent awareness with current crypto market updates.

    • 59
    • MCP
    • kukapay/cryptopanic-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results