Trading Analysis MCP
An MCP server that gives Claude the ability to analyze trading setups across IDX, Forex, and Crypto markets without executing trades.
README
Trading Analysis MCP
An MCP (Model Context Protocol) server that gives Claude the ability to analyze trading setups across IDX (Indonesian stocks), Forex, and Crypto markets — without executing any trades.
Claude acts as your analyst: fetching live market data, calculating technical indicators, detecting market structure, and scoring setups by confluence. You make the final call.
What Claude can do with this MCP
| Prompt example | Tool used |
|---|---|
| "Analyze BBCA.JK on the daily chart" | analyze_symbol |
| "What's the multi-timeframe bias for EURUSD?" | get_multi_timeframe_analysis |
| "Scan EURUSD, GBPUSD, USDJPY — find the best setup" | scan_setups |
| "Calculate RR: entry 1.1000, SL 1.0950, TP 1.1200" | calculate_rr |
| "What trading session is active right now?" | get_market_session |
Each analysis includes: EMA stack, RSI, MACD, Bollinger Bands, ATR, Support/Resistance, BOS/CHoCH, Order Blocks, Fair Value Gaps, and a confluence score (0–8).
Requirements
- Python 3.10+
- Claude Desktop (for local MCP)
- Internet connection (for live market data)
Quick Start
1. Clone the repo
git clone https://github.com/YOUR_USERNAME/trading-mcp.git
cd trading-mcp
2. Install dependencies
pip install -r requirements.txt
3. Configure Claude Desktop
Find your Claude Desktop config file:
| OS | Path |
|---|---|
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
Add this entry (replace the path with your actual clone location):
Windows:
{
"mcpServers": {
"trading-analysis": {
"command": "python",
"args": ["C:/path/to/trading-mcp/server.py"]
}
}
}
macOS / Linux:
{
"mcpServers": {
"trading-analysis": {
"command": "python3",
"args": ["/path/to/trading-mcp/server.py"]
}
}
}
4. Restart Claude Desktop
The tools are now available. Try asking Claude:
"Scan EURUSD, GBPUSD, USDJPY for the best setup today"
Available MCP Tools
analyze_symbol
Full technical + structure analysis for a single symbol.
Parameters:
symbol — e.g. BBCA.JK, EURUSD, BTC/USDT, XAUUSD
timeframe — 1m / 5m / 15m / 30m / 1h / 4h / 1d / 1w (default: 1d)
limit — number of bars to load (default: 250)
Output includes: market structure, EMA stack, RSI, MACD, Bollinger Bands, ATR, volume ratio, key S/R levels, active Order Blocks, open Fair Value Gaps, and confluence score.
get_multi_timeframe_analysis
Top-down analysis across multiple timeframes to confirm bias before entry.
Parameters:
symbol — e.g. EURUSD
timeframes — comma-separated, large to small (default: "1d,4h,1h")
Output includes per-timeframe summary + HTF vs LTF synthesis.
scan_setups
Scan a watchlist and rank symbols by confluence score.
Parameters:
symbols — comma-separated, e.g. "BBCA.JK,TLKM.JK,BMRI.JK"
timeframe — timeframe to scan (default: 1d)
Output: ranked table (score, structure, bias, RSI) + detailed breakdown of top 3.
calculate_rr
Risk/Reward calculator with trade direction validation.
Parameters:
entry — entry price
stop_loss — stop loss price
take_profit — take profit price
risk_amount — (optional) capital at risk in USD/IDR for profit projection
get_market_session
Current trading session info and which instruments to focus on.
Output: active sessions (Asian/London/NY/IDX), overlap status, recommended pairs.
Supported Symbols
| Market | Format | Examples |
|---|---|---|
| IDX (Indonesian stocks) | TICKER.JK |
BBCA.JK, TLKM.JK, BMRI.JK |
| Forex | PAIR or BASE/QUOTE |
EURUSD, XAUUSD, GBP/USD |
| Crypto | BASE/QUOTE |
BTC/USDT, ETH/USDT, SOL/USDT |
Auto-detection: just type the symbol in any format — the server detects the market automatically.
Data Sources
| Market | Primary | Fallback |
|---|---|---|
| IDX | yfinance | — |
| Forex | yfinance | — |
| Crypto | Bybit → OKX → KuCoin → Gate.io | yfinance (BTC-USD) |
No API keys required for basic usage. All data is read-only.
Analysis Concepts
This server implements SMC (Smart Money Concepts) / ICT principles algorithmically:
- Swing High/Low — pivot detection with configurable lookback
- BOS (Break of Structure) — trend continuation confirmation
- CHoCH (Change of Character) — trend reversal signal
- Order Blocks — institutional supply/demand zones
- Fair Value Gaps — price imbalances that tend to get filled
Combined with classic technical indicators (EMA stack, RSI, MACD, Bollinger Bands, ATR) to produce a confluence score (0–8).
Architecture
Claude Desktop
│
└─ MCP (stdio)
│
└─ Trading Analysis MCP Server
├── DataFetcher
│ ├── yfinance → IDX + Forex (+ crypto fallback)
│ └── ccxt → Crypto (Bybit, OKX, KuCoin, Gate.io)
│
├── TechnicalEngine (pandas-ta)
│ └── EMA 8/21/50/200 · RSI · MACD · BB · ATR · Volume
│
└── StructureEngine (SMC/ICT)
└── Swings · S/R · BOS/CHoCH · Order Blocks · FVG
Running Tests
python -m tests.test_fetcher
python -m tests.test_technical
python -m tests.test_structure
python -m tests.test_mcp_tools
License
MIT — free to use, modify, and share.
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.