---
name: aist-chain
description: Build, trade, audit contracts, manage bounded AI sub-cards (agent1_), and settle x402 micropayments on AIST Chain (ChainID 4157 / 14157) via JSON-RPC and the 16-tool native MCP server.
---

# AIST Chain Agent Skill

Use this skill whenever interacting with AIST Chain (`https://aistchain.org`), deploying or auditing deterministic contracts, quoting multi-hop swaps, managing `0x0409` guarded AI agent wallets, or calling HTTP 402 (`x402`) verifiable inference endpoints.

## 1. Connect via Native 16-Tool MCP Server
Add the following MCP server configuration to Claude Code, Cursor, or Antigravity:
```json
{
  "mcpServers": {
    "aist-mainnet": {
      "url": "https://aistchain.org/api/v1/mcp",
      "transport": "http-jsonrpc"
    }
  }
}
```

## 2. Core Workflows
1. **Read Chain & Portfolio State**: `GET https://aistchain.org/api/v1/overview` and `GET https://aistchain.org/api/v1/user/journey-summary`.
2. **Pre-Execution Safety Simulation**: Always call `POST https://aistchain.org/api/v1/tx/simulate` before broadcasting high-value transfers or agent actions.
3. **Smart Multi-Hop Swap**: Quote via `POST https://aistchain.org/api/v1/dapps/dex/quote`, then execute via `POST https://aistchain.org/api/v1/dapps/dex/route-swap`.
4. **Contract Audit & Foundry Tests**: Validate specs via `POST https://aistchain.org/api/v1/studio/audit` and `POST https://aistchain.org/api/v1/studio/test-contract`.
5. **x402 Streaming Micropayments**: Open a `1.8ms` prepaid channel via `POST https://aistchain.org/api/v1/x402/session/open`, then invoke `POST https://aistchain.org/api/v1/x402/session/call`.
