Skip to main content
Glama
TuokkiCode

Finviz MCP

by TuokkiCode

Finviz MCP

MCP server that gives Claude (or any MCP client) access to Finviz stock data: single stock fundamentals, news, and screener searches, as well as real historical price data (Yahoo Finance). Data is fetched live using the finvizfinance and yfinance libraries, so no API keys are needed.

Tools

  • get_stock(ticker) – Finviz fundamentals for a single stock (P/E, market cap, margins, returns, etc.)

  • get_stock_news(ticker) – recent news headlines for a stock

  • get_price_history(ticker, days=7) – real daily-level historical data (Open/High/Low/Close/Volume) from Yahoo Finance for up to 365 days, plus a ready-made analysis of which day would have been the best buying day (lowest price and best return compared to the latest closing price). Finviz itself does not have a historical data API, only a current snapshot and a static chart image.

  • screen_stocks(...) – Finviz screener with natural parameters (market_cap, sector, pe_max, rsi, dividend_yield_min, signal, ...). Claude doesn't need to know Finviz's internal filter names – the server automatically translates parameters to the closest Finviz-supported value. Only works when run locally, not when deployed on a cloud server – see Limitations.

  • list_screener_filters(search=None) / list_screener_signals() – helper tools for Claude if it needs a filter that screen_stocks doesn't yet cover with a named parameter. The found value can be passed as the screen_stocks(extra_filters={...}) parameter.

screen_stocks parameters always snap to the nearest "bucket" Finviz offers (e.g. pe_max=18 → "Under 20"), because Finviz's screener only supports predefined value ranges, not arbitrary numbers.

1. Local Testing

Requires Python 3.10+:

pip install -r requirements.txt
python server.py

The server starts at http://localhost:8000/mcp (Streamable HTTP).

Tested end-to-end in this environment (installation, startup, initialize handshake, and all five tools with real Finviz data). During testing it turned out that PyPI's finvizfinance 1.3.0 was not yet up to date with Finviz's redesigned page layout: get_stock crashed entirely (the old quote-links CSS class is now quote-header_categories, with different content), and the Ticker column in screen_stocks had an extra leading character (e.g. "NVDA" → "NNVDA", due to Finviz's new logo placeholder). server.py fixes both directly (see the comment at the top of the file) – if Finviz changes its page again, these fixes should be revisited first.

If Python is not installed on your machine but Docker is, you can test without a local Python installation:

docker build -t finviz-mcp .
docker run -p 8000:8000 finviz-mcp

Quick functionality test from the command line (requires curl and that the server is running):

curl -X POST http://localhost:8000/mcp -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}"

The response should show six tools: get_stock, get_stock_news, get_price_history, screen_stocks, list_screener_filters, list_screener_signals.

2. Deployment (e.g. Render)

  1. Push this folder to your own Git repo (GitHub/GitLab).

  2. Render → New +Web Service → connect the repo.

  3. Render will automatically detect the Dockerfile. No separate environment variables are needed – the server reads the port from Render's PORT variable.

  4. After deployment you get an address like https://finviz-mcp.onrender.com. The MCP endpoint is /mcp after that, i.e.: https://finviz-mcp.onrender.com/mcp.

Railway, Fly.io, etc. work on the same principle (Dockerfile-based Python hosting, PORT environment variable).

3. Connecting to Claude

Claude → SettingsConnectorsAdd custom connector → paste the MCP URL (https://<your-address>/mcp).

Claude supports remote MCP servers via Streamable HTTP, so this works as-is.

4. Example Prompts

  • "Get me the Finviz fundamentals for NVDA."

  • "Find oversold technology stocks with market cap over $10B."

  • "Show me 15 large-cap dividend stocks with yield over 4% and P/E under 20."

  • "What's the latest news on TSLA?"

  • "Find stocks flagged as Top Gainers today with average volume over 1M."

Limitations

  • screen_stocks (and list_screener_filters/list_screener_signals) does not work when deployed on a cloud server (tested on Render): Finviz returns 403 Forbidden specifically for the screener endpoint (finviz.com/screener.ashx) from datacenter IP addresses, even though get_stock/get_stock_news/get_price_history work perfectly fine from the same server (they use different, less protected endpoints). This could not be fixed by tweaking HTTP headers – it appears to be Finviz's own intentional datacenter IP block specifically for the screener. If you need the screen_stocks functionality, run the server locally (python server.py) and connect to it via e.g. a cloudflared/ngrok tunnel, so that requests originate from your home network's IP.

  • Data is scraped from Finviz/Yahoo Finance websites (no official API keys), so it may break if they change their page structure.

  • screen_stocks limits results to 20 by default and at most 50 rows to keep the request fast.

  • get_price_history limits the days parameter to at most 365.

  • Does not include authentication – if the service is publicly on the internet, anyone who knows the URL can call it. The data is public, but keep this in mind if you later add paid/restricted features.

-
license - not tested
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Real-time market data, screeners, technical analysis & backtesting for stocks, crypto and forex.

  • Real-time news with bias scoring, live market data, and AI-powered options pricing

  • Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TuokkiCode/finviz-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server