finance-mcp
Real-time stock & crypto market data for LLMs, over the Model Context Protocol.
README
finance-mcp
Real-time stock & crypto market data for LLMs, over the Model Context Protocol.
finance-mcp is an MCP server that lets any MCP-compatible client (Claude Desktop,
Cline, Continue, …) pull live equity and crypto quotes, historical candles, and
common technical indicators — so the model can reason over real market data instead
of hallucinating it.
┌──────────────┐ MCP (stdio) ┌───────────────┐ HTTP ┌──────────────┐
│ LLM client │ ◀─────────────▶ │ finance-mcp │ ◀──────▶ │ yfinance │
│ (Claude etc.)│ tool calls │ server │ │ CoinGecko │
└──────────────┘ └───────────────┘ └──────────────┘
Demo

The session above is illustrative; the JSON matches the real shape returned by
compare_assets. Regenerate it any time withpython scripts/make_demo.py.
Features
get_stock_quote— latest price, day change, % change for any ticker (AAPL,SPY, …)get_quotes— batch quotes for many tickers, fetched concurrentlyget_stock_history— OHLCV candles over a configurable period/intervalget_crypto_price— live crypto quotes via CoinGecko (no API key needed)analyze_stock— SMA(20/50), EMA(20), and RSI(14) computed in-processcompare_assets— rank a mix of stocks and crypto by their % move- Provider layer isolates each upstream API behind a small, fully unit-tested surface
- Async throughout; blocking provider I/O is offloaded to worker threads
Install
git clone https://github.com/porkornrawee/finance-mcp.git
cd finance-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
Use with Claude Desktop
Add this to your claude_desktop_config.json (see examples/):
{
"mcpServers": {
"finance": {
"command": "finance-mcp",
"args": []
}
}
}
Restart Claude Desktop, then ask things like:
"What's the RSI on NVDA over the last 6 months, and how does it compare to Bitcoin's 24h move?"
Tools
| Tool | Arguments | Returns |
|---|---|---|
get_stock_quote |
symbol |
price, change, %, currency |
get_quotes |
symbols |
list of quotes (per-symbol errors isolated) |
get_stock_history |
symbol, period, interval |
list of OHLCV candles |
get_crypto_price |
coin_id, vs_currency |
price, 24h change |
analyze_stock |
symbol, period |
latest close + SMA/EMA/RSI |
compare_assets |
stocks, crypto, vs_currency |
assets ranked by % move + best/worst |
Note: crypto uses CoinGecko ids (the slug), e.g.
bitcoin, notBTC.
Development
ruff check . # lint
mypy src # type-check
pytest -q # tests (network-free; CoinGecko is mocked with respx)
The indicator math in indicators.py is intentionally
pure and dependency-free so it can be tested deterministically without hitting any API.
Disclaimer
This project is for informational and educational purposes only. It is not financial advice. Market data is provided by third parties on a best-effort basis and may be delayed or inaccurate.
License
MIT © porkornrawee — see LICENSE.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.