# Moji App Moji App is a headless BRC-20 toolkit for Bitcoin. The REST API and MCP server use the same dependency-free tool core. It reads public market and token information, checks ticker rules and availability, and builds unsigned inscription content. It never asks for or holds wallet keys. ## REST API Base URL: `https://aloomii.com/moji-app/api` - `GET /moji-app/api` returns the API name, version, available tool definitions, and documentation links. - `GET /moji-app/api/market` returns BTC/USD, Bitcoin fee rates, and chain tip information. - `GET /moji-app/api/leaderboard?network=mainnet&sort=liquidity&limit=25&emoji_only=false` ranks BRC2.0 tokens by Bisdex liquidity or volume. It defaults to mainnet, liquidity, 25 entries, and all tokens. `sort` can be `liquidity`, `volume_24h`, or `volume_7d`. - `GET /moji-app/api/tokens?q=ordi` searches BRC2.0 tokens and returns explorer and Bisdex links. - `GET /moji-app/api/ticker/%F0%9F%A5%AD` validates a URL-encoded ticker and checks indexed availability. - `GET /moji-app/api/swap/pairs?network=signet` lists Bisdex swap pairs. `network` can be `signet` or `mainnet` and defaults to `signet`. - `GET /moji-app/api/swap/quote?token_in=frBTC&token_out=%F0%9F%98%98&amount_in=0.0001&network=signet` quotes one direct Bisdex swap. Amounts use whole-token units. - `POST /moji-app/api/inscriptions` builds deploy, mint, or transfer inscription JSON. - `POST /moji-app/api/predeploy` creates a predeploy commitment for a six-byte ticker. Example requests: ```sh curl 'https://aloomii.com/moji-app/api' curl 'https://aloomii.com/moji-app/api/market' curl 'https://aloomii.com/moji-app/api/leaderboard?network=mainnet&sort=volume_24h&limit=25' curl 'https://aloomii.com/moji-app/api/tokens?q=ordi' curl 'https://aloomii.com/moji-app/api/ticker/%F0%9F%A5%AD' curl 'https://aloomii.com/moji-app/api/swap/pairs?network=signet' curl 'https://aloomii.com/moji-app/api/swap/quote?token_in=frBTC&token_out=%F0%9F%98%98&amount_in=0.0001&network=signet' curl -X POST 'https://aloomii.com/moji-app/api/inscriptions' \ -H 'Content-Type: application/json' \ -d '{"op":"deploy","tick":"ordi","max":"21000000","lim":"1000"}' curl -X POST 'https://aloomii.com/moji-app/api/predeploy' \ -H 'Content-Type: application/json' \ -d '{"tick":"ab-12c","address":"bc1p0xlxvlhemja6c4dqv22uapctqupfhlxm9h8z3k2e72q4k9hcz7vqzk5jj0"}' ``` ## MCP The stateless Streamable HTTP MCP endpoint is `https://aloomii.com/moji-app/mcp`. It accepts JSON-RPC over POST and returns JSON responses without SSE. Available tools are `market`, `token_search`, `ticker_check`, `build_inscription`, `predeploy_commit`, `swap_pairs`, `swap_quote`, and `leaderboard`. Swap tools default to `signet`; set `network` to `mainnet` for mainnet data. Swap quotes only cover a direct pair. The leaderboard defaults to mainnet and ranks tokens by liquidity, 24-hour volume, or 7-day volume. MCP client configuration: ```json {"mcpServers":{"moji-app":{"type":"http","url":"https://aloomii.com/moji-app/mcp"}}} ``` Example initialize request: ```sh curl -X POST 'https://aloomii.com/moji-app/mcp' \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' ``` Example tool call: ```sh curl -X POST 'https://aloomii.com/moji-app/mcp' \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"ticker_check","arguments":{"tick":"ordi"}}}' ``` Swap tool calls: ```sh curl -X POST 'https://aloomii.com/moji-app/mcp' \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"swap_pairs","arguments":{"network":"signet"}}}' curl -X POST 'https://aloomii.com/moji-app/mcp' \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"swap_quote","arguments":{"token_in":"frBTC","token_out":"😘","amount_in":"0.0001","network":"signet"}}}' ``` Signing swaps as an agent: Swap tools only quote. To sign, run `@bestinslot/wallet-kit` yourself from a Node entry point and connect with your own key using `connectLocalWallet`. Set the wallet network with `wallet.setNetwork("signet")`, then call `swap.ensureSwapWallet()`. To deposit BTC, use `swap.wrapBtc(sats, feeRate)`. Get a route result with `swap.getSwapExactInputResult(...)`, then submit with `swap.swapExactInput(in, out, amountIn, minOut, slippageBPS)`. Keep private keys in your own wallet environment. Moji App never receives keys or signs transactions. Ticker availability can only confirm tokens indexed by the BRC2.0 explorer unless a classic BRC-20 indexer is configured. An unverified response is not a guarantee that a ticker is available. A self-mint ticker requires `self_mint:"true"` on deploy. A predeploy ticker requires a commitment and a deploy that is a child of that commitment at least three blocks later. Keep the salt secret until deploy. All inscription outputs are unsigned content only. Inscribe with a wallet such as UniSat or Ordinals Wallet. Moji App never holds keys.