Free API key
Finnhub Stock Data Skill
Give an agent a simple interface for quotes, company profiles, news and market events.
- Source
- Finnhub
- Access
- Free API key
What this adds to your agent
Retrieve a current quote
Look up company profiles
Add market news and event context
Retrieve a current quote
Entitlements, exchange coverage and delayed versus real-time status depend on the plan and endpoint.
Finnhub · market
Build the tool server
from mcp.server.fastmcp import FastMCP
import os, requests
mcp = FastMCP("Finnhub")
@mcp.tool()
def stock_quote(symbol: str) -> dict:
"""Return a Finnhub quote with current, high, low and prior close."""
params = {"symbol": symbol, "token": os.environ["FINNHUB_API_KEY"]}
return requests.get("https://finnhub.io/api/v1/quote",
params=params, timeout=20).json()
if __name__ == "__main__": mcp.run()Examples and expected outcomes
Fetch prices and statements in agent chat
- Sourced evidence
- Repeatable steps
- Explicit uncertainty
Create a read-only research brief
- Sourced evidence
- Repeatable steps
- Explicit uncertainty
Compare tickers with source timestamps
- Sourced evidence
- Repeatable steps
- Explicit uncertainty
Access requirements
FINNHUB_API_KEY
Review source and upstream data licenses
Use caching, backoff and bounded concurrency
Connect to your Agent
{
"mcpServers": {
"finnhub-agent": {
"command": "python",
"args": [
"server.py"
],
"env": {
"FINNHUB_API_KEY": "YOUR_KEY"
}
}
}
}“Use Finnhub Stock Data Skill to research AAPL. List sources and timestamps first, then separate facts, calculations, risks and missing data. Do not give personalized trading advice.”
When not to use it
- Entitlements, exchange coverage and delayed versus real-time status depend on the plan and endpoint.
Connect it to your agent
{
"mcpServers": {
"finnhub-agent": {
"command": "python",
"args": [
"server.py"
],
"env": {
"FINNHUB_API_KEY": "YOUR_KEY"
}
}
}
}“Use the connected tool to research AAPL. State the source and timestamp for every factual claim, separate facts from interpretation, and do not give personalized financial advice.”
Production checklist
- Keep secrets outside prompts and source code
- Allowlist read-only tools first
- Log tool inputs, outputs and source timestamps
- Require citations and handle missing data explicitly
When not to use it
Entitlements, exchange coverage and delayed versus real-time status depend on the plan and endpoint.
Open official documentationProject-specific questions
What can Finnhub Stock Data Skill do in a real workflow?
Retrieve a current quote Look up company profiles Add market news and event context
What access and compatibility does Finnhub Stock Data Skill require?
Free API key. Finnhub.
What is the main implementation risk with Finnhub Stock Data Skill?
Entitlements, exchange coverage and delayed versus real-time status depend on the plan and endpoint.