mcp-finnhub
Model Context Protocol server for Finnhub financial market data API
Install / Use
claude mcp add cfdude -- npx -y github:cfdude/mcp-finnhubIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of mcp-finnhub
mcp-finnhub scores 80/100 on our quality scale, 3581st of 4,617 Development & Engineering skills we index.
Its MCP Server is 10 KB long, well organised into 62 sections with 15 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 4 days ago, so mcp-finnhub is actively maintained.
- Our last check on 2026-10-21 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
mcp-finnhub compared with similar skills
All 4 of these similar skills score higher than mcp-finnhub; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mcp-finnhub (this skill)by cfdude | 80 | 10 | 4d ago | MCP Server |
| taste-skillby Leonxlnx | 100 | 110.6k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 109.2k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.9k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 69.8k | today | CLAUDE.md |
Frequently asked questions
- How do I install mcp-finnhub?
- Run
claude mcp add cfdude -- npx -y github:cfdude/mcp-finnhub. The install tabs above show the steps for each supported agent. - Which AI agents does mcp-finnhub work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is mcp-finnhub safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mcp-finnhub still maintained?
- The repository was last updated 4 days ago, so mcp-finnhub is actively maintained.
Skill content
View source on GitHubmcp-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
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-finnhub
Option 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 limit
- Configure 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 insights
Fundamental 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 outlook
Multi-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 exports
Tool 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=true
Rate 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 examples
Structured 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
pip install -e ".[dev]"
# Run tests
pytest --cov=mcp_finnhub --cov-report=term-missing
# Lint and format
ruff check --fix .
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 8125
Transport Options
| Transport | Use Case | Command |
|-----------|----------|---------|
| stdio | Claude Desktop, local MCP clients | mcp-finnhub (default) |
| http | Remote connections, persistent server, Claude Code | mcp-finnhub --transport http --port 8000 |
| sse | Legacy SSE clients (deprecated) | mcp-finnhub --transport sse --port 8000 |
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 examples
Testing with MCP Inspector
# Install MCP inspector
npm install -g @modelcontextprotocol/inspector
# Test the server
mcp-inspector mcp-finnhub
Architecture
- 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 correct - Check 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 writable - Check filesystem permissions
Rate limit errors
- Reduce
FINNHUB_RATE_LIMIT_RPMin your configuration - Upgrade 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
Related Skills
taste-skill
110.6kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
109.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
78.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
69.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
