MCP integration
Connect AI tools to gold market data · Proposed integration
Draft reference · Examples use sample data.
MCP for gold market data
Model Context Protocol (MCP) would let an AI application discover and call xauapi’s read-only market-data tools. The proposed integration covers quotes, candles and feed status for JustMarkets XAUUSD.
No MCP server is deployed. The URL, tools and authentication below describe a proposed contract. Demo keys cannot connect, and no AI client has been verified.
One-click setup prompts
Set up with your AI
Copy a complete prompt, then paste it into a new chat.
Includes setup context, proposed tools and safe credential handling. Copying does not connect a server or include your API key.
View full prompt
Connection setup
- Use an MCP client that supports remote Streamable HTTP servers and the required authentication.
- When available, add the published MCP endpoint and configure your API key through the client’s secure credential settings.
- Discover the available tools and start with
get_feed_statusbefore requesting prices.
The profile below is illustrative, not a universal client configuration file. Map these fields to your client’s settings. Replace the placeholders only when the service is available; never paste real keys into a chat.
{
"name": "xauapi",
"transport": "streamable-http",
"url": "https://MCP_BASE_URL/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}Proposed tools
| Tool | Arguments | Returns |
|---|---|---|
get_quote | feed: justmarkets | Bid, Ask, spread, source timestamp and freshness. |
get_candles | feed: justmarkets; interval: M1 | M5 | M15 | Broker OHLC candles, with timestamps and Bid price basis. |
get_feed_status | feed: justmarkets | Connection and stale-data indicators. |
All three tools are read-only. No order placement, account changes or billing actions are exposed. Additional brokers, historical range filters and candle pagination are not specified.
Example tool call
{
"name": "get_quote",
"arguments": {
"feed": "justmarkets"
}
}{
"demo": true,
"feed": "justmarkets",
"symbol": "XAUUSD",
"timestamp": "2026-10-06T08:30:00Z",
"sampled": true,
"bid": 2650.4,
"ask": 2650.6,
"spread": 0.2,
"stale": false
}This is the proposed data payload, not a complete MCP protocol exchange. A client handles protocol negotiation and the tool-result envelope.
Example prompts
- “Check the JustMarkets gold feed status and report whether the data is stale.”
- “Show the latest XAUUSD Bid, Ask and spread, including the source timestamp.”
- “Summarize the available M5 gold candles and identify any gaps.”
These prompts do not run on this site. An assistant should state the source and timestamp, preserve stale-data warnings and explain that sampled data can miss intermediate ticks.
Access, limits & errors
The proposed design reuses the API key’s read-only access. Successful market-data tool calls are intended to share your plan’s allowance: Pro includes 12 million annual requests and 250 requests/minute; Max includes 240 million annual requests and 300 requests/minute. Protocol discovery accounting and client authentication compatibility are not finalized.
Invalid credentials, quota limits and stale feeds must produce actionable errors rather than fabricated prices. No background polling or automatic connection is enabled here.
Protocol references: Streamable HTTP · MCP tools. These describe MCP; they do not establish xauapi support.