home / mcp / finnhub mcp server
An MCP server to interface with Finnhub API.
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.
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.
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)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.
List latest market news from Finnhub market news endpoint
Get market data for a particular stock from quote endpoint
Get basic financials for a particular stock from basic financials endpoint
Get recommendation trends for a particular stock from recommendation trend endpoint