home / mcp / finnhub mcp server

Finnhub MCP Server

Presents Finnhub market data via an MCP server with an earnings calendar and API key authentication.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ach968-finnhub-mcp": {
      "command": "npx",
      "args": [
        "github:ach968/finnhub-mcp",
        "--api-key",
        "YOUR_FINNHUB_API_KEY"
      ],
      "env": {
        "FINNHUB_API_KEY": "YOUR_FINNHUB_API_KEY"
      }
    }
  }
}

You can access Finnhub financial market data through a dedicated MCP server that wraps the Finnhub API. It provides an earnings calendar and a simple API key authentication flow, with full TypeScript support and Bun runtime optimization for development and production.

How to use

You can run the Finnhub MCP server via a quick one-liner with an API key, or run it locally in development to test and customize. Once the MCP server is running, you can query the earnings calendar and other supported endpoints using any MCP client that speaks the standard MCP interface.

How to install

Prerequisites you need before starting: Bun runtime installed. You will also need access to a Finnhub API key.

Option A — Run directly from GitHub (recommended) using npx: you will fetch and run the MCP server without cloning.

npx github:ach968/finnhub-mcp --api-key YOUR_FINNHUB_API_KEY

Option B — Run in local development after cloning the repository and installing dependencies.

# Clone the repository
git clone https://github.com/ach968/finnhub-mcp.git
cd finnhub-mcp

# Install dependencies
bun install

# Run in development mode
bun run dev -- --api-key YOUR_FINNHUB_API_KEY

Additional configuration and usage notes

Authentication is API key based. Provide your Finnhub API key as either a command-line argument or via environment variables when you start the MCP server.

OpenCode configuration examples show how you can integrate the MCP server with a local setup by either using npx with the GitHub package or by configuring an environment variable for the API key.

Security and keys

Protect your Finnhub API key. Do not commit keys to source control. Use environment variables or secure CLI arguments to supply the key at runtime.

Notes on available data

The server exposes an earnings calendar endpoint that includes upcoming and historical earnings announcements with EPS estimates, actuals, and revenue data. Time values used in earnings data include Before Market Open (bmo), After Market Close (amc), and During Market Hours (dmh).

Available tools

finnhub.calendar.earnings

Fetch earnings calendar data for a given date range with optional symbol filtering. Returns date, symbol, quarter, fiscal year, time of release, eps and revenue estimates, actuals, and surprises.