> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ix.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Gateway (MCP)

> A hosted, read-only Model Context Protocol endpoint that lets AI agents query IX RWA assets, stats, and portfolios.

IX RWA exposes a hosted, **read-only** [Model Context Protocol](https://modelcontextprotocol.io) (MCP) endpoint — the **Agent Gateway**. It lets AI agents and MCP-compatible clients read the protocol's live data directly: the IX-CORE index and its constituents, protocol statistics, and wallet portfolios. It is served by the app itself, so agents connect by URL — no install, no build, no repo.

<Note>
  The Agent Gateway is **read-only**. Agent-initiated transactions (payments, allocation) are a roadmap item, gated behind the verified money-path and mainnet — see [Roadmap](/why-ix-rwa#roadmap).
</Note>

## Endpoint

<CodeGroup>
  ```text Endpoint theme={null}
  https://testnet.ix.finance/api/mcp
  ```
</CodeGroup>

Transport is **Streamable HTTP** with stateless **JSON-RPC 2.0** (protocol version `2025-06-18`; server `ix-rwa` `0.1.0`). CORS is open, and JSON-RPC **batch** requests are supported. A plain `GET` on the endpoint returns server info and the tool names for a quick liveness check.

## Tools

| Tool             | Arguments                                   | Purpose                                                                                                          |
| ---------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `list_assets`    | `gpu?` (string), `availableOnly?` (boolean) | List index constituents with value, APY, daily revenue, and funding. Optional GPU-model filter / available-only. |
| `get_asset`      | `id` (string, required)                     | Full detail for one asset, including its on-chain ownership token address.                                       |
| `protocol_stats` | *(none)*                                    | Protocol-level stats: AUM/NAV, NAV-per-share, total invested, protocol earnings, asset & holder counts.          |
| `get_portfolio`  | `wallet` (string, required)                 | A wallet's positions, ownership, and yield.                                                                      |

## Quickstart

<Steps>
  <Step title="List the available tools">
    Send an MCP `tools/list` request to discover the tools above and their input schemas. `initialize` and `ping` are also supported.
  </Step>

  <Step title="Call a tool">
    Invoke a tool with `tools/call`. For example, list only available H200 assets:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "tools/call",
      "params": {
        "name": "list_assets",
        "arguments": { "gpu": "H200", "availableOnly": true }
      }
    }
    ```
  </Step>

  <Step title="Read a portfolio">
    Note the argument is `wallet` (not `walletAddress`):

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": 2,
      "method": "tools/call",
      "params": { "name": "get_portfolio", "arguments": { "wallet": "0x…" } }
    }
    ```
  </Step>
</Steps>

## Response shapes

Tool results are returned as MCP text content containing JSON. Representative fields:

```json list_assets theme={null}
{
  "count": 3,
  "assets": [
    {
      "id": "…", "name": "…", "gpu": "H200", "numGpus": 8, "region": "…",
      "valueUsd": 250000, "apyPct": 18.4, "dailyRevenueUsd": 126.30,
      "investorPoolUsd": 150000, "fundedPct": 42.5, "fullySold": false
    }
  ]
}
```

```json protocol_stats theme={null}
{
  "aumUsd": 0, "navPerShareUsd": 1.0,
  "totalInvestedUsd": 0, "totalProtocolEarningsUsd": 0,
  "assetCount": 0, "holders": 0,
  "network": "Base Sepolia (chain 84532)"
}
```

`get_asset` additionally returns `description`, `reliabilityPct`, `hourlyRateUsd`, `tokenAddress`, and the `ownership` split (**40% IX / 60% investors**). AUM and NAV-per-share come from the **live on-chain vault** (6-decimals), matching the app — not a database sum.

## Use it from an MCP client

Add the endpoint to any MCP-compatible client (for example, Claude Code):

```json theme={null}
{
  "mcpServers": {
    "ix-rwa": { "type": "http", "url": "https://testnet.ix.finance/api/mcp" }
  }
}
```

Or via the CLI:

```bash theme={null}
claude mcp add --transport http ix-rwa https://testnet.ix.finance/api/mcp
```

## Data, honestly

The Gateway serves the same data the app uses. On testnet, NAV and yield are **simulated in settlement but driven by live market data** (the `LiveDataNAVOracle`, fed from live Vast.ai rates) as described in [Revenue & distributions](/protocol/revenue-and-distributions); realized on-chain figures are distinguished from simulated ones.
