@indigoprotocol/indigo-mcp 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -17
- package/dist/cardano_multiplatform_lib_bg.wasm +0 -0
- package/dist/cli/setup.js +2 -2
- package/dist/index.js +378 -85
- package/dist/server.d.ts.map +1 -1
- package/dist/tools/cdp-liquidation-tools.d.ts.map +1 -1
- package/dist/tools/cdp-mint-burn-tools.d.ts.map +1 -1
- package/dist/tools/cdp-write-tools.d.ts.map +1 -1
- package/dist/tools/leverage-cdp-tools.d.ts.map +1 -1
- package/dist/tools/oracle-tools.d.ts.map +1 -1
- package/dist/tools/rob-write-tools.d.ts.map +1 -1
- package/dist/types/tx-types.d.ts +14 -0
- package/dist/types/tx-types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/indexer-client.d.ts +17 -0
- package/dist/utils/indexer-client.d.ts.map +1 -1
- package/dist/utils/pyth.d.ts +87 -0
- package/dist/utils/pyth.d.ts.map +1 -0
- package/dist/utils/tx-builder.d.ts +10 -2
- package/dist/utils/tx-builder.d.ts.map +1 -1
- package/dist/utils/v3-finders.d.ts +4 -3
- package/dist/utils/v3-finders.d.ts.map +1 -1
- package/dist/utils/validators.d.ts +1 -1
- package/dist/utils/validators.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ npx @indigoprotocol/cardano-skills
|
|
|
47
47
|
║ ██║ ╚═╝ ██║╚██████╗██║ ║
|
|
48
48
|
║ ╚═╝ ╚═╝ ╚═════╝╚═╝ ║
|
|
49
49
|
║ ║
|
|
50
|
-
║
|
|
50
|
+
║ 75 tools • 13 skills for Cardano DeFi ║
|
|
51
51
|
║ ║
|
|
52
52
|
╚═══════════════════════════════════════════════════════════════╝
|
|
53
53
|
```
|
|
@@ -56,7 +56,7 @@ The setup commands auto-configure Claude Desktop, Claude Code, Cursor, or Windsu
|
|
|
56
56
|
|
|
57
57
|
## Features
|
|
58
58
|
|
|
59
|
-
- Real-time iAsset prices (iUSD, iBTC, iETH, iSOL)
|
|
59
|
+
- Real-time iAsset prices (iUSD, iBTC, iETH, iSOL, iEUR, iJPY)
|
|
60
60
|
- ADA and INDY token price feeds
|
|
61
61
|
- CDP/loan browsing with pagination and filtering
|
|
62
62
|
- Owner lookup by payment key hash or bech32 address
|
|
@@ -129,6 +129,12 @@ This starts an HTTP server with:
|
|
|
129
129
|
- `POST /mcp` — MCP endpoint (Streamable HTTP with SSE)
|
|
130
130
|
- `GET /health` — Health check
|
|
131
131
|
|
|
132
|
+
Each client gets its own session: `initialize` returns an `Mcp-Session-Id` that
|
|
133
|
+
subsequent requests must send back. A client that restarts can simply
|
|
134
|
+
`initialize` again — existing sessions are unaffected and the server does not
|
|
135
|
+
need restarting. Bind address and port come from `HOST` and `PORT` (`MCP_PORT`
|
|
136
|
+
is accepted as an alias for `PORT`).
|
|
137
|
+
|
|
132
138
|
## Configuration
|
|
133
139
|
|
|
134
140
|
> **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/).
|
|
@@ -307,8 +313,8 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
|
|
|
307
313
|
| Tool | Description | Parameters |
|
|
308
314
|
| ----------------- | ---------------------------------------------------- | ---------------------------------- |
|
|
309
315
|
| `get_assets` | Get all Indigo iAssets with prices and interest data | None |
|
|
310
|
-
| `get_asset` | Get details for a specific iAsset | `asset`: iUSD, iBTC, iETH, or
|
|
311
|
-
| `get_asset_price` | Get the current price for a specific iAsset | `asset`: iUSD, iBTC, iETH, or
|
|
316
|
+
| `get_asset` | Get details for a specific iAsset | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
|
|
317
|
+
| `get_asset_price` | Get the current price for a specific iAsset | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
|
|
312
318
|
| `get_ada_price` | Get the current ADA price in USD | None |
|
|
313
319
|
| `get_indy_price` | Get the current INDY token price in ADA and USD | None |
|
|
314
320
|
|
|
@@ -323,9 +329,19 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
|
|
|
323
329
|
|
|
324
330
|
### CDP Write Tools
|
|
325
331
|
|
|
332
|
+
> **Pyth-priced iAssets have a submission deadline.** Every iAsset is currently
|
|
333
|
+
> priced through Pyth, and the on-chain feed validator only accepts a transaction
|
|
334
|
+
> for **280 seconds** after the price update it embeds. Price-dependent write
|
|
335
|
+
> tools (`open_cdp`, `withdraw_cdp`, `mint_cdp`, `redeem_cdp`, `freeze_cdp`,
|
|
336
|
+
> `leverage_cdp`, `redeem_rob`) therefore return a `summary.pyth` block with the
|
|
337
|
+
> price, its timestamp and a `submitBefore` deadline. If signing takes longer
|
|
338
|
+
> than that — a hardware wallet, or a human approving in a browser — rebuild the
|
|
339
|
+
> transaction rather than submitting a stale one. A price update that has already
|
|
340
|
+
> expired is rejected at build time with a retry hint.
|
|
341
|
+
|
|
326
342
|
| Tool | Description | Parameters |
|
|
327
343
|
| -------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
328
|
-
| `open_cdp` | Open a new CDP position (returns unsigned CBOR tx) | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, or
|
|
344
|
+
| `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 |
|
|
329
345
|
| `deposit_cdp` | Deposit additional collateral into a CDP | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index; `amount`: lovelace |
|
|
330
346
|
| `withdraw_cdp` | Withdraw collateral from a CDP | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index; `amount`: lovelace |
|
|
331
347
|
| `close_cdp` | Close a CDP and reclaim collateral | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index |
|
|
@@ -334,8 +350,8 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
|
|
|
334
350
|
|
|
335
351
|
| Tool | Description | Parameters |
|
|
336
352
|
| ---------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
337
|
-
| `mint_cdp` | Mint additional iAssets from an existing CDP (increases debt) | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, or
|
|
338
|
-
| `burn_cdp` | Burn iAssets to reduce CDP debt | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, or
|
|
353
|
+
| `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 |
|
|
354
|
+
| `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 |
|
|
339
355
|
|
|
340
356
|
### CDP Liquidation & Redemption Tools
|
|
341
357
|
|
|
@@ -357,7 +373,7 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
|
|
|
357
373
|
| Tool | Description | Parameters |
|
|
358
374
|
| ----------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
359
375
|
| `get_stability_pools` | Get the latest stability pool state for each iAsset | None |
|
|
360
|
-
| `get_stability_pool_accounts` | Get all open stability pool accounts, optionally filtered by iAsset | `asset?`: iUSD, iBTC, iETH, or
|
|
376
|
+
| `get_stability_pool_accounts` | Get all open stability pool accounts, optionally filtered by iAsset | `asset?`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
|
|
361
377
|
| `get_sp_account_by_owner` | Get stability pool accounts for specific owners | `owners`: array of payment key hashes or bech32 addresses |
|
|
362
378
|
|
|
363
379
|
### Staking Tools
|
|
@@ -412,19 +428,19 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
|
|
|
412
428
|
|
|
413
429
|
| Tool | Description | Parameters |
|
|
414
430
|
| ----------------------- | --------------------------------------------- | --------------------------------------------------------------- |
|
|
415
|
-
| `get_order_book` | Get open
|
|
416
|
-
| `get_redemption_orders` | Get redemption orders
|
|
417
|
-
| `get_redemption_queue` | Get
|
|
431
|
+
| `get_order_book` | Get open ROB (redemption order book) positions | `asset?`: iAsset filter; `owners?`: array of payment key hashes |
|
|
432
|
+
| `get_redemption_orders` | Get executed redemption orders | `asset?`: iAsset filter; `limit?`: max records (default 100) |
|
|
433
|
+
| `get_redemption_queue` | Get open ROB order-book entries for an iAsset | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
|
|
418
434
|
|
|
419
435
|
### ROB Write Tools
|
|
420
436
|
|
|
421
437
|
| Tool | Description | Parameters |
|
|
422
438
|
| ------------ | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
423
|
-
| `open_rob` | Open a new ROB position with ADA and a max price limit | `address`: bech32 address; `asset`: iAsset; `lovelacesAmount`: lovelace to deposit; `
|
|
439
|
+
| `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 |
|
|
424
440
|
| `cancel_rob` | Cancel an existing ROB position | `address`: bech32 address; `robTxHash`: ROB UTxO tx hash; `robOutputIndex`: output index |
|
|
425
|
-
| `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; `
|
|
441
|
+
| `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 |
|
|
426
442
|
| `claim_rob` | Claim received iAssets from an ROB position | `address`: bech32 address; `robTxHash`: ROB UTxO tx hash; `robOutputIndex`: output index |
|
|
427
|
-
| `redeem_rob` | Redeem iAssets against one or more ROB positions | `address`: bech32 address; `redemptionRobs`: array of `{txHash, outputIndex,
|
|
443
|
+
| `redeem_rob` | Redeem iAssets against one or more ROB positions | `address`: bech32 address; `asset`: iAsset; `redemptionRobs`: array of `{txHash, outputIndex, amount}` |
|
|
428
444
|
|
|
429
445
|
### DEX Proxy Tools
|
|
430
446
|
|
|
@@ -457,7 +473,7 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
|
|
|
457
473
|
| Tool | Description | Parameters |
|
|
458
474
|
| ------------------- | ----------------------------------------------------------------- | ----------------------------------- |
|
|
459
475
|
| `get_oracle_price` | On-chain price for an iAsset (OracleNft / Delisted / Pyth) | `asset` |
|
|
460
|
-
| `get_pyth_price` |
|
|
476
|
+
| `get_pyth_price` | Current Pyth price for an iAsset, plus its on-chain feed config | `asset` |
|
|
461
477
|
| `feed_price_oracle` | Feed a new price to an OracleNft-backed price oracle (admin) | `address`, `oracleTxHash`, price |
|
|
462
478
|
|
|
463
479
|
### Stableswap Tools (v3)
|
|
@@ -476,7 +492,8 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
|
|
|
476
492
|
| `BLOCKFROST_API_KEY` | For write ops | — | Blockfrost project ID for transaction building |
|
|
477
493
|
| `CARDANO_NETWORK` | No | `mainnet` | Cardano network: `mainnet`, `preprod`, or `preview` |
|
|
478
494
|
| `MCP_TRANSPORT` | No | `stdio` | Transport mode: `stdio` or `http` |
|
|
479
|
-
| `PORT` | No | `3000` | HTTP server port (only used when `MCP_TRANSPORT=http`)
|
|
495
|
+
| `PORT` | No | `3000` | HTTP server port (only used when `MCP_TRANSPORT=http`); `MCP_PORT` is accepted as an alias |
|
|
496
|
+
| `HOST` | No | `0.0.0.0` | HTTP bind address (only used when `MCP_TRANSPORT=http`); set `127.0.0.1` to bind locally only |
|
|
480
497
|
| `X402_PRIVATE_KEY` | No | — | EVM private key (`0x…`) of the payer wallet — enables auto-payment via split flow |
|
|
481
498
|
| `PAYMENT_SERVER` | No | `https://mcp.openmm.io` | Settlement worker / proxy URL |
|
|
482
499
|
| `X402_TESTNET` | No | `false` | Use Base Sepolia testnet |
|
|
@@ -507,7 +524,7 @@ When connected to an LLM agent, you can ask natural language questions like:
|
|
|
507
524
|
|
|
508
525
|
### Prerequisites
|
|
509
526
|
|
|
510
|
-
- Node.js >=
|
|
527
|
+
- Node.js >= 20 (the bundled `undici` requires the `File` global, added in Node 20)
|
|
511
528
|
- npm
|
|
512
529
|
|
|
513
530
|
### Setup
|
|
Binary file
|
package/dist/cli/setup.js
CHANGED
|
@@ -52,7 +52,7 @@ function getIndigoServerConfig() {
|
|
|
52
52
|
args: ["-y", "@indigoprotocol/indigo-mcp"],
|
|
53
53
|
env: {
|
|
54
54
|
PATH: `${nodePath}:/usr/local/bin:/usr/bin:/bin`,
|
|
55
|
-
INDEXER_URL: "https://analytics.indigoprotocol.io/api
|
|
55
|
+
INDEXER_URL: "https://analytics.indigoprotocol.io/api",
|
|
56
56
|
BLOCKFROST_API_KEY: ""
|
|
57
57
|
}
|
|
58
58
|
};
|
|
@@ -61,7 +61,7 @@ function getIndigoServerConfig() {
|
|
|
61
61
|
command: "npx",
|
|
62
62
|
args: ["-y", "@indigoprotocol/indigo-mcp"],
|
|
63
63
|
env: {
|
|
64
|
-
INDEXER_URL: "https://analytics.indigoprotocol.io/api
|
|
64
|
+
INDEXER_URL: "https://analytics.indigoprotocol.io/api",
|
|
65
65
|
BLOCKFROST_API_KEY: ""
|
|
66
66
|
}
|
|
67
67
|
};
|