A standard MCP server providing real-time stock quotes and news via Finnhub API, using JSON-RPC over SSE protocol.
git clone https://huggingface.co/spaces/JC321/MarketandStockMCP cd MarketandStockMCP pip install -r requirements.txt
For Claude Desktop:
Edit configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd this configuration:
{
"mcpServers": {
"finnhub": {
"command": "python",
"args": ["C:\\path\\to\\MarketandStockMCP\\mcp_server.py"],
"env": {
"FINNHUB_API_KEY": "your_finnhub_api_key_here"
}
}
}
}
For Cursor IDE:
Add to MCP settings with the same JSON configuration above.
C:\\path\\to\\MarketandStockMCP\\mcp_server.py with your actual file path. Use double backslashes (\\) on Windows.
get_quote(symbol="AAPL")get_quote(symbol: str) — Get real-time stock price, daily change, high, low, open, previous closeget_market_news(category: str, min_id: int) — Get latest market news by category (general/forex/crypto/merger)get_company_news(symbol: str, from_date: str, to_date: str) — Get company-specific news within date range