XDC AI is agent-native commerce on the XDC Network. AI agents discover APIs in a curated marketplace and pay for them per call with USDC over the x402 protocol — from a non-custodial smart wallet, within an on-chain spending limit you control, and without ever holding gas.
OpenCode is an open-source agent for the terminal. Remote MCP servers go in its config file and sign in through OAuth.
This guide connects XDC AI MCP to OpenCode through MewCP, so OpenCode can use XDC AI MCP's 17 tools, like get_service_info, list_resources and inspect_resource, without your XDC AI MCP credentials ever reaching the app.
XDC AI MCP signs in through managed OAuth. MewCP stores the token encrypted, refreshes it before it expires and injects it only at call time. Your agent never holds it, so it can never leak it.
More apps
Access cryptocurrency market data, portfolios and trading operations on Binance. Monitor assets, retrieve market information and automate crypto trading workflows.
Coinfuty provides cryptocurrency market intelligence for tracking digital asset prices, analyzing market trends, monitoring trading activity, and researching crypto opportunities to support data-driven investment decisions.
Access prediction market data, market positions and trading activity on Polymarket. Monitor markets, retrieve information and interact with forecasting-based financial products.
Trade, check margins, and review orders, portfolio, and fundamentals on Upstox — without leaving your agent. Retrieve user profile and fund/margin balances, estimate pre-trade margin across multiple instruments, look up order books and historical trades, review portfolio positions and holdings, pull company fundamentals by ISIN, and report trade-wise profit and loss by segment and financial year.
Other clients
XDC AI MCP works the same way in every client below. Pick yours for its own guide.
Free to start.
Scope access to the exact XDC AI MCP tools and accounts you allow, work and personal side by side. Anything outside that scope is refused at call time, even when the model asks for it.
Each call is logged: what ran, on which account, and whether it worked. Failures come back structured, so the agent knows whether to retry instead of guessing.
Every app sits behind one secure MCP URL, and there is no server for you to deploy or keep running. Add an integration in the dashboard and it is live on the next call, with no config to change and no new credentials to wire up. Tools load only when a task needs them, so your agent stays fast and focused however many apps you connect.
Edit ~/.config/opencode/opencode.json, or opencode.json in your project root.
Start a new chat and ask: "List the tools you can use from MewCP." You should see your connected apps.
Service manifest for THIS x402 demo server (its built-in test endpoints) PLUS the full XDC AI marketplace catalog of paid APIs from all providers. The `marketplace` array is the real catalog - not just the demo `resources`.
List ALL payable APIs in the XDC AI marketplace (every provider's endpoints), plus this demo server's built-in test resources. Use this (or marketplace_list) to see the whole marketplace, not just echo/time/xdc-gas.
Get the x402 402 payment requirements for a resource id (without paying).
Get the logged-in user's XDC wallet address to fund with USDC (XDC network only). Returns the smart wallet - the account your agent pays from within on-chain spend limits.
Propose a lending action from the user's smart wallet on XDC: supply/deposit (earn yield), withdraw, borrow, or repay USDC. Protocols: 'fathom' (Fathom Lending, an Aave-style pool - supports ALL of supply/withdraw/borrow/repay/withdraw-collateral), 'primefi' (Aave-style pool - all ops), 'morpho' (supply/withdraw earn via the yield vault, AND borrow/repay/withdraw-collateral via the Morpho Blue USDC/WXDC market - borrow USDC against auto-locked XDC), 'silo' (Silo v3 9Summits market - supply/withdraw only). This does NOT execute - fund-moving DeFi actions require the user to review + SIGN in their browser. Returns an approveUrl; give it to the user to open, review the decoded action (from wallet, verified contract, exact state changes, and for borrow the health factor), and sign with their wallet. The smart wallet executes it only after they sign; gas is sponsored. Use for 'supply/deposit/earn/lend', 'withdraw/redeem', 'borrow', or 'repay N USDC'. NOTE: borrow auto-locks XDC from the smart wallet as collateral (wrapped to WXDC) and bundles deposit-collateral + borrow into one signature - the user needs enough native XDC; the exact amount locked is shown before they sign.
Propose a DeFi supply (earn USDC yield) from the user's smart wallet on XDC. Pick a protocol: 'fathom', 'morpho', or 'silo'. For withdraw/borrow/repay use defi_lend. Returns an approveUrl the user opens, reviews, and signs; the smart wallet executes only after they sign (gas sponsored).
Show the user's current DeFi positions held in their smart wallet on XDC (supplied/deposited balances earning yield): Fathom Lending, Morpho (XDC Yield Network), Silo v3, and anything DeBank indexes. Read-only. Returns each position's protocol + USD value and the total. Use when the user asks 'what are my DeFi positions / how much have I supplied / what am I earning'.
Propose a token SWAP from the user's smart wallet on XDC, routed by the LI.FI aggregator (best price across XDC DEXes). Supported tokens: XDC (native), WXDC, USDC. This does NOT execute - it returns an approveUrl the user opens to review the exact quote (you pay X, you receive ~Y) and SIGN in their browser; the smart wallet executes only after they sign (gas sponsored, 2FA required). Use for 'swap/convert/trade N XDC for USDC' etc. NOTE: some pairs may occasionally have no route - the approve page shows 'no route available' if so.
Show YOUR wallet's balances (requires login): USDC, native XDC (the gas token), and WXDC (wrapped XDC). Returns the smart wallet - the account your agent pays from within on-chain spend limits.
Non-custodial setup: check whether an agent's own session key is approved to spend from the user's smart wallet (Safe), and get the one-time browser approval URL if not. Pass the agent's `sessionAddress` (the 0x address of a key the agent generated and controls). Returns { approved, ready, safeAddress, authorizeUrl }. The user opens authorizeUrl once to grant this key an on-chain spend limit it can never exceed.
THE full XDC AI marketplace catalog: lists ALL paid APIs from every provider (not just this server's demo endpoints). Start here to discover any service. Use `search` (comma-separated terms) to rank by tags + capability and find the most relevant API for a task; optionally filter by exact capability and max price (USDC). Set sort='most-used' to rank by real usage (calls + USDC volume) - a credibility signal. Each result includes calls + volumeUSDC.
Call an x402 URL and auto-pay on HTTP 402 with USDC (gasless, a relayer pays the XDC gas). If the user holds marketplace credit from a referral campaign it is spent first, automatically, so they can pay even with an empty wallet; otherwise it pays from their own smart wallet. Returns the result and the settlement tx. When the reply carries `creditNotUsed`, that is the reason their credit did not cover this particular call - relay it and do not tell them they have no balance.
Send USDC to an APPROVED payee (gasless). `to` may be a 0x address OR a saved contact NAME (e.g. "Tarun") - names are resolved from the user's payees. The recipient must be pre-approved by the user via a browser login. If it isn't approved (or the name isn't found), this moves NOTHING and returns an approval link to give the user; ask them to approve it, then retry. Agents cannot approve payees (prompt-injection safe).
List the user's saved payees (approved contacts) - each with address + label. Use this to resolve a contact NAME the user mentions (e.g. 'send to Tarun') to an address before wallet_transfer, or to show who they can pay. Read-only.
When the user wants to ADD/APPROVE a new contact (payee) so they can send USDC to it, call this to get a one-click approval link. It moves nothing and adds nothing - it returns a URL to hand the user. They open it, log in, and the address (and label) are PREFILLED so they just click 'Approve payee'. Agents cannot add payees directly (security); this link is the human step.
Use this whenever the user asks about their transactions, payment history, what they paid, recent payments, or wants tx hashes / xdcscan links. Returns the user's recent paid calls + transfers, newest first - each with amount (USDC), the service, status, the on-chain tx hash, and a ready xdcscan.com link.
Verify whether a transaction went through for the user. Returns found/status/settled + the service and explorer link. Use this to confirm a payment settled.