The Finnhub MCP Server provides an interface to access financial market data through the Finnhub API. It allows you to fetch market news, stock quotes, financial information, and recommendation trends directly within Claude Desktop.
uv
package manager by following the instructions at docs.astral.sh/uv/Install dependencies using uv
:
uv sync
source .venv/bin/activate
Create a .env
file with your Finnhub API key:
FINNUB_API_KEY=<FINNHUB_API_KEY>
Install the MCP server:
fastmcp install server.py
Configure Claude Desktop to use the server by editing the configuration file located at:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
In the configuration file, locate the uv
command entry and replace it with the absolute path to your uv
executable.
Restart Claude Desktop to apply the changes.
Once installed, you can use the following tools in your Claude Desktop conversations:
Use the list_news
tool to get the latest market news:
@list_news
Fetch current market data for a specific stock:
@get_market_data symbol=AAPL
Get basic financial information for a company:
@get_basic_financials symbol=TSLA
Check analyst recommendations for a stock:
@get_recommendation_trends symbol=MSFT
For each tool, replace the example ticker symbols (AAPL, TSLA, MSFT) with the stock symbol you're interested in analyzing.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "finnhub" '{"command":"python","args":["-m","server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"finnhub": {
"command": "python",
"args": [
"-m",
"server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"finnhub": {
"command": "python",
"args": [
"-m",
"server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect