{
  "markdown": "# Indigo MCP\n\n[![Smithery](https://smithery.ai/badge/@indigoprotocol/indigo-mcp)](https://smithery.ai/server/@indigoprotocol/indigo-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@indigoprotocol/indigo-mcp)](https://www.npmjs.com/package/@indigoprotocol/indigo-mcp)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/IndigoProtocol/indigo-mcp)\n\nMCP server for [Indigo Protocol](https://indigoprotocol.io/) — exposes Indigo iAsset data, prices, and CDP/loan analytics to LLM agents via the [Model Context Protocol](https://modelcontextprotocol.io/).\n\n## ⚡ Quick Start — Full Cardano DeFi Stack\n\n### MCP Servers (75 tools)\n\n```bash\n# 1. Install & Setup Indigo MCP (69 tools)\nnpm install -g @indigoprotocol/indigo-mcp\nnpx @indigoprotocol/indigo-mcp setup\n\n# 2. Install & Setup Cardano MCP (6 wallet tools)\nnpm install -g @indigoprotocol/cardano-mcp\nnpx @indigoprotocol/cardano-mcp setup\n```\n\n### AI Skills (13 skills) — Optional\n\n```bash\n# 3. Install Indigo Skills\nnpx @indigoprotocol/indigo-skills\n\n# 4. Install Cardano Skills\nnpx @indigoprotocol/cardano-skills\n```\n\n```\n╔═══════════════════════════════════════════════════════════════╗\n║                                                               ║\n║   ██╗███╗   ██╗██████╗ ██╗ ██████╗  ██████╗                   ║\n║   ██║████╗  ██║██╔══██╗██║██╔════╝ ██╔═══██╗                  ║\n║   ██║██╔██╗ ██║██║  ██║██║██║  ███╗██║   ██║                  ║\n║   ██║██║╚██╗██║██║  ██║██║██║   ██║██║   ██║                  ║\n║   ██║██║ ╚████║██████╔╝██║╚██████╔╝╚██████╔╝                  ║\n║   ╚═╝╚═╝  ╚═══╝╚═════╝ ╚═╝ ╚═════╝  ╚═════╝                   ║\n║                                                               ║\n║   ███╗   ███╗ ██████╗██████╗                                  ║\n║   ████╗ ████║██╔════╝██╔══██╗                                 ║\n║   ██╔████╔██║██║     ██████╔╝                                 ║\n║   ██║╚██╔╝██║██║     ██╔═══╝                                  ║\n║   ██║ ╚═╝ ██║╚██████╗██║                                      ║\n║   ╚═╝     ╚═╝ ╚═════╝╚═╝                                      ║\n║                                                               ║\n║   75 tools • 13 skills for Cardano DeFi                       ║\n║                                                               ║\n╚═══════════════════════════════════════════════════════════════╝\n```\n\nThe setup commands auto-configure Claude Desktop, Claude Code, Cursor, or Windsurf. No manual config editing needed.\n\n## Features\n\n- Real-time iAsset prices (iUSD, iBTC, iETH, iSOL, iEUR, iJPY)\n- ADA and INDY token price feeds\n- CDP/loan browsing with pagination and filtering\n- Owner lookup by payment key hash or bech32 address\n- CDP health analysis with collateral ratio and liquidation risk status\n- Stability pool state and account queries\n- INDY staking positions and manager state\n- Protocol analytics: TVL, APR rewards, DEX yields, aggregated stats\n- Governance: protocol parameters, polls, temperature checks\n- Redemption order book and queue aggregation\n- DEX proxy: Steelswap swaps, Iris liquidity pools, Blockfrost balances\n- CDP liquidation, redemption, freeze, and merge operations\n- Leveraged CDP opening via ROB positions\n- ROB (Redemption Order Book) position management\n- Oracle interest rate feeding and initialization\n- Stability pool request processing and cancellation\n- Staking reward distribution\n- Collector UTXOs, IPFS storage and retrieval\n\n## Hosted deployment\n\nA hosted deployment is available on [Fronteir AI](https://fronteir.ai/mcp/indigoprotocol-indigo-mcp).\n\n## Quick Start\n\n### Automatic Setup (Recommended)\n\nRun the interactive setup to automatically configure your MCP client:\n\n```bash\nnpx @indigoprotocol/indigo-mcp setup\n```\n\nThis will:\n\n1. Ask which client you're using (Claude Desktop, Claude Code, Cursor, Windsurf)\n2. Prompt for your Blockfrost API key\n3. Automatically update your config file\n\n### Manual Installation\n\nInstall globally:\n\n```bash\nnpm install -g @indigoprotocol/indigo-mcp\n```\n\nOr run directly with npx (no install needed):\n\n```bash\nnpx @indigoprotocol/indigo-mcp\n```\n\n### Docker\n\nThe image builds the server from source — no prior `pnpm build` needed, and no\ndependency on any external build step:\n\n```bash\ndocker build -t indigo-mcp .\ndocker run -p 3000:3000 -e BLOCKFROST_API_KEY=your-key indigo-mcp\n```\n\nIt runs the HTTP transport on port 3000 (`MCP_TRANSPORT=http` is baked in), which\nis what the Fly deployment uses.\n\n### HTTP Transport (Remote)\n\nThe server supports HTTP transport for remote/hosted deployments:\n\n```bash\nMCP_TRANSPORT=http PORT=3000 npx @indigoprotocol/indigo-mcp\n```\n\nThis starts an HTTP server with:\n\n- `POST /mcp` — MCP endpoint (Streamable HTTP with SSE)\n- `GET /health` — Health check\n\nEach client gets its own session: `initialize` returns an `Mcp-Session-Id` that\nsubsequent requests must send back. A client that restarts can simply\n`initialize` again — existing sessions are unaffected and the server does not\nneed restarting. Bind address and port come from `HOST` and `PORT` (`MCP_PORT`\nis accepted as an alias for `PORT`).\n\n## Configuration\n\n> **Note:** `BLOCKFROST_API_KEY` is required for write operations (transaction building). Read-only tools work without it. Get a free key at [blockfrost.io](https://blockfrost.io/).\n\n### Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```bash\n# macOS\nnano ~/Library/Application\\ Support/Claude/claude_desktop_config.json\n\n# Windows (PowerShell)\nnotepad \"$env:APPDATA\\Claude\\claude_desktop_config.json\"\n```\n\n**Standard config:**\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"INDEXER_URL\": \"https://analytics.indigoprotocol.io/api\",\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\"\n      }\n    }\n  }\n}\n```\n\n**For nvm users (multiple Node versions):**\n\nIf you use nvm and have multiple Node versions, you may need to specify the full path and set PATH explicitly:\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"/Users/YOUR_USERNAME/.nvm/versions/node/v22.22.0/bin/npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"PATH\": \"/Users/YOUR_USERNAME/.nvm/versions/node/v22.22.0/bin:/usr/local/bin:/usr/bin:/bin\",\n        \"INDEXER_URL\": \"https://analytics.indigoprotocol.io/api\",\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\"\n      }\n    }\n  }\n}\n```\n\n> **Note:** Replace `YOUR_USERNAME` and Node version with your actual values. Find your Node path with `which npx`.\n\n### Claude Code (CLI)\n\nAdd to `~/.claude/settings.json` or `.claude/settings.json` in your project:\n\n```bash\nnano ~/.claude/settings.json\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"INDEXER_URL\": \"https://analytics.indigoprotocol.io/api\",\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\"\n      }\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project-level):\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"INDEXER_URL\": \"https://analytics.indigoprotocol.io/api\",\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\"\n      }\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"INDEXER_URL\": \"https://analytics.indigoprotocol.io/api\",\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\"\n      }\n    }\n  }\n}\n```\n\n### OpenClaw\n\nInstall Indigo skills for [OpenClaw](https://openclaw.ai):\n\n```bash\nopenclaw skills add IndigoProtocol/indigo-skills\n```\n\nSkills are automatically configured — start using Indigo tools immediately.\n\n### Combined with Cardano MCP\n\nFor full Cardano DeFi capabilities, use both Indigo MCP and [Cardano MCP](https://github.com/IndigoProtocol/cardano-mcp) together:\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\"\n      }\n    },\n    \"cardano\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/cardano-mcp\"],\n      \"env\": {\n        \"SEED_PHRASE\": \"word1,word2,word3,...\",\n        \"BLOCKFROST_PROJECT_ID\": \"your-blockfrost-project-id\"\n      }\n    }\n  }\n}\n```\n\n### Any MCP-Compatible Client\n\nRun the server directly via stdio:\n\n```bash\nINDEXER_URL=https://analytics.indigoprotocol.io/api \\\nBLOCKFROST_API_KEY=your-blockfrost-project-id \\\nnpx @indigoprotocol/indigo-mcp\n```\n\nOr install globally and reference the binary:\n\n```bash\nnpm install -g @indigoprotocol/indigo-mcp\nindigo-mcp\n```\n\nFor any client that supports MCP over stdio, point it to the `npx @indigoprotocol/indigo-mcp` command with the environment variables above.\n\n## Available Tools\n\n### Asset Tools\n\n| Tool              | Description                                          | Parameters                         |\n| ----------------- | ---------------------------------------------------- | ---------------------------------- |\n| `get_assets`      | Get all Indigo iAssets with prices and interest data | None                               |\n| `get_asset`       | Get details for a specific iAsset                    | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |\n| `get_asset_price` | Get the current price for a specific iAsset          | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |\n| `get_ada_price`   | Get the current ADA price in USD                     | None                               |\n| `get_indy_price`  | Get the current INDY token price in ADA and USD      | None                               |\n\n### CDP / Loan Tools\n\n| Tool                  | Description                                       | Parameters                                                                          |\n| --------------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------- |\n| `get_all_cdps`        | Get all CDPs/loans, optionally filtered by iAsset | `asset?`: iAsset filter; `limit?`: 1-500 (default 50); `offset?`: pagination offset |\n| `get_cdps_by_owner`   | Get CDPs for a specific owner                     | `owner`: payment key hash (56-char hex) or bech32 address                           |\n| `get_cdps_by_address` | Get CDPs for a specific Cardano address           | `address`: bech32 address (addr1... or addr_test1...)                               |\n| `analyze_cdp_health`  | Analyze collateral ratios and liquidation risk    | `owner`: payment key hash or bech32 address                                         |\n\n### CDP Write Tools\n\n> **Pyth-priced iAssets have a submission deadline.** Every iAsset is currently\n> priced through Pyth, and the on-chain feed validator only accepts a transaction\n> for **280 seconds** after the price update it embeds. Price-dependent write\n> tools (`open_cdp`, `withdraw_cdp`, `mint_cdp`, `redeem_cdp`, `freeze_cdp`,\n> `leverage_cdp`, `redeem_rob`) therefore return a `summary.pyth` block with the\n> price, its timestamp and a `submitBefore` deadline. If signing takes longer\n> than that — a hardware wallet, or a human approving in a browser — rebuild the\n> transaction rather than submitting a stale one. A price update that has already\n> expired is rejected at build time with a retry hint.\n\n| Tool           | Description                                        | Parameters                                                                                                                      |\n| -------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |\n| `open_cdp`     | Open a new CDP position (returns unsigned CBOR tx) | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA; `collateralAmount`: lovelace; `mintAmount`: iAsset smallest unit |\n| `deposit_cdp`  | Deposit additional collateral into a CDP           | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index; `amount`: lovelace   |\n| `withdraw_cdp` | Withdraw collateral from a CDP                     | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index; `amount`: lovelace   |\n| `close_cdp`    | Close a CDP and reclaim collateral                 | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index                       |\n\n### CDP Mint/Burn Tools\n\n| Tool       | Description                                                   | Parameters                                                                                                                                                                      |\n| ---------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `mint_cdp` | Mint additional iAssets from an existing CDP (increases debt) | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: CDP UTxO output index; `amount`: iAsset amount in smallest unit |\n| `burn_cdp` | Burn iAssets to reduce CDP debt                               | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: CDP UTxO output index; `amount`: iAsset amount in smallest unit |\n\n### CDP Liquidation & Redemption Tools\n\n| Tool            | Description                                                     | Parameters                                                                                                                                          |\n| --------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `liquidate_cdp` | Liquidate an undercollateralized CDP through the stability pool | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index                                           |\n| `redeem_cdp`    | Redeem iAssets from a CDP                                       | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index; `amount`: iAsset amount in smallest unit |\n| `freeze_cdp`    | Freeze a CDP to prevent further operations                      | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index                                           |\n| `merge_cdps`    | Merge multiple CDPs into one                                    | `address`: bech32 address; `cdpOutRefs`: array of `{txHash, outputIndex}` (min 2)                                                                   |\n\n### Leverage CDP Tools\n\n| Tool           | Description                                             | Parameters                                                                                                       |\n| -------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| `leverage_cdp` | Open a leveraged CDP by redeeming against ROB positions | `address`: bech32 address; `asset`: iAsset; `leverage`: multiplier (e.g. 2.0); `baseCollateral`: lovelace amount |\n\n### Stability Pool Tools\n\n| Tool                          | Description                                                         | Parameters                                                |\n| ----------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------- |\n| `get_stability_pools`         | Get the latest stability pool state for each iAsset                 | None                                                      |\n| `get_stability_pool_accounts` | Get all open stability pool accounts, optionally filtered by iAsset | `asset?`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA                       |\n| `get_sp_account_by_owner`     | Get stability pool accounts for specific owners                     | `owners`: array of payment key hashes or bech32 addresses |\n\n### Staking Tools\n\n| Tool                              | Description                                     | Parameters                                                |\n| --------------------------------- | ----------------------------------------------- | --------------------------------------------------------- |\n| `get_staking_info`                | Get the current INDY staking manager state      | None                                                      |\n| `get_staking_positions`           | Get all open INDY staking positions             | None                                                      |\n| `get_staking_positions_by_owner`  | Get INDY staking positions for specific owners  | `owners`: array of payment key hashes or bech32 addresses |\n| `get_staking_position_by_address` | Get INDY staking positions for a single address | `address`: Cardano bech32 address                         |\n\n### Stability Pool Request Tools\n\n| Tool                 | Description                                                     | Parameters                                                                                                            |\n| -------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| `process_sp_request` | Process a pending stability pool request (protocol maintenance) | `address`: bech32 address; `asset`: iAsset; `accountTxHash`: account UTxO tx hash; `accountOutputIndex`: output index |\n| `annul_sp_request`   | Cancel a pending stability pool request                         | `address`: bech32 address; `accountTxHash`: account UTxO tx hash; `accountOutputIndex`: output index                  |\n\n### Staking Write Tools\n\n| Tool                      | Description                                              | Parameters                                                                                                                                           |\n| ------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `open_staking_position`   | Stake INDY tokens by creating a new staking position     | `address`: bech32 address; `amount`: INDY amount in smallest unit                                                                                    |\n| `adjust_staking_position` | Adjust an existing staking position (add or remove INDY) | `address`: bech32 address; `amount`: positive=stake more, negative=unstake; `positionTxHash`: UTxO tx hash; `positionOutputIndex`: UTxO output index |\n| `close_staking_position`  | Close a staking position and unstake all INDY            | `address`: bech32 address; `positionTxHash`: UTxO tx hash; `positionOutputIndex`: UTxO output index                                                  |\n\n### Staking Reward Tools\n\n| Tool                         | Description                                                      | Parameters                                                                       |\n| ---------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------- |\n| `distribute_staking_rewards` | Distribute collected ADA rewards from collector UTxOs to stakers | `address`: bech32 address; `collectorTxHashes`: array of `{txHash, outputIndex}` |\n\n### Analytics & APR Tools\n\n| Tool                 | Description                            | Parameters                                    |\n| -------------------- | -------------------------------------- | --------------------------------------------- |\n| `get_tvl`            | Get historical TVL data from DefiLlama | None                                          |\n| `get_apr_rewards`    | Get all APR reward records             | None                                          |\n| `get_apr_by_key`     | Get APR for a specific key             | `key`: APR key (e.g. sp_iUSD_indy, stake_ada) |\n| `get_dex_yields`     | Get DEX farm yields for iAsset pairs   | None                                          |\n| `get_protocol_stats` | Get aggregated protocol statistics     | None                                          |\n\n### Governance Tools\n\n| Tool                     | Description                               | Parameters |\n| ------------------------ | ----------------------------------------- | ---------- |\n| `get_protocol_params`    | Get latest governance protocol parameters | None       |\n| `get_temperature_checks` | Get temperature check polls               | None       |\n| `get_polls`              | Get all governance polls                  | None       |\n\n### Redemption & Order Book Tools\n\n| Tool                    | Description                                   | Parameters                                                      |\n| ----------------------- | --------------------------------------------- | --------------------------------------------------------------- |\n| `get_order_book`        | Get open ROB (redemption order book) positions | `asset?`: iAsset filter; `owners?`: array of payment key hashes |\n| `get_redemption_orders` | Get executed redemption orders                | `asset?`: iAsset filter; `limit?`: max records (default 100)    |\n| `get_redemption_queue`  | Get open ROB order-book entries for an iAsset | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA                  |\n\n### ROB Write Tools\n\n| Tool         | Description                                               | Parameters                                                                                                                                                                      |\n| ------------ | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `open_rob`   | Open a new ROB position with ADA and a max price limit    | `address`: bech32 address; `asset`: iAsset; `lovelacesAmount`: lovelace to deposit; `maxPriceNumerator` + `maxPriceDenominator`: rational max price                              |\n| `cancel_rob` | Cancel an existing ROB position                           | `address`: bech32 address; `robTxHash`: ROB UTxO tx hash; `robOutputIndex`: output index                                                                                        |\n| `adjust_rob` | Adjust ADA in a ROB (positive to add, negative to remove) | `address`: bech32 address; `robTxHash`: ROB UTxO tx hash; `robOutputIndex`: output index; `lovelacesAdjustAmount`: adjustment; `newMaxPriceNumerator?` + `newMaxPriceDenominator?`: optional new rational max price |\n| `claim_rob`  | Claim received iAssets from an ROB position               | `address`: bech32 address; `robTxHash`: ROB UTxO tx hash; `robOutputIndex`: output index                                                                                        |\n| `redeem_rob` | Redeem iAssets against one or more ROB positions          | `address`: bech32 address; `asset`: iAsset; `redemptionRobs`: array of `{txHash, outputIndex, amount}`                                                                          |\n\n### DEX Proxy Tools\n\n| Tool                       | Description                               | Parameters                                                           |\n| -------------------------- | ----------------------------------------- | -------------------------------------------------------------------- |\n| `get_steelswap_tokens`     | Get all tokens available on Steelswap DEX | None                                                                 |\n| `get_steelswap_estimate`   | Get a swap estimate from Steelswap        | `tokenIn`: input token; `tokenOut`: output token; `amountIn`: amount |\n| `get_iris_liquidity_pools` | Get liquidity pools from Iris             | `tokenA?`: first token; `tokenB?`: second token; `dex?`: DEX filter  |\n| `get_blockfrost_balances`  | Get token balances for a Cardano address  | `address`: Cardano bech32 address                                    |\n\n### Collector & IPFS Tools\n\n| Tool                  | Description                              | Parameters                     |\n| --------------------- | ---------------------------------------- | ------------------------------ |\n| `get_collector_utxos` | Get collector UTXOs for fee distribution | `length?`: max UTXOs to return |\n| `store_on_ipfs`       | Store text content on IPFS               | `text`: content to store       |\n| `retrieve_from_ipfs`  | Retrieve content from IPFS by CID        | `cid`: IPFS content identifier |\n\n### Interest Tools (v3)\n\n| Tool                   | Description                                                   | Parameters                                    |\n| ---------------------- | ------------------------------------------------------------ | --------------------------------------------- |\n| `collect_interest`     | Build a tx to collect accrued interest for one or more CDPs  | `asset`, `cdps[]`                             |\n| `distribute_interest`  | Build a tx to distribute collected interest (admin)          | `address`                                     |\n| `feed_interest_oracle` | Feed a new interest rate to the interest oracle (admin)      | `address`, oracle params                      |\n| `get_interest_oracle`  | Read the current interest oracle state for an iAsset         | `asset`                                       |\n\n### Oracle / Pyth Tools (v3)\n\n| Tool                | Description                                                        | Parameters                          |\n| ------------------- | ----------------------------------------------------------------- | ----------------------------------- |\n| `get_oracle_price`  | On-chain price for an iAsset (OracleNft / Delisted / Pyth)        | `asset`                             |\n| `get_pyth_price`    | Current Pyth price for an iAsset, plus its on-chain feed config   | `asset`                             |\n| `feed_price_oracle` | Feed a new price to an OracleNft-backed price oracle (admin)      | `address`, `oracleTxHash`, price    |\n\n### Stableswap Tools (v3)\n\n| Tool                     | Description                                                   | Parameters                                  |\n| ------------------------ | ------------------------------------------------------------ | ------------------------------------------- |\n| `get_stableswap_pool`    | Get the stableswap pool state for an (iAsset, collateral)    | `asset`                                     |\n| `create_stableswap_order`| Build a tx to swap collateral↔iAsset via the stableswap pool | `address`, `asset`, `amount`, `minting`     |\n| `cancel_stableswap_order`| Build a tx to cancel a stableswap order                      | `address`, `orderTxHash`, `orderOutputIndex`|\n\n## Environment Variables\n\n| Variable               | Required      | Default                                      | Description                                                 |\n| ---------------------- | ------------- | -------------------------------------------- | ----------------------------------------------------------- |\n| `INDEXER_URL`          | No            | `https://analytics.indigoprotocol.io/api` | Indigo analytics API base URL                               |\n| `BLOCKFROST_API_KEY`   | For write ops | —                                            | Blockfrost project ID for transaction building              |\n| `CARDANO_NETWORK`      | No            | `mainnet`                                    | Cardano network: `mainnet`, `preprod`, or `preview`         |\n| `MCP_TRANSPORT`        | No            | `stdio`                                      | Transport mode: `stdio` or `http`                           |\n| `PORT`                 | No            | `3000`                                       | HTTP server port (only used when `MCP_TRANSPORT=http`); `MCP_PORT` is accepted as an alias |\n| `HOST`                 | No            | `0.0.0.0`                                    | HTTP bind address (only used when `MCP_TRANSPORT=http`); set `127.0.0.1` to bind locally only |\n| `X402_PRIVATE_KEY`     | No            | —                                            | EVM private key (`0x…`) of the payer wallet — enables auto-payment via split flow |\n| `PAYMENT_SERVER`       | No            | `https://mcp.openmm.io`                      | Settlement worker / proxy URL                               |\n| `X402_TESTNET`         | No            | `false`                                      | Use Base Sepolia testnet                                    |\n| `X402_FACILITATOR_URL` | No            | —                                            | Fallback facilitator (used only when `PAYMENT_SERVER` unset) |\n\n## Example Queries\n\nWhen connected to an LLM agent, you can ask natural language questions like:\n\n- \"What are the current prices of all Indigo iAssets?\"\n- \"What is the price of iUSD right now?\"\n- \"How much is ADA worth in USD?\"\n- \"Show me all iETH CDPs\"\n- \"What CDPs does this address own?\" (paste a Cardano address)\n- \"Analyze the health of my CDPs\" (with your address or payment key hash)\n- \"Are any of my positions at risk of liquidation?\"\n- \"Show me the current stability pool state\"\n- \"What are my stability pool deposits?\" (with your address)\n- \"How much INDY am I staking?\" (with your address)\n- \"What's the current TVL of Indigo?\"\n- \"What APR can I earn on iUSD stability pool?\"\n- \"What are the current governance protocol parameters?\"\n- \"Show me the iUSD redemption queue\"\n- \"Get a Steelswap estimate for swapping 100 ADA to iUSD\"\n- \"What are the current DEX yields for iAsset pairs?\"\n\n## Distribution\n\nThe server is published to three places, and they are not the same artifact.\n\n| Target | Built by | Output | Published by |\n|---|---|---|---|\n| npm — `@indigoprotocol/indigo-mcp` | `scripts/build.sh` | `dist/` | CI, on a `v*` tag |\n| [MCP Registry](https://registry.modelcontextprotocol.io) — `io.github.IndigoProtocol/indigo-mcp` | `server.json` | metadata only | CI, on a `v*` tag (GitHub OIDC — no token) |\n| [Smithery](https://smithery.ai/server/@indigoprotocol/indigo-mcp) | `scripts/smithery-build.sh` | `.smithery/stdio/server.mcpb` | `pnpm smithery:publish`, manually |\n\nThe container image (`Dockerfile`) builds from source and is used by Fly and any\nother container host. It does **not** consume `.smithery/` output — that path is\nSmithery-specific.\n\n### Cutting a release\n\n1. Merge the version bump (`package.json`; `SERVER_VERSION` is read from it)\n2. `git tag vX.Y.Z && git push origin vX.Y.Z`\n3. CI publishes to npm, then to the MCP Registry (the registry verifies ownership\n   via the package's `mcpName` field, so npm has to go first)\n4. Verify against the registry, not the workflow: `npm view @indigoprotocol/indigo-mcp version`\n5. `fly deploy` for the hosted HTTP endpoint, and `pnpm smithery:publish` for Smithery\n\n## Development\n\n### Prerequisites\n\n- Node.js >= 20 (the bundled `undici` requires the `File` global, added in Node 20)\n- npm\n\n### Setup\n\n```bash\ngit clone https://github.com/IndigoProtocol/indigo-mcp.git\ncd indigo-mcp\nnpm install\nnpm run dev      # run with tsx (hot reload)\n```\n\n### Scripts\n\n```bash\nnpm run build          # compile TypeScript\nnpm run start          # run compiled server\nnpm run dev            # run with tsx (hot reload)\nnpm run typecheck      # type-check without emitting\nnpm run lint           # eslint\nnpm run lint:fix       # eslint --fix\nnpm run format         # prettier\nnpm run format:check   # prettier --check\nnpm run test           # run tests\nnpm run test:watch     # run tests in watch mode\n```\n\n### Project Structure\n\n```\nsrc/\n├── index.ts                       # Server entry point (stdio transport)\n├── payment.ts                     # x402 configuration: chain addresses + tool price tiers\n├── payment-client.ts              # withAutoPayment: client-side auto-pay on 402 responses\n├── types/\n│   └── tx-types.ts                # UnsignedTxResult, TxSummary types\n├── tools/\n│   ├── index.ts                   # Tool registration hub\n│   ├── asset-tools.ts             # 5 asset/price tools\n│   ├── cdp-tools.ts               # 4 CDP/loan tools\n│   ├── stability-pool-tools.ts    # 3 stability pool tools\n│   ├── staking-tools.ts           # 4 INDY staking tools\n│   ├── staking-write-tools.ts     # 3 INDY staking write tools\n│   ├── staking-reward-tools.ts    # 1 staking reward distribution tool\n│   ├── cdp-liquidation-tools.ts   # 4 CDP liquidation/redemption/freeze/merge tools\n│   ├── leverage-cdp-tools.ts      # 1 leveraged CDP tool\n│   ├── rob-write-tools.ts         # 5 ROB write tools\n\n│   ├── sp-request-tools.ts        # 2 SP request processing tools\n│   ├── analytics-tools.ts         # 5 analytics/APR tools\n│   ├── governance-tools.ts        # 3 governance tools\n│   ├── redemption-tools.ts        # 3 redemption/order book tools\n│   ├── dex-tools.ts               # 4 DEX proxy tools\n│   └── collector-tools.ts         # 3 collector/IPFS tools\n├── resources/\n│   └── index.ts                   # MCP resource definitions\n├── tests/\n│   ├── unit/\n│   │   ├── tools/                 # Unit tests for each tool module\n│   │   └── utils/                 # Unit tests for validators, address\n│   └── integration/\n│       └── indexer-client.test.ts # Integration test for HTTP client\n└── utils/\n    ├── index.ts                   # Re-exports\n    ├── indexer-client.ts          # Axios client for Indigo analytics API\n    ├── validators.ts              # Zod validators (AssetParam enum)\n    ├── address.ts                 # Bech32 address → payment credential\n    ├── lucid-provider.ts          # Lucid + Blockfrost singleton provider\n    ├── sdk-config.ts              # SystemParams loader with cache\n    └── tx-builder.ts              # Transaction builder → unsigned CBOR\n```\n\n### Testing via stdin\n\nThe server communicates over stdio using JSON-RPC. You can test tools directly:\n\n```bash\nnpm run build\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"0.1.0\"}}}' | node dist/index.js\n```\n\n## x402 Payment Gating\n\nIndigo MCP optionally gates tools behind per-call micropayments using the [x402 protocol](https://x402.org). Payment is disabled by default — set at least one wallet address to enable it.\n\n### How it works\n\nPayment uses the **split execution** model — the same architecture as openMM-MCP:\n\n1. A tool is called (no payment header needed from the caller)\n2. The gate intercepts and contacts the **settlement worker** (`mcp.openmm.io` by default)\n3. Worker responds `402` with EIP-3009 requirements (amount, recipient, chain)\n4. Gate **signs locally** using `X402_PRIVATE_KEY` — the key never leaves this process\n5. Gate retries with the signed payment → worker verifies on-chain, issues a JWT\n6. Gate verifies JWT locally, executes the original tool handler\n7. Settlement tx hash is injected into the tool response\n\nThis keeps process isolation clean: indigo-mcp never holds the recipient wallet — only the payer key. Verification and settlement are handled by the openmm.io proxy.\n\n- Read tools (`get_tvl`, `get_asset_price`, …) cost **$0.001 USDC** per call\n- Analysis tools (`analyze_cdp_health`) cost **$0.005 USDC** per call\n- Write tools (`open_cdp`, `mint_cdp`, …) cost **$0.01 USDC** per call\n\n### Environment variables\n\n| Variable               | Required  | Default                 | Description                                                                    |\n| ---------------------- | --------- | ----------------------- | ------------------------------------------------------------------------------ |\n| `X402_PRIVATE_KEY`     | to enable | —                       | EVM private key (`0x…`) of the payer wallet — enables split payment            |\n| `PAYMENT_SERVER`       | optional  | `https://mcp.openmm.io` | Settlement worker / proxy URL                                                  |\n| `X402_TESTNET`         | optional  | `false`                 | Use Base Sepolia testnet                                                        |\n| `X402_FACILITATOR_URL` | optional  | —                       | Fallback facilitator URL (used only when `PAYMENT_SERVER` is not set)          |\n\n### Split execution flow\n\nWhen `X402_PRIVATE_KEY` is set, every paid tool call is handled transparently:\n\n1. Gate contacts `PAYMENT_SERVER` (`https://mcp.openmm.io` by default)\n2. Signs EIP-3009 locally — the private key never leaves this process\n3. Proxy verifies on-chain, issues a short-lived JWT\n4. Gate verifies JWT, executes tool, injects settlement tx hash into response\n\nIf `X402_PRIVATE_KEY` is not set the gate is disabled and all tools execute without payment.\n\n```bash\n# Minimal: just set the payer key (proxy defaults to mcp.openmm.io)\nX402_PRIVATE_KEY=0xYourPayerPrivateKey npx @indigoprotocol/indigo-mcp\n\n# Self-hosted proxy\nX402_PRIVATE_KEY=0xYourPayerPrivateKey \\\nPAYMENT_SERVER=https://your-own-proxy \\\nnpx @indigoprotocol/indigo-mcp\n```\n\n### Local development\n\n```bash\n# 1. Copy example env\ncp .env.example .env\n# Edit .env and set X402_PRIVATE_KEY to a funded Base Sepolia wallet\n\n# 2. Start the HTTP server\nMCP_TRANSPORT=http PORT=3000 npm run dev\n\n# 3. Run the payment e2e tests\nX402_TESTNET=true npm test -- x402-payment\n```\n\n### MCP client config with x402\n\nAdd the `env` block to whichever MCP config file your client uses:\n\n**Claude Code** (`~/.claude/settings.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"INDEXER_URL\": \"https://analytics.indigoprotocol.io/api\",\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\",\n        \"X402_PRIVATE_KEY\": \"0xYourPayerPrivateKey\",\n        \"X402_TESTNET\": \"true\"\n      }\n    }\n  }\n}\n```\n\n**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"indigo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@indigoprotocol/indigo-mcp\"],\n      \"env\": {\n        \"INDEXER_URL\": \"https://analytics.indigoprotocol.io/api\",\n        \"BLOCKFROST_API_KEY\": \"your-blockfrost-project-id\",\n        \"X402_PRIVATE_KEY\": \"0xYourPayerPrivateKey\",\n        \"X402_TESTNET\": \"true\"\n      }\n    }\n  }\n}\n```\n\n**Cursor / Windsurf** — same `env` block applies to `~/.cursor/mcp.json` or `~/.codeium/windsurf/mcp_config.json`.\n\n> Set `X402_TESTNET` to `false` (or omit it) for Base mainnet.\n\n## License\n\nISC\n",
  "bytes": 39746,
  "sha": "1bc875059882fcda289b09720138b1777a8c34c9bc335a2178b5f61621b3bfb0",
  "repo_slug": "indigoprotocol/indigo-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_indigoprotocol_indigo_mcp_620a3092/readme"
}