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

# Connect an agent with MCP

> Connect an MCP client to Reins on XRPL testnet for account inspection, policy status, transaction preparation, decoded explanations, and guarded submission.

The Reins MCP server exposes account inspection, transaction preparation, explanations, and a prepared-transaction submission path. It has no tool that changes owner policy, delegation, signer lists, or keys.

## Start without a signing key

Use Node.js 22.12 or later and create a local policy with the [quickstart](/quickstart). Adapt this configuration to your MCP client. Replace the absolute policy path and uppercase address markers with your generated policy values.

```json theme={"dark"}
{
  "mcpServers": {
    "reins": {
      "command": "npx",
      "args": ["-y", "@reinskit/mcp@0.0.2"],
      "env": {
        "REINS_NETWORK": "testnet",
        "REINS_POLICY": "/absolute/path/to/reins/reins.yaml",
        "REINS_ALLOWANCE_ACCOUNT": "YOUR_ALLOWANCE_CLASSIC_ADDRESS",
        "REINS_AGENT_ADDRESS": "YOUR_AGENT_CLASSIC_ADDRESS"
      }
    }
  }
}
```

Without `REINS_AGENT_WALLET_FILE`, the server can inspect, explain, and prepare transactions but cannot sign and submit them. Keep the owner wallet file out of the MCP configuration.

## Available tools

| Tool | Use |
| - | - |
| `xrpl_account_overview` | Inspect balances, reserves, spendable XRP, and trust lines. |
| `reins_policy_status` | Compare the configured policy with live ledger state. |
| `xrpl_prepare_payment` | Prepare a delegated payment, inspect findings, and simulate it. |
| `xrpl_prepare_check_cash` | Prepare cashing a Check addressed to the allowance account. |
| `xrpl_prepare_escrow_finish` | Prepare an escrow finish transaction. |
| `xrpl_submit_prepared` | Submit a reviewed preparation when a matching signing key is configured. |
| `xrpl_explain_transaction` | Explain decoded transaction fields without submitting. |

A tool's availability does not grant its corresponding ledger permission. A payment-only policy remains payment-only.

## Inspect, prepare, review, submit

1. Inspect the allowance with `xrpl_account_overview`.
2. Read `reins_policy_status` and resolve unexpected findings.
3. Use `xrpl_prepare_payment` to prepare the intended transaction.
4. Review the decoded explanation, worst-case outflow, findings, and simulation result.
5. In a signing-enabled setup, submit the returned `preparedId` through `xrpl_submit_prepared`.

Prepared identifiers are one-use and expire after a ledger boundary. The current offset is five ledgers, approximately 20 seconds. If a preparation expires or is refused, inspect the result and prepare again. Do not silently sign through another path.

## Environment variables

| Variable | Purpose |
| - | - |
| `REINS_NETWORK` | Network selection; defaults to `testnet`. |
| `REINS_ENDPOINT` | Optional WebSocket endpoint override. |
| `REINS_POLICY` | Local policy path for live policy reports. |
| `REINS_ALLOWANCE_ACCOUNT` | Account the agent spends from through delegation. |
| `REINS_AGENT_ADDRESS` | Agent identity for preparation without a signing key. |
| `REINS_AGENT_WALLET_FILE` | Optional local JSON file containing an agent seed. |

The signing file contains a single `seed` value. It is not the multi-wallet owner file generated by initialization. Restrict its permissions and keep it outside source control.

The ordinary single-key setup and optional hardened multisig topology have different signing requirements. This introductory guide does not supply a hardened signing recipe; confirm the matching watchdog flow before enabling submission for that topology.

## Treat external content as data

Memos, token names, and agent instructions are untrusted. Reins explanations derive from decoded transaction fields. Issued currencies require an issuer; a familiar ticker alone does not establish token identity.

For the distinction between ledger rules and toolkit checks, read [enforcement](/concepts/enforcement).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.