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-mcpWhat'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: Financial Data 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.
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| period | No | 6mo |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the computed indicators (SMA20, SMA50, EMA20, RSI14) and explains that insufficient history results in null values, providing clear behavioral expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, using a docstring format with dedicated Args and Returns sections. It front-loads the main purpose and every sentence provides value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (not shown), the description still explains the return values in detail, including the closing price, three moving averages, RSI, and handling of nulls. It covers the lookback window and default behavior, making it complete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so parameter documentation relies entirely on the description. The description adds meaning to both parameters: symbol is explained with an example (AAPL), and period is described as a lookback window with default '6mo' and a cross-reference to get_stock_history for more details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Compute common technical indicators for a stock over a lookback window,' which uses a specific verb and resource, and clearly distinguishes from sibling tools like get_stock_history (raw history) and get_stock_quote (current quote).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (when needing technical indicators) and references get_stock_history for period details, but does not explicitly state when not to use or contrast alternatives. Sibling tools are distinct, so some guidance is present.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| coin_id | Yes | ||
| vs_currency | No | usd |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It discloses the output format (current price and 24h change) and the external dependency (CoinGecko) through the parameter description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with Args and Returns sections, but it is slightly verbose. The key information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple, the description explains parameters and return values, and an output schema exists. No gaps are apparent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description fully compensates by explaining both parameters: coin_id is the slug (not ticker) with examples, and vs_currency is the quote currency with examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it gets the latest cryptocurrency price, with specific examples. The sibling tools are for stocks, so it distinguishes well.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the tool name and sibling context (crypto vs stocks), but no explicit when-to-use or when-not-to-use guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| period | No | 1mo | |
| interval | No | 1d |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the output format (list of candles ordered oldest-to-newest) and parameter constraints. No contradictions; it is a read-only tool without side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loading the main purpose, then listing parameters with examples in a clean formatted style. Every sentence adds value without unnecessary fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and presence of an output schema (though not shown), the description adequately covers parameter usage and return format. It does not mention data source or rate limits, but these are not critical for basic usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining symbol as 'Ticker symbol, e.g., AAPL', period as 'Lookback window', interval as 'Candle size', and provides example values. This is effective but could be slightly more detailed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves historical OHLCV candles for stocks or ETFs, distinguishing it from sibling tools like get_stock_quote (current price) and analyze_stock (analysis). The verb 'Get' and resource 'historical OHLCV candles for a stock or ETF' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear parameter guidance (symbol, period, interval) with examples, but does not explicitly state when to use this tool versus alternatives like analyze_stock or get_stock_quote. The context is implied for historical data retrieval.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It mentions the return fields (price, day change, percent change, currency) but does not disclose data source, latency, real-time vs delayed data, error handling, or rate limits. The description is adequate but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two short sections: a clear one-line purpose followed by parameter and return details. It is front-loaded and contains no extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, the description covers the main purpose and return values. An output schema exists, so return details may be further documented there. However, it lacks mention of error cases, prerequisites, or any prerequisites for use, which would enhance completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% coverage, so the description must compensate. It explains the 'symbol' parameter as a ticker symbol with examples (AAPL, MSFT, SPY), adding meaning beyond the schema's bare type definition. Could be slightly more precise about case sensitivity or exchange, but overall helpful.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the latest price for a stock or ETF', specifying the verb and resource. The tool distinguishes itself from siblings like 'get_crypto_price' (crypto) and 'get_stock_history' (historical data) by focusing on current price retrieval for stocks and ETFs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is provided on when to use this tool versus siblings. The description implies it's for stocks/ETFs but does not mention when not to use it or suggest alternatives like 'analyze_stock' for deeper analysis.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
analyze_stock - First observed
get_crypto_price - First observed
get_stock_history - First observed
get_stock_quote
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 multi-asset market data for AI agents with provenance, starter credits, x402, and examples.
Live financial data MCP: FX, crypto, stocks, news, URL reader. x402 on Base: $0.001/call.
Market intelligence for AI agents. Real-time data, cross-market analysis, and regime detection.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
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
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides financial tools for retrieving real-time stock data, analyst recommendations, financial statements, and web search capabilities for a LangGraph-powered ReAct agent.1-
- 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.934 PyPI1MIT
- FlicenseNot gradedqualityCmaintenanceProvides real-time and historical cryptocurrency market data using ccxt, enabling price tracking and alerts through the Model Context Protocol.1-