Get the FREE Ultimate OpenClaw Setup Guide →

mcp-finnhub

Model Context Protocol server for Finnhub financial market data API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cfdude-mcp-finnhub python -m mcp_finnhub \
  --env FINNHUB_API_KEY="your_api_key_here" \
  --env FINNHUB_STORAGE_DIR="/path/to/storage" \
  --env FINNHUB_ENABLE_NEWS_SENTIMENT="true" \
  --env FINNHUB_ENABLE_STOCK_MARKET_DATA="true" \
  --env FINNHUB_ENABLE_TECHNICAL_ANALYSIS="true"

How to use

mcp-finnhub is a Python-based MCP server that exposes a comprehensive set of Finnhub endpoints through 15 MCP tools. The server provides real-time market data (quotes, candles, tick data, BBO), a broad suite of technical indicators, fundamentals, alternative data, and multi-asset coverage (stocks, crypto, forex, ETFs, and bonds). Tools include finnhub_stock_market_data for market data, finnhub_technical_analysis for over 50 indicators, finnhub_news_sentiment for sentiment/news, finnhub_stock_fundamentals for financials, and several others for estimates, ownership, SEC filings, crypto data, forex data, calendar data, and project management. You can configure which tools are exposed and use Claude Desktop or other MCP clients to invoke operations like get_quote, get_indicator, or get_basic_financials, with structured error responses and built-in help for discovery.

How to install

Prerequisites:\n- Python 3.11 or higher\n- pip (comes with Python)\n- Git (optional, for cloning)\n\nInstallation steps:\n1) Install from PyPI (if available):\nbash\npip install mcp-finnhub\n\n2) Install from source (preferred during development):\nbash\ngit clone https://github.com/cfdude/mcp-finnhub.git\ncd mcp-finnhub\npip install -e .\n\n3) Prepare environment variables (example):\nbash\nexport FINNHUB_API_KEY=your_api_key\nexport FINNHUB_STORAGE_DIR=/path/to/storage\n\n4) Run the MCP server locally:\nbash\nmcp-finnhub # (uses the package's entry point)\n\n5) Optional: run with HTTP transport for remote connections:\nbash\nmcp-finnhub --transport http --port 8000\n

Additional notes

Tips and caveats:\n- Ensure FINNHUB_API_KEY is valid and has access to required Finnhub endpoints.\n- FINNHUB_STORAGE_DIR must be writable by the process; used to store CSV/JSON exports per project.\n- Use FINNHUB_ENABLE_* flags to enable/disable tool suites to optimize runtime/context (default offering may include stock market data, technical analysis, and news sentiment).\n- Rate limits: respect Finnhub limits and implement exponential backoff in clients. The MCP server will retry on transient errors.\n- If Claude Desktop or your MCP client reports discovery issues, use the built-in help by calling operation="help" on a tool to list required and optional parameters.\n- For large dataset processing, leverage the project storage structure to organize data by project names and export formats (CSV/JSON).

Related MCP Servers

Sponsor this space

Reach thousands of developers