XGR MCP Gateway
AI-native access layer for XGRChain and XDaLa, including evidence inspection, workflow discovery, validation and secure human-in-the-loop handoffs.
Table of contents
Abstract
The XGR MCP Gateway is the AI-native access layer to the XGR stack. It exposes live XGRChain state, indexed Explorer evidence, XDaLa sessions, XRC-137 rules, XRC-729 orchestrations, schemas, authoring knowledge and validated handoffs as semantic Model Context Protocol tools.
MCP-compatible agents can inspect deployed workflows, resolve start authority, analyse sessions and transactions, validate process artifacts, render process diagrams and prepare user-controlled Workbench handoffs.
1. Purpose
The gateway provides an agent-facing interface for discovery, reading, reasoning, authoring, validation and handoff preparation. It does not alter XGRChain consensus, transaction formats, token economics or XDaLa execution semantics.
Its purpose is to make XGRChain and XDaLa usable by AI agents without weakening user-controlled signing, custody or final authorization.
2. Position in the XGR architecture
The gateway operates alongside XGRChain, XDaLa, Explorer and xDaLa Workbench.
| Surface | Role |
|---|---|
| XGRChain | Execution infrastructure, network state, contracts, transactions and finality. |
| XDaLa | Validation, orchestration and deterministic process execution. |
| Explorer | Indexed transaction, session, receipt and XRC evidence. |
| Workbench | Human review, transaction construction, wallet connection and local signing. |
| MCP Gateway | Agent-facing discovery, inspection, validation, reasoning and handoff preparation. |
3. Networks and public endpoints
XGRChain mainnet uses chain ID 1643 (0x66b). Official network metadata is available through get_xgr_network_info.
Mainnet
Production chain state, deployed contracts, sessions and evidence.
RPC: https://rpc.xgr.network Explorer: https://explorer.xgr.network MCP: https://mcp.xgr.network/mcp
Testnet
Development, validation and controlled workflow testing.
RPC: https://rpc1.testnet.xgr.network Explorer: https://explorer.testnet.xgr.network MCP: https://mcp.testnet.xgr.network/mcp Faucet: https://faucet.xgr.network
4. Example MCP client configuration
{
"mcpServers": {
"xgr-mainnet": {
"type": "http",
"url": "https://mcp.xgr.network/mcp"
},
"xgr-testnet": {
"type": "http",
"url": "https://mcp.testnet.xgr.network/mcp"
}
}
}
The hosted gateways use stateless Streamable HTTP requests through POST /mcp.
5. Tool domains
The gateway groups tools by semantic domain instead of exposing only raw RPC mirrors.
- Network and chain: official network metadata, live chain status, blocks and account state.
- XGR protocol: core addresses, circulating supply and XDaLa rule gas estimation.
- Transactions: transaction evidence, indexed search, transfers, account history, block transactions and statistics.
- Session evidence: live session status, timelines, receipts, payloads and execution evidence.
- Session analytics: owners, sessions, timeseries, step statistics and payload statistics.
- Wake-up discovery: waiting targets and required wake-up payload fields.
- XRC: XRC-137/XRC-729 inspection, runtime JSON, process graphs, events, usage, reuse and failure analytics.
- Authority: owner, executor and wildcard-executor workflow start discovery.
- Knowledge and validation: standards, docs, schemas, examples, authoring rules and artifact validators.
- Diagram: Mermaid rendering for runtime processes, bundles and stored bundle handoffs.
- Operations and handoffs: generic operations, bundle deployment and session start.
6. Workflow discovery and operation
An agent can discover deployed XRC-729 workflows that an address may start as contract owner, listed executor or wildcard executor. It can inspect the OSTC structure, resolve the likely entry step, read the linked XRC-137 rule and derive required and optional payload fields.
Relevant tools include get_xrc729_authority, find_startable_xdala_workflows, list_xrc729_contracts_by_executor, resolve_xrc729_process_graph, read_xrc729_ostc_json and read_xrc137_rule_json.
Waiting sessions can be inspected through wake-up target and payload-schema tools. Encrypted rule bodies are not decrypted by the gateway.
7. Agent-assisted workflow creation
- The user describes the intended XDaLa process.
- The agent loads XDaLa authoring rules, XRC references, schemas and examples.
- The agent drafts XRC-137 rules and an XRC-729 orchestration or a complete
xgr-multi-bundle@1. - The gateway validates rule expressions, XRC-137 authoring, cross-step payload flow and the final MultiBundle.
- The gateway creates a bundle-deploy handoff and returns an environment-specific Workbench URL.
- The user reviews and signs locally.
- A deployed workflow can later be prepared as a canonical
xgr-session-start@1handoff.
Session Start uses sessions[].orchestration, sessions[].ostcId, sessions[].stepId, sessions[].payload and sessions[].maxTotalGas. The gateway must not guess unresolved business payload values.
8. Results and structured output
Tools return standard MCP text content. When the text contains valid JSON, the gateway additionally exposes the parsed result through structuredContent.
Tool registrations include MCP annotations describing whether a tool is read-only, destructive, idempotent or open-world. This helps clients choose tools and present approvals correctly.
Bundle and Session Start handoffs expose normalized status, validation, audit events and terminal results. Contract owner and executor roles describe start authority; actual session ownership is taken from the completed Session Start result.
9. Security boundary
The MCP Gateway is deliberately non-custodial. It does not receive private keys, seed phrases or signing material and does not sign transactions.
- Write intent is stored only as a temporary offchain handoff.
- Bundle deployment and Session Start are separate canonical handoff families.
- Final review, wallet connection and signing remain with the user.
- Public handoff routes validate handles, methods, content types and result schemas.
- Configurable origin controls, request-size limits, rate limits and audit logs protect public handoff endpoints.
- List tools do not return bearer execution secrets.
Returned handoff URLs are temporary bearer URLs and should not be published.
10. Typical queries
Live data and evidence
- What is the current XGRChain status?
- Give me the official XGR mainnet and testnet endpoints.
- What happened in this transaction?
- Find the latest XDaLa session and explain its final payload.
- Show waiting steps that this address may wake.
Workflows and authoring
- Which deployed workflows may this address start?
- Show the required start payload for this XRC-729 workflow.
- Create and validate an XGR MultiBundle for this process.
- Render the process as Mermaid.
- Prepare a testnet bundle-deploy or Session Start handoff.
11. Relationship to whitepapers and references
This technical note complements the XGR Chain Technical Whitepaper. It does not modify the chain-level protocol baseline and does not belong to the MiCAR token disclosure. MCP is an agent-facing access and preparation layer.