gold-mcp
Provides real-time PAXG (gold-backed token) price data via Binance public WebSocket, tracking XAU/USD within 0.1-0.3%.
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., "@gold-mcp what's the current gold price?"
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.
gold-mcp
An MCP server that brings public gold (XAUUSD) market data into Claude, ChatGPT, Cursor, Windsurf, Cline, Zed, and any other Model Context Protocol client.
Free tier (13 tools + optional 8-tool MT5 BYOK adapter) is fully functional and stays free forever. Pro, Premium, and Ultra tiers add advanced TA, backtest, SMC suite, risk management, and AI analyst via an offline Ed25519 license key — no SaaS, no phone-home.
Educational and research use only — not financial advice.
Tiers
Tier | Tools | License | Suggested price |
Free | 13 (+8 optional MT5 BYOK) | None | $0 |
Pro | +7 (20 total) |
| $9-19/mo |
Premium | +4 (24 total) |
| $29-49/mo |
Ultra | +18 (42 total, 50 with MT5 BYOK) |
| $99-149/mo |
Free — public gold data + realtime PAXG + MT5 BYOK (13 + 8 tools)
Public gold data (Yahoo Finance):
get_gold_price— latest gold close + 24h changeget_gold_ohlcv— historical bars (1m → 1mo)get_macro_context— DXY, US10Y/02Y, SPX, VIX, BTC, silver, oilget_gold_correlations— gold-vs-macro correlation matrixget_gold_seasonality— day-of-week / monthly return statsget_vn_macro— USD/VND + implied world-parity gold price in VNDestimate_vn_gold_premium— compare local VN quote to world paritygold_market_snapshot— one-call aggregator + bulleted summarydiagnostic— show license tier + available toolscache_purge— sweep expired cache entries
Realtime PAXG via Binance public WebSocket (NEW v4.1, no API key):
paxg_worker_status— WS worker health + tick countget_paxg_tick— last PAXG tick (tracks XAU/USD within 0.1-0.3%)get_paxg_ohlcv_realtime— aggregated PAXG bars from local tick log
MT5 BYOK adapter (NEW v4.1, optional via pip install 'gold-mcp[mt5]', Windows):
mt5_attach/mt5_detach/mt5_status— manage attached terminalmt5_find_symbol— broker-specific XAUUSD symbol resolutionmt5_get_tick/mt5_get_ohlcv/mt5_get_ticks— read from your terminalmt5_account_info— balance / equity / leverageNo credentials cross the server. You run your own MT5 terminal.
Pro — advanced TA + multi-timeframe + alerts
analyze_gold_advanced— Bollinger + Ichimoku + Fibonaccimulti_timeframe_snapshot— 5m / 1h / 4h / 1d in one callgold_correlation_regime— detects DXY decoupling, etc.get_gold_setups— multi-indicator confluence scannercreate_gold_alert/list_gold_alerts/delete_gold_alert
Premium — backtest + research
backtest_gold_strategy— 4 strategies, vectorizedgold_walk_forward— rolling out-of-sample validationoptimize_gold_strategy— grid search by Sharpe / PF / returngold_intraday_seasonality— hourly / session bucketing
Ultra — institutional analyst toolkit (18 exclusive tools)
Smart Money Concepts (SMC)
smc_full_scan— composite SMC bias (structure + OB + FVG + sweeps)detect_order_blocks— bullish/bearish OB with impulse ATR filteringdetect_fair_value_gaps— 3-candle imbalances + fill trackingdetect_liquidity_sweeps— stop-hunt detection (breach + reverse)detect_market_structure— CHOCH/BOS labeling on swing fractals
Regime + Multi-Timeframe
classify_regime— composite Hurst exponent + Lo-MacKinlay variance ratiomtf_alignment— D1/H4/H1 confluence with alignment score 0-100
Position sizing + risk
kelly_fraction— half-Kelly default for safetyfixed_fractional_size— classic R% sizingoptimal_f— Ralph Vince geometric-mean-maximizing frisk_of_ruin— Monte Carlo ruin probability
Monte Carlo + VaR
monte_carlo_paths— bootstrap or parametric path simulationvalue_at_risk— historical VaR + Conditional VaRprob_hit_target_or_stop— MC trade probability with EV in R-multiples
AI Analyst (BYOK Anthropic)
ai_daily_briefing— structured JSON read from Claude Sonnet 4.6ai_setup_explanation— cheaper Haiku 4.5 plain-English read
Report generation
generate_html_tearsheet— polished standalone HTML reportgenerate_markdown_briefing— portable Markdown daily summary
Related MCP server: tradingview-mcp
Quickstart
1. Install
git clone https://github.com/ThaiTrevor/gold-mcp.git
cd gold-mcp
pip install -e .Python 3.10+. No other setup, no env vars, no data files.
2. Wire it into your MCP client
Claude Desktop
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"]
}
}
}Restart Claude Desktop. The tools appear under the plug icon.
Claude Code (CLI)
claude mcp add --scope user gold-mcp -- python -m gold_mcp.serverCursor / Windsurf / Cline / Continue / Zed
~/.cursor/mcp.json (or the equivalent file for your client):
{
"mcpServers": {
"gold-mcp": {
"command": "python",
"args": ["-m", "gold_mcp.server"]
}
}
}ChatGPT Desktop / Agent mode
Settings → Connectors → Add MCP server:
Command: python
Args: -m gold_mcp.server3. Try it
Ask the model in plain English. Examples:
"What is gold doing right now and how does it compare to today's macro tape (DXY, yields, VIX)?"
"Show me the last 24 hourly bars of gold and the 60-day correlation with silver and DXY."
"Give me a market snapshot for gold — combine price, macro context, correlations, and the day-of-week seasonality."
"USD/VND right now and the implied world-parity gold price in VND per tael. If SJC is quoting 145 million, what's the premium?"
Why this exists
LLMs reason well about gold but they don't see live market data, the macro tape that moves gold, or a clean correlation matrix on demand. This server is a tiny, free bridge between an MCP client and the public Yahoo Finance data that any researcher already has access to — exposed as well-typed tools so the model picks the right one automatically.
It started as a study project to learn MCP architecture and turned into something useful enough to publish for the community.
Upgrading to Pro / Premium
Add GOLD_MCP_LICENSE_KEY to the env block of your MCP config:
"env": {
"GOLD_MCP_LICENSE_KEY": "eyJ0aWVy...Ijoi.MEUCI..."
}Restart your MCP client. Call diagnostic — tier_active should
report pro or premium. New tools become available immediately.
See examples/claude_desktop_config_pro.json for the full template.
Architecture
gold_mcp/
server.py FastMCP wiring with 3-tier gating (21 tools max)
gold_data.py yfinance price + OHLCV
macro_data.py DXY/yields/SPX/VIX/BTC + correlations
analytics.py seasonality
analyst.py one-call aggregator (gold_market_snapshot)
cache.py TTL filesystem cache (60s → 24h)
license.py Ed25519 offline license verification
issue_license.py CLI: init-keys, issue, verify
pro_tools.py Pro tier: advanced TA, alerts, multi-timeframe
premium_tools.py Premium tier: backtest, walk-forward, optimizer
adapters/
vn_macro.py USD/VND + world-parity goldFor vendors selling licenses, see the CLI:
python -m gold_mcp.issue_license init-keys
# Paste printed PUBLIC_KEY_B64 into gold_mcp/license.py
python -m gold_mcp.issue_license issue --tier pro --email u@x.com --days 30Or run the Lemon Squeezy webhook handler (port from
mcp-byok-template —
swap the env-var name from MCP_BYOK_LICENSE_KEY to GOLD_MCP_LICENSE_KEY).
Contributing
This project is small on purpose. We welcome contributions that fit the same pattern:
Small, focused tools that wrap one public data source
Return structured JSON with named keys + a short interpretation field
No private data, no scraped credentials, no broker-specific paths
No tools that produce trading recommendations
See CONTRIBUTING.md for details and SECURITY.md for how to report security issues.
Testing
pip install -e ".[dev]"
pytestCI runs the suite on Linux, macOS, and Windows across Python 3.10/3.11/3.12 on every push and pull request.
Disclaimer
gold-mcp is a data and analysis tool for educational and research
purposes only. Nothing returned by any tool constitutes investment
advice, a recommendation, or a solicitation. Markets carry risk; you
are responsible for your own decisions.
License
MIT — see LICENSE.
Available Tools
13 toolscache_purgeB
Sweep expired entries from the on-disk cache.
Inputs: no named parameters.
diagnosticA
Show server license tier and available tools.
Inputs: no named parameters.
get_gold_correlationsC
Correlation of gold daily returns vs the macro basket.
Inputs: lookback_days.
get_gold_ohlcvA
Historical OHLCV bars for gold from Yahoo Finance.
Args: timeframe: One of "1m", "5m", "15m", "30m", "1h", "4h", "1d", "1wk", "1mo". lookback: Number of most recent bars to return.
Inputs: lookback, timeframe.
get_gold_priceA
Latest gold (XAUUSD / GC=F) price and 24h change from Yahoo Finance.
Inputs: no named parameters.
get_gold_seasonalityB
Historical seasonality stats for gold returns.
Args: group_by: "dow" (day of week) or "month". lookback_years: Years of history to include.
Inputs: group_by, lookback_years.
get_macro_contextB
Macro snapshot relevant to gold: DXY, US10Y/02Y, SPX, VIX, BTC, silver, oil.
Inputs: no named parameters.
get_paxg_ohlcv_realtimeA
Build OHLCV bars from PAXG tick stream on the fly.
Args: seconds_per_bar: Bar size in seconds (1-300). 10 = 10-second bars. lookback_bars: How many most-recent bars to return (1-500).
Inputs: lookback_bars, seconds_per_bar.
get_paxg_tickB
Most recent PAXG trade — free real-time gold proxy via Binance.
Inputs: no named parameters.
get_vn_macroB
USD/VND + cross rates + implied world-parity gold price in VND.
Inputs: no named parameters.
gold_market_snapshotC
One-call structured snapshot of gold's current market state.
Inputs: timeframe.
paxg_worker_statusA
Health of the local PAXG tick-capture worker.
Returns alive=true if the last tick is fresher than 30 seconds.
If alive=false with reason=db_missing or no_heartbeat, start the
worker: python -m gold_mcp.realtime.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct data type or action: spot price, OHLCV, macro snapshot, correlations, seasonality, VND, premium estimation, composite snapshot, cache management, worker health, and PAXG real-time. No two tools serve the same purpose.
Most tools use a 'get_' prefix (get_gold_price, get_gold_ohlcv, get_macro_context, etc.), but there are exceptions like 'diagnostic', 'gold_market_snapshot', 'cache_purge', and 'paxg_worker_status' that break the pattern, with 'cache_purge' using a reversed verb-noun structure.
13 tools cover the domain of gold market data, macro context, VN-specific analysis, PAXG real-time, and system administration, each with a distinct purpose. This is a well-scoped set within the recommended 3-15 range.
The server covers core gold data (price, OHLCV), analysis (correlations, seasonality), macro context, VN premium calculations, and real-time PAXG proxy, making it fairly comprehensive. Minor gaps include lack of multi-currency support or historical real-time data, but these are not critical for the stated purpose.
Maintenance
Related MCP Connectors
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
Research-only MCP server: your AI as a quant research desk. 90 tools, no trades, no brokers.
> TradingMCP puts a market analyst inside your AI assistant. Paste one URL into Claude, ChatGPT, Cursor, VS Code or any MCP client and ask in plain language: screen for breakouts, run a multi-timeframe analysis, backtest a strategy with walk-forward validation, scan for smart-money and volume signals, or get a one-prompt morning market brief. In clients that support MCP Apps, price charts and the Markets panel are drawn right in the chat. > 40+ tools covering crypto (real-time), stocks, ETFs, FX, futures and commodities across major global exchanges. > Hosted, nothing to install: Pro $9/month (2,500 tool calls) or Pro+ $29/month (10,000). Paid upfront with a 14-day money-back guarantee; your API key arrives right after checkout. > Built on the open-source tradingview-mcp core (MIT, ~5k GitHub stars): self-host it free, or use the hosted version with zero ops. > For research and education, not financial advice. Not affiliated with TradingView
Official Intrinio MCP server. US stock prices, options and fundamentals for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceFree MCP server for real-time cryptocurrency data. Get token prices, market overview, top movers, historical charts, and detailed token info directly in Claude Code, Cursor, or any MCP-compatible AI tool. Powered by CoinGecko with 70+ token mappings and built-in caching.5MIT
- AlicenseNot gradedqualityDmaintenanceThe most complete AI-powered trading toolkit for Claude and MCP clients, offering backtesting, live sentiment, Yahoo Finance, and 30+ technical analysis tools in one MCP server.MIT
- FlicenseAqualityDmaintenanceA local MCP server that gives Claude and other MCP clients access to Federal Reserve Economic Data (FRED) — 800,000+ economic time series covering GDP, inflation, employment, interest rates, and more.32-
- AlicenseBqualityDmaintenanceMCP server that exposes QuantXData's institutional crypto market data APIs to AI assistants, enabling natural language queries for trades, order books, OHLCV, options, and more across 120+ exchanges.12MIT