gold-mcp

MIT · 13 free tools · Pro $9 / Premium $29 / Ultra $99

Gold market data + trading toolkit,
inside your AI assistant.

MCP server for XAUUSD. Free tier: 13 tools incl. realtime PAXG tick stream (Binance public WS) + MT5 BYOK adapter. Paid tiers unlock Bollinger/Ichimoku/Fibonacci, vectorized backtest + walk-forward, SMC suite, regime classifier, Kelly sizing, Monte Carlo risk, and a BYOK Claude analyst chain.

Educational and research use only · not financial advice

No setup

No broker account, no tick stream, no environment variables, no local data files. Clone, pip install, restart your client. Done.

Cross-vendor

Works the same on Claude Desktop, Claude Code, ChatGPT Desktop, Cursor, Windsurf, Cline, Continue, and Zed. One config snippet per client.

Small & readable

About 600 lines of Python in five files. Read it end-to-end in 15 minutes. A clean example of what an MCP server can look like.

50 tools across 4 tiers, all public-safe

Tools wrap public data sources (Yahoo, Binance WS, BYOK MT5) (and a little computation) into a structured JSON response the LLM can read.

Price & bars

  • get_gold_price — latest gold close + 24h change
  • get_gold_ohlcv — historical bars (1m, 5m, 15m, 30m, 1h, 4h, 1d, 1wk, 1mo)

Macro context

  • get_macro_context — DXY, US10Y/02Y, SPX, VIX, BTC, silver, oil
  • get_gold_correlations — gold-vs-macro correlation matrix
  • get_gold_seasonality — day-of-week / monthly stats

Vietnam community contribution

  • get_vn_macro — USD/VND + implied world-parity gold (VND)
  • estimate_vn_gold_premium — compare a local quote to world parity

One-call aggregator

  • gold_market_snapshot — combines all of the above into a single structured read with a concise bulleted summary

Realtime PAXG tick (v4.1, free)

  • paxg_worker_status — health of local Binance WS worker
  • get_paxg_tick — most recent PAXG trade, free gold proxy (tracks XAU within ~0.1-0.3%)
  • get_paxg_ohlcv_realtime — build N-second OHLCV bars on the fly from tick stream

MT5 broker adapter — BYOK, free (v4.1, Windows)

  • mt5_attach / mt5_detach / mt5_status — lifecycle
  • mt5_find_symbol — resolve broker XAUUSD variants (XAUUSD.r, GOLD#, etc.)
  • mt5_get_tick / mt5_get_ohlcv / mt5_get_ticks — broker-grade data
  • mt5_account_info — balance / equity / margin (read-only)

User runs own MT5 terminal locally. No credentials cross the server. Install: pip install "gold-mcp[mt5]"

Pro tier — advanced TA & alerts

  • analyze_gold_advanced — Bollinger + Ichimoku + Fibonacci
  • multi_timeframe_snapshot — 5m / 1h / 4h / 1d in one call
  • gold_correlation_regime — detects DXY decoupling, etc.
  • get_gold_setups — multi-indicator confluence scanner
  • create_gold_alert / list_gold_alerts / delete_gold_alert

Premium tier — backtest & research

  • backtest_gold_strategy — 4 strategies, vectorized
  • gold_walk_forward — rolling out-of-sample validation
  • optimize_gold_strategy — grid search by Sharpe
  • gold_intraday_seasonality — hourly / session stats

Ultra tier — institutional analyst toolkit (18 tools)

  • smc_full_scan — composite SMC bias
  • detect_order_blocks / detect_fair_value_gaps
  • detect_liquidity_sweeps / detect_market_structure
  • classify_regime — Hurst + Lo-MacKinlay VR
  • mtf_alignment — D1/H4/H1 confluence scoring
  • kelly_fraction / fixed_fractional_size / optimal_f
  • risk_of_ruin — Monte Carlo ruin probability
  • monte_carlo_paths — bootstrap path simulation
  • value_at_risk — VaR + CVaR (Expected Shortfall)
  • prob_hit_target_or_stop — MC trade probability
  • ai_daily_briefing — BYOK Claude analyst chain
  • ai_setup_explanation — cheaper Haiku read
  • generate_html_tearsheet — auto weekly report
  • generate_markdown_briefing — portable summary

Pricing

Free tier is real and useful — 13 tools (incl. realtime PAXG + MT5 BYOK), no limits. Pro / Premium / Ultra unlock through a single env var (GOLD_MCP_LICENSE_KEY) with offline Ed25519 verification — no SaaS, no phone-home, no user accounts.

Free

$0 / forever

Real tooling for gold research. No upgrade pressure.

  • 13 MCP tools (incl. realtime PAXG)
  • Price, OHLCV, macro, correlations, seasonality
  • VN gold parity + premium estimator
  • One-call market snapshot
  • TTL filesystem cache
Install Free

Premium

$29 / month

Quant research toolkit for strategy development.

  • Everything in Pro
  • + Vectorized backtest (4 strategies)
  • + Walk-forward validation
  • + Grid optimizer (Sharpe / PF / return)
  • + Intraday seasonality (hourly / session)
Buy Premium

Annual plans available (2 months free). 30-day money-back guarantee. Free tier remains free forever, MIT-licensed.

Install in 30 seconds

Pick your client. Paste the snippet. Restart. Ask your model anything about gold.

pip install gold-mcp

claude mcp add --scope user gold-mcp -- python -m gold_mcp.server

Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "gold-mcp": {
      "command": "python",
      "args": ["-m", "gold_mcp.server"]
    }
  }
}

Cursor: ~/.cursor/mcp.json · Windsurf: ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "gold-mcp": {
      "command": "python",
      "args": ["-m", "gold_mcp.server"]
    }
  }
}

Settings → Connectors → Add MCP server.

Command: python
Args:    -m gold_mcp.server

Full README on GitHub. Python 3.10+. MIT license.

Ask in plain English

“What is gold doing right now and how does the macro tape look?”

model Pulls the latest gold price, the DXY / yields / VIX snapshot, and reports both in one read.

“What's gold's 60-day correlation with silver and DXY?”

model Calls get_gold_correlations and tells you which cross-asset is the cleanest read.

“Day-of-week seasonality on gold over 5 years?”

model Calls get_gold_seasonality and surfaces the mean return and win rate per weekday.

“USD/VND now plus the implied world-parity gold in VND.”

model Calls get_vn_macro, returns the cross rates and the per-tael parity figure you can compare against SJC.

Built by and for the community

gold-mcp is small on purpose. PRs that add similar small, public-data tools are very welcome. We do not accept tools that need paid API keys, scraped private data, or that function as financial advice.