finance-mcp
The finance-mcp server provides real-time and historical stock and cryptocurrency market data, along with technical analysis tools, for use by LLMs via the Model Context Protocol.
Get a single stock/ETF quote: Retrieve the latest price, day change, percent change, and currency for any ticker symbol (e.g.,
AAPL,SPY).Get multiple stock quotes: Fetch batch quotes for several tickers concurrently.
Get historical OHLCV candles: Access historical open/high/low/close/volume data for a stock or ETF over a configurable period (e.g.,
1d,1mo,1y,max) and interval (e.g.,1m,1d,1wk).Get cryptocurrency prices: Retrieve the latest price and 24-hour change for any cryptocurrency using its CoinGecko slug (e.g.,
bitcoin,ethereum) in a chosen fiat currency (default: USD).Analyze stocks with technical indicators: Compute SMA(20), SMA(50), EMA(20), and RSI(14) over a configurable lookback period (default: 6 months), returned alongside the latest close price.
Compare assets: Rank a mixed list of stocks and cryptocurrencies by percentage move to identify best and worst performers.
Provides real-time cryptocurrency quotes and market data (e.g., price, 24h change) via CoinGecko for Bitcoin and other coins.
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., "@finance-mcp What's the RSI and moving averages for MSFT?"
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.
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.
Related MCP server: Yahoo Finance MCP Server
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 % moveProvider 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 |
|
| price, change, %, currency |
|
| list of quotes (per-symbol errors isolated) |
|
| list of OHLCV candles |
|
| price, 24h change |
|
| latest close + SMA/EMA/RSI |
|
| 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.
Available Tools
4 toolsanalyze_stockA
Compute common technical indicators for a stock over a lookback window.
Args:
symbol: Ticker symbol, e.g. AAPL.
period: Lookback window (see get_stock_history). Defaults to 6 months.
Returns the latest close alongside SMA(20), SMA(50), EMA(20) and RSI(14). Indicators
that lack enough history in the window are returned as null.
Inputs: symbol (required), period. Returns: object
get_crypto_priceA
Get the latest price for a cryptocurrency.
Args:
coin_id: CoinGecko coin id (the slug, not the ticker): bitcoin, ethereum,
solana. Note: use bitcoin, not BTC.
vs_currency: Quote currency, e.g. usd, eur, thb.
Returns a quote with the current price and 24h change.
Inputs: coin_id (required), vs_currency. Returns: object
get_stock_historyA
Get historical OHLCV candles for a stock or ETF.
Args:
symbol: Ticker symbol, e.g. AAPL.
period: Lookback window. One of: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, max.
interval: Candle size. One of: 1m, 5m, 15m, 1h, 1d, 1wk, 1mo.
Returns a list of candles ordered oldest-to-newest.
Inputs: symbol (required), period, interval. Returns: object
get_stock_quoteA
Get the latest price for a stock or ETF.
Args:
symbol: Ticker symbol, e.g. AAPL, MSFT, SPY.
Returns a quote with the current price, day change, percent change, and currency.
Inputs: symbol (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct resource and operation: stock analysis, crypto price, stock history, and stock quote. No overlapping functionality.
All tool names follow a consistent verb_noun pattern in snake_case (analyze_stock, get_crypto_price, get_stock_history, get_stock_quote).
4 tools is a reasonable count for a focused finance server covering basic stock and crypto data, though slightly on the lower side.
Covers stock history, quote, analysis and crypto price, but misses crypto history, forex, and fundamentals, leaving notable gaps.
Maintenance
Related MCP Connectors
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
Crypto market data for AI agents: live prices, OHLCV, sentiment, indicators and exchanges.
Aligned market data for AI agents: crypto, stocks, FX and macro on one clock. Local or hosted.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time financial data from Yahoo Finance to Large Language Models through the Model Context Protocol, enabling AI models to access stock prices, historical data, and company information.1MIT
- AlicenseAqualityCmaintenanceProvides access to real-time stock prices, financial statements, news, and options data via the Model Context Protocol. It enables AI assistants to retrieve comprehensive market data, including historical prices and analyst recommendations, through a standardized interface.964 PyPI3MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLMs and agentic workflows to access real-time and historical stock market data through the Model Context Protocol.227MIT
- AlicenseNot gradedqualityDmaintenanceProvides real-time stock data, news, company fundamentals, and technical indicators for AI assistants via the Model Context Protocol.MIT