Trading Analysis MCP

Trading Analysis MCP

An MCP server that gives Claude the ability to analyze trading setups across IDX, Forex, and Crypto markets without executing trades.

Category
访问服务器

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选