mcp-finnhub
This server gives an AI client broad Finnhub market-data access with optional project storage and background jobs.
Fetch real-time quotes, company profiles, market status, symbol search, historical candles, financials, and earnings.
Analyze technical indicators, chart patterns, support/resistance, and aggregated signals.
Retrieve company/market news, news sentiment, and insider sentiment.
Access fundamentals, reported/SEC financials, dividends, splits, revenue breakdown, and analyst estimates/recommendations.
Inspect insider transactions, institutional ownership, institutional portfolios, and congressional trades.
Get alternative data such as ESG scores, social sentiment, supply-chain relationships, and patents.
Retrieve SEC filings, filing sentiment, and similarity analysis.
Access crypto and forex exchanges, symbols, profiles, rates, and candles.
Query IPO, earnings, economic, and FDA calendars, plus market holidays, upgrades/downgrades, and M&A activity.
Create and list project workspaces, save outputs, and check background job status.
Discover operations with tool help and receive structured AI-friendly errors.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-finnhub Get the latest stock price for Apple."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-finnhub
Model Context Protocol (MCP) server providing comprehensive access to Finnhub financial market data API. Built for AI assistants like Claude Desktop to seamlessly access real-time market data, technical indicators, fundamentals, and alternative data.
Features
15 MCP Tools covering 100+ Finnhub API endpoints
Real-time market data: Quotes, candles, tick data, BBO
Technical analysis: 50+ indicators, patterns, support/resistance
Fundamentals: Financials, earnings, dividends, metrics
Alternative data: ESG scores, social sentiment, supply chain
Multi-asset support: Stocks, crypto, forex, ETFs, bonds
Project-based storage with automatic CSV/JSON exports
Background job processing for large datasets
Smart output handling with token estimation
Configurable tools - enable only what you need
AI-friendly errors - Structured error responses with guidance
Built-in help - Every tool supports
operation="help"for discovery
Related MCP server: massive-mcp
Quick Start
Prerequisites
Python 3.11 or higher
Finnhub API key (free tier available)
Claude Desktop or compatible MCP client
Installation
Option 1: Install from PyPI (coming soon)
pip install mcp-finnhubOption 2: Install from source
git clone https://github.com/cfdude/mcp-finnhub.git
cd mcp-finnhub
pip install -e .Configuration
Create a
.envfile in your project root:
# Required
FINNHUB_API_KEY=your_api_key_here
FINNHUB_STORAGE_DIR=/path/to/storage
# Optional - Tool configuration
FINNHUB_ENABLE_TECHNICAL_ANALYSIS=true
FINNHUB_ENABLE_STOCK_MARKET_DATA=true
FINNHUB_ENABLE_NEWS_SENTIMENT=true
# ... enable/disable other tools as needed
# Optional - Performance tuning
FINNHUB_RATE_LIMIT_RPM=300 # Requests per minute (30 free, 300 premium)
FINNHUB_REQUEST_TIMEOUT=30 # Request timeout in seconds
FINNHUB_SAFE_TOKEN_LIMIT=75000 # Conservative token limitConfigure Claude Desktop to use mcp-finnhub by adding to
claude_desktop_config.json:
{
"mcpServers": {
"finnhub": {
"command": "mcp-finnhub",
"env": {
"FINNHUB_API_KEY": "your_api_key_here",
"FINNHUB_STORAGE_DIR": "/Users/yourname/finnhub-data"
}
}
}
}Restart Claude Desktop
First Query
Ask Claude:
"Get me the latest quote for AAPL"
Claude will use the finnhub_stock_market_data tool with the get_quote operation to fetch Apple's real-time stock quote.
Available Tools
Core Trading & Analysis (3 tools)
finnhub_stock_market_data- Quotes, candles, tick data, BBO, market statusfinnhub_technical_analysis- 50+ indicators (RSI, MACD, SMA), patterns, signalsfinnhub_news_sentiment- Company news, market news, sentiment scores
Fundamentals & Analysis (5 tools)
finnhub_stock_fundamentals- Financials, earnings, dividends, metricsfinnhub_stock_estimates- Revenue/EPS estimates, price targetsfinnhub_stock_ownership- Insider trades, institutional holdingsfinnhub_alternative_data- ESG scores, social sentiment, supply chainfinnhub_sec_filings- SEC filings, earnings transcripts
Multi-Asset Data (4 tools)
finnhub_crypto_data- Crypto exchanges, symbols, profiles, candlesfinnhub_forex_data- Forex rates, candles, exchangesfinnhub_calendar_data- IPO calendar, earnings calendar, economic eventsfinnhub_market_events- Market holidays, analyst upgrades/downgrades
Management Tools (3 tools)
finnhub_project_create- Create project workspacesfinnhub_project_list- List all projects with statisticsfinnhub_job_status- Check background job status
Example Workflows
Technical Analysis Workflow
User: "Analyze TSLA using RSI and MACD indicators"
Claude uses:
1. finnhub_technical_analysis → get_indicator (operation=get_indicator, symbol=TSLA, indicator=rsi)
2. finnhub_technical_analysis → get_indicator (operation=get_indicator, symbol=TSLA, indicator=macd)
3. Analyzes both indicators and provides trading insightsFundamental Research Workflow
User: "Research MSFT - get financials, earnings, and analyst estimates"
Claude uses:
1. finnhub_stock_fundamentals → get_basic_financials (operation=get_basic_financials, symbol=MSFT)
2. finnhub_stock_fundamentals → get_earnings (operation=get_earnings, symbol=MSFT)
3. finnhub_stock_estimates → get_earnings_estimates (operation=get_earnings_estimates, symbol=MSFT)
4. Summarizes financial health and analyst outlookMulti-Asset Portfolio Workflow
User: "Create a project called 'my-portfolio', get quotes for AAPL, BTC-USD, and EUR/USD"
Claude uses:
1. finnhub_project_create → create (operation=create, project=my-portfolio)
2. finnhub_stock_market_data → get_quote (operation=get_quote, symbol=AAPL, project=my-portfolio)
3. finnhub_crypto_data → get_crypto_profile (operation=get_crypto_profile, symbol=BINANCE:BTCUSDT)
4. finnhub_forex_data → get_forex_rates (operation=get_forex_rates, base=EUR, project=my-portfolio)
5. All data saved to /storage/my-portfolio/ with CSV exportsTool Configuration
Control which tools are available to reduce context window usage:
# Disable tools you don't need
FINNHUB_ENABLE_CRYPTO=false
FINNHUB_ENABLE_FOREX=false
FINNHUB_ENABLE_ALTERNATIVE_DATA=false
# Core tools (always recommended)
FINNHUB_ENABLE_STOCK_MARKET_DATA=true
FINNHUB_ENABLE_TECHNICAL_ANALYSIS=true
FINNHUB_ENABLE_NEWS_SENTIMENT=trueRate Limits
Free tier: 60 requests/minute
Basic tier: 150 requests/minute ($49.99/month)
Premium tier: 300 requests/minute
Enterprise tier: Custom limits
mcp-finnhub automatically handles rate limiting with exponential backoff and retry logic.
AI Agent Features
Help/Discovery
Every tool supports operation="help" to discover available operations:
finnhub_stock_fundamentals(operation="help")
# Returns all operations with required/optional params and examplesStructured Errors
Errors return actionable JSON instead of stack traces:
{
"error": "invalid_operation",
"message": "Operation 'get_data' not found",
"valid_operations": ["get_basic_financials", "get_dividends", ...],
"tool": "finnhub_stock_fundamentals"
}Storage Structure
Projects are stored in subdirectories:
FINNHUB_STORAGE_DIR/
├── my-portfolio/
│ ├── .project.json # Project metadata
│ ├── candles/ # Historical price data
│ ├── quotes/ # Real-time quotes
│ ├── news/ # News articles
│ ├── fundamentals/ # Financial data
│ ├── technical/ # Technical indicators
│ └── jobs/ # Background job results
└── research-tech/
└── ...Development
Setup
# Clone repository
git clone https://github.com/cfdude/mcp-finnhub.git
cd mcp-finnhub
# Install with dev dependencies
uv sync --all-extras
# Run tests
uv run pytest --cov=mcp_finnhub --cov-report=term-missing
# Lint and format
uv run ruff check --fix .
uv run ruff format .Running Locally
# Set environment variables
export FINNHUB_API_KEY=your_api_key
export FINNHUB_STORAGE_DIR=/tmp/finnhub-data
# Run with STDIO transport (default, for Claude Desktop)
mcp-finnhub
# Run with HTTP streaming (recommended for persistent/remote connections)
mcp-finnhub --transport http --port 8000
# Run with SSE transport (deprecated, use HTTP instead)
mcp-finnhub --transport sse --port 8000
# Custom host binding for network access
mcp-finnhub --transport http --host 0.0.0.0 --port 8125Transport Options
Transport | Use Case | Command |
| Claude Desktop, local MCP clients |
|
| Remote connections, persistent server, Claude Code |
|
| Legacy SSE clients (deprecated) |
|
Running as a Persistent Service
For HTTP transport, you can run the server as a background service:
# Using nohup (simple)
nohup mcp-finnhub --transport http --port 8000 > finnhub.log 2>&1 &
# Using systemd (Linux)
# See docs/DEPLOYMENT.md for service file examplesTesting with MCP Inspector
# Install MCP inspector
npm install -g @modelcontextprotocol/inspector
# Test the server
mcp-inspector mcp-finnhubArchitecture
FastMCP Server: Built on MCP SDK's FastMCP for multi-transport support
ServerContext: Dependency injection container managing client and utilities
Multi-Transport: STDIO (default), HTTP streaming, and SSE transports
Async Job Processing: Background workers for large dataset operations
Type Safety: Pydantic models for all API requests/responses
See ARCHITECTURE.md for detailed design documentation.
API Reference
See API.md for complete tool documentation with examples.
Troubleshooting
"Authentication failed" error
Verify your
FINNHUB_API_KEYis correctCheck if your API key has expired
Ensure you haven't exceeded rate limits
"Tool not found" error
Check that the tool is enabled in your configuration
Verify tool names match exactly (case-sensitive)
Storage permission errors
Ensure
FINNHUB_STORAGE_DIRexists and is writableCheck filesystem permissions
Rate limit errors
Reduce
FINNHUB_RATE_LIMIT_RPMin your configurationUpgrade to premium tier for higher limits
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass
Submit a pull request
License
MIT License - see LICENSE for details
Acknowledgments
Built with Model Context Protocol
Powered by Finnhub API
Inspired by mcp-fred patterns
Support
Issues: GitHub Issues
Documentation: docs/
Finnhub API Docs: finnhub.io/docs/api
Made with ❤️ for the AI assistant ecosystem
Available Tools
15 toolsfinnhub_alternative_dataC
ESG scores, social sentiment, supply chain, and patents.
Operations:
get_esg_scores: Get ESG (Environmental, Social, Governance) scores
get_social_sentiment: Get social media sentiment
get_supply_chain: Get supply chain relationships
get_patents: Get patent filings
Inputs: operation (required), symbol, project. Returns: result
finnhub_calendar_dataB
IPO calendar, earnings calendar, economic events, and FDA meetings.
Operations:
get_ipo_calendar: Get upcoming IPOs
get_earnings_calendar: Get earnings announcements
get_economic_calendar: Get economic events
get_fda_calendar: Get FDA advisory committee meetings
Inputs: operation (required), symbol, project, to_date, +1 more. Returns: result
finnhub_crypto_dataC
Cryptocurrency exchanges, symbols, profiles, and candles.
Operations:
get_crypto_exchanges: List crypto exchanges
get_crypto_symbols: List symbols for an exchange
get_crypto_profile: Get crypto profile (e.g., BTC)
get_crypto_candles: Get historical OHLCV candles
Inputs: operation (required), symbol, project, exchange, +3 more. Returns: result
finnhub_forex_dataB
Foreign exchange rates, symbols, and candles.
Operations:
get_forex_exchanges: List forex exchanges
get_forex_symbols: List symbols for an exchange
get_forex_rates: Get exchange rates for base currency
get_forex_candles: Get historical OHLCV candles
Inputs: operation (required), base, symbol, project, +4 more. Returns: result
finnhub_job_statusC
Check status of background jobs.
Operations:
get_status: Get status of a specific job
list_jobs: List all jobs
Inputs: operation (required), job_id. Returns: result
finnhub_market_eventsC
Market holidays, analyst upgrades/downgrades, and M&A activity.
Operations:
get_market_holidays: Get market holiday schedule
get_upgrade_downgrade: Get analyst rating changes
get_merger_acquisition: Get M&A activity
Inputs: operation (required), symbol, project, exchange. Returns: result
finnhub_news_sentimentC
Company news, market news, and sentiment analysis.
Operations:
get_company_news: Get news for a specific company
get_market_news: Get general market news
get_news_sentiment: Get sentiment analysis for news
get_insider_sentiment: Get insider sentiment data
Inputs: operation (required), symbol, project, to_date, +2 more. Returns: result
finnhub_project_createB
Create project workspaces for organizing data.
Operations:
create: Create a new project workspace
Inputs: operation (required), name, description. Returns: result
finnhub_project_listA
List all project workspaces with statistics.
Operations:
list: List all projects
Inputs: operation (required). Returns: result
finnhub_sec_filingsC
SEC filings, filing sentiment, and similarity analysis.
Operations:
get_sec_filings: Get SEC filing history
get_filing_sentiment: Get sentiment analysis of a filing
get_similarity_index: Get filing similarity index
Inputs: operation (required), freq, symbol, project, +1 more. Returns: result
finnhub_stock_estimatesA
Analyst estimates for earnings, revenue, EBITDA, and price targets.
Operations:
get_earnings_estimates: Get analyst earnings estimates
get_revenue_estimates: Get analyst revenue estimates
get_ebitda_estimates: Get analyst EBITDA estimates
get_price_targets: Get analyst price targets (Premium)
get_recommendations: Get analyst recommendations
Inputs: operation (required), freq, symbol, project. Returns: result
finnhub_stock_fundamentalsA
Financial statements, earnings, dividends, and splits.
Operations:
get_basic_financials: Get key financial metrics
get_reported_financials: Get reported financial statements
get_sec_financials: Get SEC-reported financials
get_dividends: Get dividend history
get_splits: Get stock split history
get_revenue_breakdown: Get revenue by segment/geography
For get_basic_financials:
include_series: Include historical time series (default: False, saves ~100K+ tokens)
series_limit: Max periods per metric when include_series=True (e.g., 4 = last 4 periods)
Inputs: operation (required), freq, symbol, project, +4 more. Returns: result
finnhub_stock_market_dataC
Real-time quotes, historical candles, and company profiles.
Operations:
get_quote: Get real-time quote for a symbol
get_company_profile: Get company profile and details
get_market_status: Get market open/close status
search_symbols: Search for symbols by name
get_candles: Get historical OHLCV candles
get_symbols: List symbols for an exchange
get_financials: Get financial statements
get_earnings: Get earnings data
Inputs: operation (required), freq, query, symbol, +6 more. Returns: result
finnhub_stock_ownershipB
Insider trades, institutional ownership, and congressional trading.
Operations:
get_insider_transactions: Get insider trading activity
get_institutional_ownership: Get institutional holders
get_institutional_portfolio: Get institution's portfolio by CIK
get_congressional_trades: Get congressional trading activity
Inputs: operation (required), cik, symbol, project. Returns: result
finnhub_technical_analysisC
Technical indicators, patterns, and signals.
Operations:
scan_patterns: Scan for technical chart patterns
support_resistance: Get support and resistance levels
aggregate_signals: Get aggregated technical signals
get_indicator: Calculate specific technical indicator
Inputs: operation (required), symbol, project, indicator, +4 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
The tool categories are mostly distinct, but overlap exists between finnhub_stock_market_data's get_financials/get_earnings and finnhub_stock_fundamentals or finnhub_stock_estimates, as well as between market_events analyst upgrades and estimates recommendations. This creates ambiguity for an agent selecting the appropriate tool.
All 15 tools follow the consistent pattern 'finnhub_<domain>' using snake_case, such as finnhub_stock_estimates, finnhub_crypto_data, and finnhub_job_status. The naming is uniform and predictable.
15 tools is at the upper bound of the ideal range but suits the broad scope of financial data covered (stocks, crypto, forex, news, fundamentals, estimates, etc.). Some tools like finnhub_project_create and finnhub_project_list are ancillary, but the count is reasonable.
The tool set provides comprehensive coverage of financial data: real-time quotes, candles, fundamentals, estimates, news, technical analysis, insider trading, crypto, forex, and calendars. Minor gaps include missing project delete/update operations and some redundant data retrieval paths (e.g., get_financials vs get_basic_financials).
Maintenance
Related MCP Connectors
MCP server for Financial Modeling Prep API with 250+ financial data tools
Official Intrinio MCP server. US stock prices, options and fundamentals for AI agents.
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceAn MCP server that enables Claude Desktop to access and analyze financial data through Yahoo Finance integration.1-
- AlicenseBqualityCmaintenanceMCP server exposing Massive.com's REST Stocks API for querying stock market data via Claude Desktop/Code.31MIT
- AlicenseBqualityDmaintenanceA Node.js MCP server that wraps the Finnhub API to provide stock market data, technical analysis, news sentiment, and cryptocurrency market information.15117 npm1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for stock prices, historical data, FX rates, and ticker search, powered by yfinance with no API key required. Designed for Claude Desktop.1Apache 2.0