Finnhub MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Finnhub MCP ServerWhat's Apple's current stock price?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Finnhub MCP Server
A Model Context Protocol (MCP) server that gives AI assistants (Claude, Cursor, etc.) real-time access to financial market data via the Finnhub API.
Ask Claude things like:
"What is Apple's current stock price?"
"Show me Tesla's earnings history"
"Get the latest crypto news"
"What are EUR/USD rates right now?"
π Available Tools (11 total)
Category | Tool | What it does |
π Stocks |
| Real-time price, change %, high/low |
| Historical OHLCV candles (1min β monthly) | |
| Name, exchange, industry, market cap | |
| P/E, EPS, beta, ROE, dividend yield | |
| Historical EPS vs estimate + surprise % | |
π° News |
| Recent articles for a stock in a date range |
| Market news by category (general/forex/crypto/merger) | |
π Search |
| Look up ticker symbols by name or keyword |
π± Forex |
| Live exchange rates from a base currency |
| Historical OHLCV for forex pairs | |
πͺ Crypto |
| Historical OHLCV for crypto pairs |
Free Tier Note: The Finnhub free plan supports US stocks (NYSE/NASDAQ), forex, and crypto. Indian (NSE/BSE) and other international exchanges require a paid plan at finnhub.io/pricing.
Related MCP server: MCP Finnhub Server
β‘ Prerequisites
Node.js 20+ β Download
Finnhub API key β Get free key (takes 30 seconds)
AWS CLI (only for Lambda deployment) β Install guide
π Option 1 β Local (Claude Desktop / Cursor)
Step 1: Clone & install
git clone <your-repo-url> finnhub-mcp
cd finnhub-mcp
npm installStep 2: Add your API key
cp .env.example .env
# Open .env and set:
# FINNHUB_API_KEY=your_key_hereStep 3: Build
npm run buildStep 4: Connect to Claude Desktop
Open (or create) the Claude Desktop config file:
OS | Path |
macOS |
|
Windows |
|
Add the mcpServers block (merge with existing content if the file already exists):
{
"mcpServers": {
"finnhub": {
"command": "node",
"args": ["/absolute/path/to/finnhub-mcp/dist/index.js"],
"env": {
"FINNHUB_API_KEY": "your_api_key_here"
}
}
}
}Important: Replace
/absolute/path/to/finnhub-mcpwith the actual path where you cloned the repo.
Step 5: Restart Claude Desktop
Fully quit Claude (don't just close the window) and relaunch it.
Verify: Open a new chat and look for the π¨ hammer icon at the bottom of the input box. Click it to see all 11 Finnhub tools listed.
Connect to Cursor (Local)
Go to Cursor Settings β MCP β Add Server and add:
{
"finnhub": {
"command": "node",
"args": ["/absolute/path/to/finnhub-mcp/dist/index.js"],
"env": {
"FINNHUB_API_KEY": "your_api_key_here"
}
}
}Test with MCP Inspector (optional)
npm run inspector
# Opens http://localhost:5173 β interactive tool testerβοΈ Option 2 β AWS Lambda (Remote / Shared)
Deploy the server as a public HTTPS endpoint that any MCP client can connect to.
Architecture
AI Agent (Claude / Cursor)
β HTTPS POST /mcp
βΌ
AWS Lambda Function URL
(Response Streaming)
β
βΌ
Express + StreamableHTTP (stateless)
β
βΌ
Finnhub REST API β finnhub.ioStep 1: Configure AWS CLI
aws configure
# Enter: Access Key ID, Secret Access Key, Region (e.g. us-east-1), Output: jsonVerify it works:
aws sts get-caller-identityStep 2: One-time Lambda setup
bash deploy/lambda-setup.shThis will:
β Create an IAM execution role
β Build & package the server into a zip
β Create the Lambda function (
finnhub-mcp-server)β Create a public Function URL with response streaming
At the end you'll see:
ββββββββββββββββββββββββββββββββββββββββββββββββ
β
Setup complete!
MCP Endpoint : https://xxxx.lambda-url.us-east-1.on.aws/mcp
Health Check : https://xxxx.lambda-url.us-east-1.on.aws/health
ββββββββββββββββββββββββββββββββββββββββββββββββStep 3: Test your Lambda
# Health check
curl https://xxxx.lambda-url.us-east-1.on.aws/health
# Call a tool
curl -X POST https://xxxx.lambda-url.us-east-1.on.aws/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_stock_quote",
"arguments": { "symbol": "AAPL" }
}
}'Step 4: Connect Claude Desktop to Lambda
Claude Desktop uses mcp-remote as a local bridge to reach the remote Lambda server. No code runs on your machine β mcp-remote just proxies requests over HTTPS.
Open your Claude Desktop config file:
OS | Path |
macOS |
|
Windows |
|
Add the following (replace the URL with the one printed by lambda-setup.sh):
{
"mcpServers": {
"finnhub": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://xxxx.execute-api.us-east-1.amazonaws.com/mcp"
]
}
}
}Note:
npxwill downloadmcp-remoteautomatically on first launch β no manual install needed.
Fully quit Claude Desktop and relaunch it. On first connection, mcp-remote will perform the MCP handshake with your Lambda and load all 11 tools.
Verify: Click the π¨ hammer icon in the chat input β you should see all Finnhub tools listed.
Step 5: Connect Cursor to Lambda
Go to Cursor Settings β MCP β Add Server:
{
"finnhub": {
"url": "https://xxxx.execute-api.us-east-1.amazonaws.com/mcp"
}
}Cursor supports remote HTTP MCP URLs natively β no
mcp-remotebridge needed.
Redeploy after code changes
npm run deploy
# or: bash deploy/deploy.shπ Project Structure
finnhub-mcp/
βββ src/
β βββ index.ts β Stdio entry point (Claude Desktop / local)
β βββ http.ts β HTTP entry point (Lambda / remote)
β βββ server.ts β Shared MCP server factory
β βββ finnhub.ts β Typed Finnhub HTTP client
β βββ tools/
β βββ stocks.ts β 5 stock tools
β βββ news.ts β 2 news tools
β βββ search.ts β 1 search tool
β βββ forex.ts β 2 forex tools
β βββ crypto.ts β 1 crypto tool
βββ deploy/
β βββ lambda-setup.sh β One-time AWS setup
β βββ deploy.sh β Redeploy script
βββ dist/ β Compiled output (after npm run build)
βββ .env β Your API key (never commit this!)
βββ .env.example β Template
βββ package.json
βββ tsconfig.jsonπ§ Environment Variables
Variable | Required | Description |
| β Yes | Your Finnhub API key from finnhub.io/register |
| No | HTTP server port (default: |
| No | AWS region for deployment (default: |
π¬ Example Prompts
Once connected, try these in Claude:
What is Apple's current stock price and how has it changed today?Show me Microsoft's company profile and key financial metricsGet me 5 recent news articles about TeslaSearch for symbols related to "artificial intelligence"What are the current EUR/USD, GBP/USD, and JPY/USD exchange rates?Show Bitcoin's daily candles on Binance for the past 30 daysβ Troubleshooting
Problem | Cause | Fix |
| Missing env var | Add key to |
| Symbol not on free plan | Use US stocks (AAPL, TSLA) or upgrade at finnhub.io/pricing |
| Invalid API key | Verify key at finnhub.io/dashboard |
| Rate limit hit | Free tier = 30 req/sec. Wait and retry |
Hammer icon missing in Claude | Server not connecting | Fully quit Claude (not just close) and relaunch |
Lambda returns timeout | Cold start too slow | Increase Lambda timeout in AWS console (currently 30s) |
π License
MIT β free to use, modify, and deploy.
This server cannot be deployed
Maintenance
Related MCP Connectors
Provide AI assistants with real-time access to official SEC EDGAR filings and financial data. Enabβ¦
Fetch current stock prices and key data for symbols across global markets. Look up companies likeβ¦
Finnhub MCP β wraps Finnhub Stock API (finnhub.io)
Real-time data API for AI Agents: stocks, weather, forex, logistics, search, scrape, news, IP.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables AI assistants to access and analyze financial data including stock information, company fundamentals, and market insights through the Financial Modeling Prep API.100257 npm147TypeScriptApache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides comprehensive financial market data and news through the Finnhub API. Enables real-time stock quotes, company profiles, financial metrics, analyst recommendations, and market news access.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides real-time stock quotes, historical data, and stock search via Yahoo Finance, enabling AI assistants to access and analyze financial market data.11 npm19MIT
- FlicenseAqualityDmaintenanceProvides stock market data and analysis tools using the Finnhub API, including stock prices, financial metrics, news, and historical data.67-