home / mcp / finnhub mcp server

Finnhub MCP Server

An MCP server to interface with Finnhub API.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "catherinedparnell-mcp-finnhub": {
      "command": "fastmcp",
      "args": [
        "dev",
        "server.py"
      ],
      "env": {
        "FINNUB_API_KEY": "YOUR_FINNHUB_API_KEY"
      }
    }
  }
}

You have a Finnhub MCP Server that exposes common market data and financial insights through a lightweight MCP interface. It connects to Finnhub APIs to list market news, fetch stock quotes, basic financials, and recommendation trends, enabling you to drive client apps and automation with consistent MCP endpoints.

How to use

You connect your MCP client to the Finnhub MCP Server using the standard MCP connection flow. Start the server locally, then point your client to the server’s runtime entry and invoke the available tools as you would with any MCP service. Use the tools to list latest market news, retrieve market data for a stock symbol, fetch basic financials for a symbol, and obtain recommendation trends.

How to install

Prerequisites: ensure you have Python and the ability to run commands in a shell. You will also need the Finnhub API key to access data.

"""
Installation and start flow:
"""

# 1) Install dependencies for the MCP server environment
uv sync

# 2) Activate the virtual environment
source .venv/bin/activate

# 3) Create or configure your Finnhub API key
FINNUB_API_KEY=<FINNHUB_API_KEY>

# 4) Install the MCP server implementation
fastmcp install server.py

# 5) Start the MCP server in development mode
fastmcp dev server.py

# 6) Optional: adjust the MCP launcher path for the uv runtime (see configuration steps below)

Additional content

Configuration and runtime notes: you will need to provide your Finnhub API key to authorize requests. The server reads the key from an environment variable named FINNUB_API_KEY. After installation, you will adjust the launcher to ensure the correct uv/runtime is used when starting the server.

Available tools

list_news

List latest market news from Finnhub market news endpoint

get_market_data

Get market data for a particular stock from quote endpoint

get_basic_financials

Get basic financials for a particular stock from basic financials endpoint

get_recommendation_trends

Get recommendation trends for a particular stock from recommendation trend endpoint