Finnhub MCP Server
A Model Context Protocol (MCP) server that provides real-time financial data through the Finnhub API.
Installation
npm install -g finnhub-mcp
Or run directly with npx:
npx finnhub-mcp
Usage
Prerequisites
You'll need a Finnhub API key. Get one free at https://finnhub.io.
Environment Variables
Set your Finnhub API key:
export FINNHUB_API_KEY=your_api_key
Running the Server
finnhub-mcp
Or with npx:
FINNHUB_API_KEY=your_api_key npx finnhub-mcp
VS Code Integration
Add this to your MCP configuration in VS Code:
{
"inputs": [
{
"type": "promptString",
"id": "finnhub-key",
"description": "Finnhub API Key",
"password": true
}
],
"servers": {
"Finnhub": {
"type": "stdio",
"command": "npx",
"args": ["finnhub-mcp", "--stdio", "--urls", "http://localhost:3000"],
"env": {
"FINNHUB_API_KEY": "${input:finnhub-key}"
}
}
}
}
Claude Integration
Add this to claude_desktop_config.json file
in Claude desktop:
{
"mcpServers": {
"finnhub-mcp": {
"type": "stdio",
"command": "npx",
"args": ["finnhub-mcp", "--stdio", "--urls", "http://localhost:3000"],
"env": {
"FINNHUB_API_KEY": "your_api_key"
}
}
}
}
Tools
- Real-time financial data streaming
- Server-Sent Events (SSE) support
- Standard input/output (STDIO) transport
- Integration with Finnhub API
License
MIT