Finviz MCP Server

Finviz MCP Server

Provides comprehensive stock screening and fundamental analysis capabilities using Finviz data, including earnings tracking, volume surge detection, technical indicators, dividend growth screening, and SEC filing retrieval.

Category
访问服务器

README

Finviz MCP Server

English | 日本語

A Model Context Protocol (MCP) server that provides comprehensive stock screening and fundamental analysis capabilities using Finviz data.

Features

Stock Screening Tools

  • Earnings Screener: Find stocks with upcoming earnings announcements
  • Volume Surge Screener: Detect stocks with unusual volume and price movements
  • Trend Analysis: Identify uptrend and momentum stocks
  • Dividend Growth Screener: Find dividend-paying stocks with growth potential
  • ETF Screener: Screen exchange-traded funds
  • Premarket/Afterhours Earnings: Track earnings reactions in extended hours

Fundamental Analysis

  • Individual stock fundamental data retrieval
  • Multiple stock comparison
  • Sector and industry performance analysis
  • News and sentiment tracking

Technical Analysis

  • RSI, Beta, and volatility metrics
  • Moving average analysis (SMA 20/50/200)
    • NEW: get_moving_average_position – see how far price sits above/below the 20-, 50-, and 200-day SMAs in a single call
  • Relative volume analysis
  • 52-week high/low tracking

📄 SEC Filing Features

  1. SEC Filing List Retrieval
    # All AAPL filings (past 30 days)
    finviz_get_sec_filings(ticker="AAPL", days_back=30)
    
    # Major forms only (10-K, 10-Q, 8-K, etc.)
    finviz_get_major_sec_filings(ticker="AAPL", days_back=90)
    
    # Insider trading related (Form 3, 4, 5, etc.)
    finviz_get_insider_sec_filings(ticker="AAPL", days_back=30)
    

Installation

Prerequisites

  • Python 3.11 or higher
  • Finviz Elite Subscription (required for full functionality)
  • Finviz API key (optional but recommended for higher rate limits)

Important: This MCP server requires a Finviz Elite subscription to access comprehensive screening and data features. For more details about Finviz Elite and subscription options, visit: https://elite.finviz.com/elite.ashx

Setup

  1. Clone and setup the project:
# Clone the repository
git clone <repository-url>
cd finviz-mcp-server

# Create virtual environment with Python 3.11
python3.11 -m venv venv

# Activate virtual environment
source venv/bin/activate  # On macOS/Linux
# or
venv\\Scripts\\activate     # On Windows

# Install the package in development mode
pip install -e .
  1. Configure environment variables:
# Copy the example environment file
cp .env.example .env

# Edit .env file and add your Finviz API key
FINVIZ_API_KEY=your_actual_api_key_here
  1. Test the installation:
# Test if the server starts correctly (press Ctrl+C to stop)
finviz-mcp-server

# You should see the server starting in stdio mode

Configuration

The server can be configured using environment variables:

  • FINVIZ_API_KEY: Your Finviz Elite API key (required for Elite features, improves rate limits)
  • MCP_SERVER_PORT: Server port (default: 8080)
  • LOG_LEVEL: Logging level (default: INFO)
  • RATE_LIMIT_REQUESTS_PER_MINUTE: Rate limiting (default: 100)

Note: While the API key is technically optional, many advanced screening features require a Finviz Elite subscription and API key to function properly.

Usage

Running the MCP Server

The server runs as a stdio-based MCP server:

# Make sure virtual environment is activated
source venv/bin/activate

# Run the server
finviz-mcp-server

Integration with Claude Desktop

Add the server to your Claude Desktop MCP configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "finviz": {
      "command": "/path/to/your/project/venv/bin/finviz-mcp-server",
      "args": [],
      "cwd": "/path/to/your/project/finviz-mcp-server",
      "env": {
        "FINVIZ_API_KEY": "your_api_key_here",
        "LOG_LEVEL": "INFO",
        "RATE_LIMIT_REQUESTS_PER_MINUTE": "100"
      }
    }
  }
}

Important Configuration Notes:

  • Replace /path/to/your/project/ with your actual project path
  • Use the absolute path to the finviz-mcp-server executable in your virtual environment
  • Set the cwd (current working directory) to your project root
  • Replace your_api_key_here with your actual Finviz API key

Alternative: Using .env file If you prefer to use a .env file (recommended for security):

{
  "mcpServers": {
    "finviz": {
      "command": "/path/to/your/project/venv/bin/finviz-mcp-server",
      "args": [],
      "cwd": "/path/to/your/project/finviz-mcp-server"
    }
  }
}

Make sure your .env file contains all required environment variables.

MCP Tools

Earnings Screener

# Find stocks with earnings today after market close
earnings_screener(
    earnings_date="today_after",
    market_cap="large",
    min_price=10,
    min_volume=1000000,
    sectors=["Technology", "Healthcare"]
)

Volume Surge Screener

# Find stocks with high volume and price increases
volume_surge_screener(
    market_cap="smallover",
    min_price=10,
    min_relative_volume=1.5,
    min_price_change=2.0,
    sma_filter="above_sma200"
)

Stock Fundamentals

# Get fundamental data for a single stock
get_stock_fundamentals(
    ticker="AAPL",
    data_fields=["pe_ratio", "eps", "dividend_yield", "market_cap"]
)

# Get fundamental data for multiple stocks
get_multiple_stocks_fundamentals(
    tickers=["AAPL", "MSFT", "GOOGL"],
    data_fields=["pe_ratio", "eps", "market_cap"]
)

Advanced Screening Examples

Earnings-Based Strategies

Premarket Earnings Momentum

earnings_premarket_screener(
    earnings_timing="today_before",
    market_cap="large",
    min_price=25,
    min_price_change=2.0,
    include_premarket_data=True
)

Afterhours Earnings Reactions

earnings_afterhours_screener(
    earnings_timing="today_after",
    min_afterhours_change=5.0,
    market_cap="mid",
    include_afterhours_data=True
)

Technical Analysis Strategies

Trend Reversal Candidates

trend_reversion_screener(
    market_cap="large",
    eps_growth_qoq=10.0,
    rsi_max=30,
    sectors=["Technology", "Healthcare"]
)

Strong Uptrend Stocks

uptrend_screener(
    trend_type="strong_uptrend",
    sma_period="20",
    relative_volume=2.0,
    price_change=5.0
)

Value Investment Strategies

Dividend Growth

dividend_growth_screener(
    min_dividend_yield=2.0,
    max_dividend_yield=6.0,
    min_dividend_growth=5.0,
    min_roe=15.0
)

Data Models

StockData

Comprehensive stock information including:

  • Basic info (ticker, company, sector, industry)
  • Price and volume data
  • Technical indicators (RSI, Beta, moving averages)
  • Fundamental metrics (P/E, EPS, dividend yield)
  • Earnings data (surprises, estimates, growth rates)
  • Performance metrics (1w, 1m, YTD)

Screening Results

Structured results with:

  • Query parameters used
  • List of matching stocks
  • Total count and execution time
  • Formatted output for easy reading

Error Handling

The server includes comprehensive error handling:

  • Input validation for all parameters
  • Rate limiting protection
  • Network error recovery with retries
  • Detailed error messages and logging

Rate Limiting

To respect Finviz's servers:

  • Default 1-second delay between requests
  • Configurable rate limiting
  • Automatic retry with exponential backoff
  • Finviz Elite API key support for higher limits

Logging

Configurable logging levels:

  • DEBUG: Detailed request/response information
  • INFO: General operation information (default)
  • WARNING: Non-critical issues
  • ERROR: Critical errors

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This tool is for educational and research purposes only. Always conduct your own research before making investment decisions. The authors are not responsible for any financial losses incurred using this software.

Finviz Elite Requirement: This MCP server requires a Finviz Elite subscription for full functionality. Free Finviz accounts have limited access to screening features and data. For comprehensive stock screening capabilities, please subscribe to Finviz Elite at https://elite.finviz.com/elite.ashx

Support

For issues and feature requests, please use the GitHub issue tracker.

Support the Project

If you find this project helpful, consider supporting its development:

Buy Me A Coffee

Changelog

v1.0.0

  • Initial release
  • Basic screening tools implementation
  • Fundamental data retrieval
  • MCP server integration
  • Comprehensive error handling and validation

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选