
Gold Mcp
io.github.ThaiTrevor由 GitHub 帳號 ThaiTrevor 發布v4.1.2更新於 Oct 24, 2026
MCP server for XAUUSD gold market data + 4-tier trading toolkit (TA, backtest, SMC, risk).
概覽
本機 MCP 伺服器,讓助理取得公開的 XAUUSD 黃金行情、總體經濟背景,以及分級的交易分析工具組。
- 可以做什麼
- 取得黃金價格、OHLCV K 線、總經背景(DXY、美債殖利率、SPX、VIX、BTC、白銀、原油)、相關性與季節性,並一次彙整出市場快照
- 透過本機 Binance WebSocket 工作程序讀取即時 PAXG 報價與彙整 K 線,並查看工作程序狀態
- 可選擇連接本機 MT5 終端,讀取報價、K 線、商品資訊與帳戶餘額/淨值
- 執行進階技術分析、多週期快照、共振型態掃描與價格警示(Pro)
- 回測、滾動前推驗證與策略參數最佳化,並依小時/交易時段統計日內季節性(Premium)
- 掃描聰明錢概念、判定市場狀態、計算部位規模、執行蒙地卡羅與 VaR、產生 AI 簡報及 HTML/Markdown 報告(Ultra)
- 適用情境
- 適合希望助理根據即時公開行情與總經資料分析黃金、而非憑空推測的情況,也適合需要回測、風險部位計算與報告產出的研究工作。免費方案已涵蓋基本價格、總經與相關性查詢。
- 執行需求
- 以 Python 套件形式在本機透過 stdio 執行(需 Python 3.10+),啟動指令為 python -m gold_mcp.server;免費方案不需環境變數。Pro/Premium/Ultra 工具需要 GOLD_MCP_LICENSE_KEY,AI 分析工具需要 ANTHROPIC_API_KEY。MT5 轉接器是 Windows 上的選用附加元件,需自備終端。需能連線 Yahoo Finance 與 Binance。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Gold Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
gold-mcp
[License: MIT] [Python 3.10+] [Version] [MCP] [CI] [PRs welcome]
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
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 / leverage- No 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
Quickstart
1. Install
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):
Restart Claude Desktop. The tools appear under the plug icon.
Claude Code (CLI)
Cursor / Windsurf / Cline / Continue / Zed
~/.cursor/mcp.json (or the equivalent file for your client):
ChatGPT Desktop / Agent mode
Settings → Connectors → Add MCP server:
3. 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:
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
For vendors selling licenses, see the CLI:
Or 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
CI 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.
來源:README.md,提交 f8a5ac9
工具
0版本歷史
1- v4.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分