xau-trader
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
xau-trader-agent
Agentic XAUUSD trading loop for MetaTrader 5 demo accounts, packaged as an MCP server plus a DeepSeek Harness skill.
The model does the reading - Asia range, sweep quality, multi-timeframe FU/SFU/AFU supply zones, bias, spread, news-free windows - and the code enforces the risk envelope: 0.5% per trade, 2% daily stop, 4% total stop, 5 trades a day, 1:5 RR, flat before swap. Everything that happens is written to a journal, and a 21:00 report is generated automatically.

What it does
piece | description |
MCP server | 19 tools: market data, Asia boxes, sweep state machine, zone stack, MTF bias, CVD proxy, TV-style PNG charts, manual drawings, one-tick decisions, journal and reports |
Agentic loop | one tick = analysis -> decision -> guarded execution -> state -> journal -> next wake time |
Skill |
|
Guards | demo-only whitelist, hard-blocked logins, dry-run by default, broker-side SL/TP on every entry |
Related MCP server: SMC-MCP
Quick start
git clone https://github.com/ArcadiaUZ/xau-trader-agent.git
cd xau-trader-agent
.\scripts\install.ps1 -DemoLogin 12345678 # creates .venv, installs deps, writes .env
.\scripts\install-skill.ps1 # ~/.dsh/skills/xau-trader
.\scripts\register-mcp.ps1 # adds the xau-trader MCP server to DSHRequirements: Windows, a running MetaTrader 5 terminal logged into a demo account, Python 3.10+ (3.12 tested), and DeepSeek Harness for the skill/loop integration.
Verify without trading:
.\venv\Scripts\python.exe tests\loop_test.py # decision matrix, dry-run only
.\venv\Scripts\python.exe tests\mcp_client_test.py # stdio handshake + xau_status
.\venv\Scripts\python.exe -m trader.loop --no-renderMCP tools
group | tools |
data / analysis |
|
charts |
|
drawings |
|
loop |
|
journal |
|
Risk rules (hard-coded, env-tunable)
rule | default |
risk per trade | 0.5% of balance |
daily loss stop | 2% |
total loss stop | 4% |
max trades per day | 5 |
RR | 1:5 |
entries | 11:00 - 20:30 (UTC+5) |
forced flat | 20:45 |
Safety model
guard()runs before every order: login must be whitelisted, account must beDEMO, and trade must be allowed by the broker.XAU_TRADER_BLOCKEDlogins (prop / real accounts) raise before anything is sent.live=false(default) turns the whole execution path into a dry run - the order request is built and logged, nothing is sent.Every entry carries a broker-side SL and TP, so an open position is protected even if the agent stops running.
Layout
trader/ python package (config, mt5_io, engine, zones, render, drawings,
journal, auto, loop, cycle, mcp_server)
skills/xau-trader/ the DeepSeek Harness skill + references
scripts/ install.ps1, install-skill.ps1, register-mcp.ps1
tests/ loop_test.py, dry_run_test.py, mcp_client_test.py
docs/ SETUP.md, ARCHITECTURE.md, images
examples/ cordis.patch.yml snippet for DSHDocs
docs/SETUP.md - installation, demo account, MCP registration, timers
docs/ARCHITECTURE.md - modules, data flow, decision state machine
skills/xau-trader/SKILL.md - the agent-facing workflow
Disclaimer
Educational tooling for demo accounts. Forex/gold trading carries substantial risk; past patterns (Asia sweep, supply zones) are not guarantees. The authors take no responsibility for losses, including on prop-firm accounts. Never point this code at an account you cannot afford to lose - the whitelist and blocked list exist for that reason.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Compliance-gated stablecoin settlement + x402 macro/ESG/climate intelligence for agents. 115 tools.
Web search, point-in-time crypto market data, verified strategy track records and 160+ agent tools.
Day Trade AI signals, analyses, journal and rule checks for your AI agent. Never places trades.
Agent MCP: 65 tools — 5-chain verification, risk, prediction & crypto trends, 17 web tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive access to the MetaTrader 5 trading platform for retrieving market data, managing accounts, and executing trading operations. It provides 32 specialized tools for interacting with MT5 functionalities, including historical OHLCV data access, real-time position monitoring, and automated order management.19 PyPI1MIT
- AlicenseAqualityCmaintenanceEnables AI agents to analyze price action using Smart Money Concepts (market structure, order blocks, fair value gaps, liquidity sweeps) for stocks, forex, gold, indices, and crypto without an API key.53MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to interact with a running MetaTrader 5 terminal, providing market data, account information, chart screenshots, and live order execution through a set of 20 tools.-
- AlicenseAqualityBmaintenanceProvides AI agents with a TradingView-centric toolkit for screener queries, historical FX data, pattern scanning, chart rendering, backtesting, Pine tooling, and optional account/desktop integration.6MIT