Financial analysis tools for AI assistants — technical indicators, options analysis, position sizing, and trade analytics via MCP
Project description
fintools-mcp
Financial analysis tools for AI assistants via MCP (Model Context Protocol).
Give Claude, ChatGPT, Cursor, or any MCP-compatible AI access to real financial analysis — not just stock prices, but the analytical toolkit a trader actually uses.
This repository is Fintools Core: the free, open-source MCP foundation. See VISION.md for the public product direction and guardrails.
Tools
| Tool | What it does |
|---|---|
get_technical_indicators |
RSI, MACD, ATR, EMAs (9/21/50/200), Fibonacci levels, trend assessment |
get_stock_quote |
Current price, volume, 52-week range, market cap |
get_trend_score |
Trend score from -100 (strong downtrend) to +100 (strong uptrend) with component breakdown |
get_support_resistance |
Key support/resistance levels with touch counts and strength ratings |
screen_stocks |
Screen S&P 500 by RSI, trend score, EMA position, relative volume — find setups fast |
get_data_source_stats |
Show cache status and provider request counters for the current MCP session |
analyze_options_chain |
Options chain with IV analysis, liquidity filtering, put/call ratios |
calculate_position_size |
Risk-based position sizing with stop loss and profit target |
calculate_atr_position |
ATR-based position sizing — auto-calculates stop and target from volatility |
analyze_trades |
Win rate, profit factor, Sharpe ratio, drawdown, streaks from trade P&Ls |
compare_tickers |
Side-by-side technical comparison across multiple symbols |
How it works
Quick Start
Install
pip install fintools-mcp
Or with uv:
uv pip install fintools-mcp
Add to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"fintools": {
"command": "uv",
"args": ["run", "--from", "fintools-mcp", "fintools-mcp"]
}
}
}
Or if installed via pip:
{
"mcpServers": {
"fintools": {
"command": "fintools-mcp"
}
}
}
Add to Claude Code
claude mcp add fintools -- uv run --from fintools-mcp fintools-mcp
Examples
Once configured, you can ask your AI assistant things like:
- "Find oversold S&P 500 stocks still above their 200 EMA"
- "What's SPY's trend score?"
- "Show me support and resistance levels for NVDA"
- "What's the technical setup on AAPL right now?"
- "Analyze the SPY options chain for next Friday"
- "If I want to go long NVDA with a $100k account risking 1.5%, how many shares and where's my stop?"
- "Compare AAPL, GOOGL, MSFT, and AMZN — which has the strongest trend?"
- "Here are my last 20 trades: [150, -80, 200, ...] — what's my win rate and Sharpe?"
Example Output
Technical Indicators
> "What's the technical setup on SPY?"
SPY @ $573.42
RSI(14): 58.3 — bullish momentum
MACD: 2.14 (histogram +0.38, bullish)
ATR(14): $7.82
EMAs: 9 > 21 > 50 > 200 (fully stacked bullish)
Fibonacci: In golden pocket (0.618-0.65 retracement)
Trend: Bullish (all signals aligned)
Position Sizing
> "Size a long position on AAPL at $227, stop $220, target $245"
Shares: 214
Position value: $48,578
Risk: $1,498 (1.5% of $100k)
Reward: $3,852
R:R ratio: 2.57
Architecture
fintools-mcp/
├── fintools_mcp/
│ ├── server.py # MCP server — tool definitions
│ ├── data.py # Market data via yfinance/Public with cache + batch fetch helpers
│ ├── data_cache.py # File-backed cache for repeated quote/bar requests
│ ├── indicators/ # Technical indicators (standalone, no deps)
│ │ ├── rsi.py # RSI — Wilder's smoothing
│ │ ├── macd.py # MACD (12, 26, 9)
│ │ ├── atr.py # ATR — Average True Range
│ │ ├── ema.py # EMA — any period
│ │ ├── vwap.py # VWAP — intraday, daily reset
│ │ └── fibonacci.py # Fibonacci retracement + golden pocket
│ └── analysis/
│ ├── position_sizer.py # Risk-based + ATR-based sizing
│ └── trade_stats.py # KPI calculator (60+ metrics)
└── tests/
Data Sources
- Stock data: Yahoo Finance (free, no API key required)
- Options data: Yahoo Finance options chains
- Optional daily bars: Public.com via
FINTOOLS_DATA_SOURCE=public+PUBLIC_SECRET_KEY - Cache: enabled by default at
~/.cache/fintools-mcp - No API keys needed for basic functionality.
Cache controls:
FINTOOLS_CACHE_ENABLED=0 # disable cache
FINTOOLS_CACHE_DIR=/path/to/cache # override cache location
FINTOOLS_DAILY_CACHE_TTL_SECONDS=900 # default daily-bar TTL
FINTOOLS_INTRADAY_CACHE_TTL_SECONDS=60 # default intraday-bar TTL
FINTOOLS_QUOTE_CACHE_TTL_SECONDS=15 # default quote TTL
For live options marks and execution-quality chains, use your broker's own data or MCP integration instead of yfinance-backed option tools.
Development
git clone https://github.com/slimbiggins007/fintools-mcp.git
cd fintools-mcp
uv sync
uv run python -m fintools_mcp # starts the MCP server
Run tests:
uv run pytest
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fintools_mcp-0.5.0.tar.gz.
File metadata
- Download URL: fintools_mcp-0.5.0.tar.gz
- Upload date:
- Size: 171.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abf80ac1fbe838d0ecc556528b5d9561fbb031e119955f0c39b95cfcc7404f51
|
|
| MD5 |
e2670fb2d7e913ed879d4ae700ca7530
|
|
| BLAKE2b-256 |
e625815b70794ac12b32af7b8451ee17f9b5414a17790d05ece453530f41c3e1
|
File details
Details for the file fintools_mcp-0.5.0-py3-none-any.whl.
File metadata
- Download URL: fintools_mcp-0.5.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97b645fa5553e49c027053baada33c546da7450c23d79341eabc15ea92ce2d25
|
|
| MD5 |
12ff33db0c914fa55c26ffab9f6638fa
|
|
| BLAKE2b-256 |
44a3f8babe51a3b5bed15290ce44ea75a954584ea8ade88bbd1579adc41ca37c
|