finviz-screener-mcp
MCP server exposing Finviz's US stock screener via finvizfinance, allowing filter-based screening and custom table columns as structured JSON.
README
finviz-screener-mcp
FastMCP server that exposes only Finviz’s stock screener via finvizfinance.
US-only: every screen() call hardcodes Country=USA. No news, maps, insider trading, or Elite API — just screener filters → structured JSON.
Tools
| Tool | Purpose |
|---|---|
list_filters |
Progressive discovery (index / one category / one section / search) — avoids dumping ~1694 values |
screen |
Compact screener results (default limit 25, max 100; offset capped at 400; null fields and the always-USA Country column stripped) |
Both tools are annotated read-only (readOnlyHint) so clients can skip confirmation prompts. Invalid input and upstream failures are raised as MCP tool errors (isError: true) with messages like [invalid_filter] ... or [upstream] ..., so agents can self-correct.
Keep agent context small
list_filters() → category names + counts only
list_filters(category="Sector") → values for Sector only
list_filters(section="signals") → signals only
list_filters(query="rsi") → matching names
screen(..., limit=15, table="custom", columns=[...]) → only needed fields
Example screen call:
{
"filters": {
"Sector": "Technology",
"Market Cap.": "Large ($10bln to $200bln)"
},
"table": "custom",
"order": "Market Cap.",
"ascend": false,
"columns": ["Ticker", "Market Cap.", "P/E", "RSI", "Price"],
"limit": 15
}
Important caveats
- Unofficial scrape.
finvizfinanceparses the free Finviz HTML screener. There is no free official API; Elite’s CSV/API export is a separate paid surface and is not used here. - Quotes on the free site are delayed.
- Scraping can break if Finviz changes its DOM, and may be against Finviz Terms of Service. Use responsibly.
Local setup
Requires Python 3.11+ (3.12 recommended; see .python-version).
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
Run the server (stdio):
fastmcp run main.py:mcp
# or
python main.py
Inspect tools:
fastmcp inspect main.py:mcp
Cursor / Claude Desktop (stdio)
{
"mcpServers": {
"finviz-screener": {
"command": "uv",
"args": ["run", "--with-requirements", "requirements.txt", "fastmcp", "run", "main.py:mcp"],
"cwd": "/absolute/path/to/finviz-screener-mcp"
}
}
}
Or with an activated venv:
{
"mcpServers": {
"finviz-screener": {
"command": "/absolute/path/to/finviz-screener-mcp/.venv/bin/fastmcp",
"args": ["run", "main.py:mcp"],
"cwd": "/absolute/path/to/finviz-screener-mcp"
}
}
}
No API key or .env is required.
Deploy on Prefect Horizon (FastMCP Cloud)
Horizon is the managed host from the FastMCP team (docs; console: horizon.prefect.io). URLs look like https://{name}.fastmcp.app/mcp.
- Push this repo to GitHub.
- Sign in at horizon.prefect.io with GitHub and select the repo.
- Configure:
- Entrypoint:
main.py:mcp - Dependencies:
requirements.txt(auto-detected)
- Entrypoint:
- Deploy. Horizon ignores
if __name__ == "__main__"and installs deps fromrequirements.txt. - Connect clients to
https://your-server-name.fastmcp.app/mcp.
No environment variables or secrets are required for this server. If you add any later: Settings → Environment Variables, mark sensitive, then rebuild and redeploy (env changes do not hot-reload).
Smoke check
python -c "
from main import list_filters, screen
print([c['name'] for c in list_filters()['categories'][:5]])
print(screen(filters={'Sector': 'Technology'}, limit=3)['count'])
"
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.