> For the complete documentation index, see [llms.txt](https://docs.arenas.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arenas.fi/build-with-arenas/sdks-and-tooling.md).

# SDKs & Tooling

Beyond the raw [REST API](/build-with-arenas/api-reference.md), Arenas offers tooling to make integration faster — typed helpers, agent-native access, and the shared contract ABIs.

***

### Contract ABIs

The API serves the current contract ABI map so you don’t hardcode fragments:

```bash
curl -H "X-Arena-Key: $ARENA_KEY" "$ARENAS_API/abis/current"
# => { "FinancingMarket": [...], "FinancingMarketAdapter": [...], "ERC20": [...] }
```

The map is keyed by contract name and matches the current tx-engine version. Use it to encode calldata for writes (`requestFinancing`, `receiveFinancing`, `repay`, adapter `deposit`, …).

***

### Unit conventions

When moving between the API and contracts, remember:

* **Amounts** — API values are normalized decimals; contracts expect raw uint256. `parseUnits(value, assetToken.decimals)`.
* **Rates** — API is annualized APR (decimal); contracts use per-second `1e18`. `maxRate = floor(aprFraction * 1e18 / 31_536_000)`.
* **Durations** — API is milliseconds; contract `duration` is seconds.
* **Timestamps** — API is milliseconds; on-chain is seconds.

***

### MCP <a href="#mcp" id="mcp"></a>

Arenas ships a **Model Context Protocol** server at **`mcp.atomica.org`** — agent-native access to the same domain knowledge used to build the app. Point any MCP-capable client (Claude Code, Cursor, etc.) at it:

```jsonc
// .mcp.json
{
  "mcpServers": {
    "atomica": { "type": "http", "url": "https://mcp.atomica.org/mcp" }
  }
}
```

It exposes **skills** (end-to-end flow recipes), **primitives** (exact API endpoints and contract calls), **entity views**, **fixtures**, and **integration bundles** — so an agent can scaffold a borrower, LP, or approver flow from an authoritative source rather than guessing.

***

### Typed SDK

A typed SDK (calldata builders, unit conversion, and contract reads on top of the API and ABIs) is planned to sit above these surfaces. Until it ships, the recommended path is the **REST API + `abis/current` + a standard EVM library** (viem/ethers) for writes, with the **MCP** as the source of flow logic.

***

### CLI

For scripting and automation from a terminal or CI, see the [CLI](/build-with-arenas/cli.md).
