@indigoprotocol/indigo-mcp 0.3.0 → 0.4.1

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 CHANGED
@@ -47,7 +47,7 @@ npx @indigoprotocol/cardano-skills
47
47
  ║ ██║ ╚═╝ ██║╚██████╗██║ ║
48
48
  ║ ╚═╝ ╚═╝ ╚═════╝╚═╝ ║
49
49
  ║ ║
50
- ║ 63 tools • 13 skills for Cardano DeFi ║
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
@@ -111,11 +111,17 @@ npx @indigoprotocol/indigo-mcp
111
111
 
112
112
  ### Docker
113
113
 
114
+ The image builds the server from source — no prior `pnpm build` needed, and no
115
+ dependency on any external build step:
116
+
114
117
  ```bash
115
118
  docker build -t indigo-mcp .
116
- docker run -i indigo-mcp
119
+ docker run -p 3000:3000 -e BLOCKFROST_API_KEY=your-key indigo-mcp
117
120
  ```
118
121
 
122
+ It runs the HTTP transport on port 3000 (`MCP_TRANSPORT=http` is baked in), which
123
+ is what the Fly deployment uses.
124
+
119
125
  ### HTTP Transport (Remote)
120
126
 
121
127
  The server supports HTTP transport for remote/hosted deployments:
@@ -129,6 +135,12 @@ This starts an HTTP server with:
129
135
  - `POST /mcp` — MCP endpoint (Streamable HTTP with SSE)
130
136
  - `GET /health` — Health check
131
137
 
138
+ Each client gets its own session: `initialize` returns an `Mcp-Session-Id` that
139
+ subsequent requests must send back. A client that restarts can simply
140
+ `initialize` again — existing sessions are unaffected and the server does not
141
+ need restarting. Bind address and port come from `HOST` and `PORT` (`MCP_PORT`
142
+ is accepted as an alias for `PORT`).
143
+
132
144
  ## Configuration
133
145
 
134
146
  > **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 +319,8 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
307
319
  | Tool | Description | Parameters |
308
320
  | ----------------- | ---------------------------------------------------- | ---------------------------------- |
309
321
  | `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 iSOL |
311
- | `get_asset_price` | Get the current price for a specific iAsset | `asset`: iUSD, iBTC, iETH, or iSOL |
322
+ | `get_asset` | Get details for a specific iAsset | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
323
+ | `get_asset_price` | Get the current price for a specific iAsset | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
312
324
  | `get_ada_price` | Get the current ADA price in USD | None |
313
325
  | `get_indy_price` | Get the current INDY token price in ADA and USD | None |
314
326
 
@@ -323,9 +335,19 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
323
335
 
324
336
  ### CDP Write Tools
325
337
 
338
+ > **Pyth-priced iAssets have a submission deadline.** Every iAsset is currently
339
+ > priced through Pyth, and the on-chain feed validator only accepts a transaction
340
+ > for **280 seconds** after the price update it embeds. Price-dependent write
341
+ > tools (`open_cdp`, `withdraw_cdp`, `mint_cdp`, `redeem_cdp`, `freeze_cdp`,
342
+ > `leverage_cdp`, `redeem_rob`) therefore return a `summary.pyth` block with the
343
+ > price, its timestamp and a `submitBefore` deadline. If signing takes longer
344
+ > than that — a hardware wallet, or a human approving in a browser — rebuild the
345
+ > transaction rather than submitting a stale one. A price update that has already
346
+ > expired is rejected at build time with a retry hint.
347
+
326
348
  | Tool | Description | Parameters |
327
349
  | -------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
328
- | `open_cdp` | Open a new CDP position (returns unsigned CBOR tx) | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, or iSOL; `collateralAmount`: lovelace; `mintAmount`: iAsset smallest unit |
350
+ | `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
351
  | `deposit_cdp` | Deposit additional collateral into a CDP | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index; `amount`: lovelace |
330
352
  | `withdraw_cdp` | Withdraw collateral from a CDP | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index; `amount`: lovelace |
331
353
  | `close_cdp` | Close a CDP and reclaim collateral | `address`: bech32 address; `asset`: iAsset; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: output index |
@@ -334,8 +356,8 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
334
356
 
335
357
  | Tool | Description | Parameters |
336
358
  | ---------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
337
- | `mint_cdp` | Mint additional iAssets from an existing CDP (increases debt) | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, or iSOL; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: CDP UTxO output index; `amount`: iAsset amount in smallest unit |
338
- | `burn_cdp` | Burn iAssets to reduce CDP debt | `address`: bech32 address; `asset`: iUSD, iBTC, iETH, or iSOL; `cdpTxHash`: CDP UTxO tx hash; `cdpOutputIndex`: CDP UTxO output index; `amount`: iAsset amount in smallest unit |
359
+ | `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 |
360
+ | `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
361
 
340
362
  ### CDP Liquidation & Redemption Tools
341
363
 
@@ -357,7 +379,7 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
357
379
  | Tool | Description | Parameters |
358
380
  | ----------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------- |
359
381
  | `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 iSOL |
382
+ | `get_stability_pool_accounts` | Get all open stability pool accounts, optionally filtered by iAsset | `asset?`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
361
383
  | `get_sp_account_by_owner` | Get stability pool accounts for specific owners | `owners`: array of payment key hashes or bech32 addresses |
362
384
 
363
385
  ### Staking Tools
@@ -412,19 +434,19 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
412
434
 
413
435
  | Tool | Description | Parameters |
414
436
  | ----------------------- | --------------------------------------------- | --------------------------------------------------------------- |
415
- | `get_order_book` | Get open limited redemption positions | `asset?`: iAsset filter; `owners?`: array of payment key hashes |
416
- | `get_redemption_orders` | Get redemption orders with optional filters | `timestamp?`: Unix ms; `in_range?`: filter by price range |
417
- | `get_redemption_queue` | Get aggregated redemption queue for an iAsset | `asset`: iUSD, iBTC, iETH, or iSOL |
437
+ | `get_order_book` | Get open ROB (redemption order book) positions | `asset?`: iAsset filter; `owners?`: array of payment key hashes |
438
+ | `get_redemption_orders` | Get executed redemption orders | `asset?`: iAsset filter; `limit?`: max records (default 100) |
439
+ | `get_redemption_queue` | Get open ROB order-book entries for an iAsset | `asset`: iUSD, iBTC, iETH, iSOL, iEUR, iJPY, or iADA |
418
440
 
419
441
  ### ROB Write Tools
420
442
 
421
443
  | Tool | Description | Parameters |
422
444
  | ------------ | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
423
- | `open_rob` | Open a new ROB position with ADA and a max price limit | `address`: bech32 address; `asset`: iAsset; `lovelacesAmount`: lovelace to deposit; `maxPrice`: on-chain integer string |
445
+ | `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
446
  | `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; `newMaxPrice?`: optional new max price |
447
+ | `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
448
  | `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, iAssetAmount}`; `priceOracleTxHash`; `priceOracleOutputIndex`; `iassetTxHash`; `iassetOutputIndex` |
449
+ | `redeem_rob` | Redeem iAssets against one or more ROB positions | `address`: bech32 address; `asset`: iAsset; `redemptionRobs`: array of `{txHash, outputIndex, amount}` |
428
450
 
429
451
  ### DEX Proxy Tools
430
452
 
@@ -457,7 +479,7 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
457
479
  | Tool | Description | Parameters |
458
480
  | ------------------- | ----------------------------------------------------------------- | ----------------------------------- |
459
481
  | `get_oracle_price` | On-chain price for an iAsset (OracleNft / Delisted / Pyth) | `asset` |
460
- | `get_pyth_price` | Read the Pyth price-feed config for an iAsset | `asset` |
482
+ | `get_pyth_price` | Current Pyth price for an iAsset, plus its on-chain feed config | `asset` |
461
483
  | `feed_price_oracle` | Feed a new price to an OracleNft-backed price oracle (admin) | `address`, `oracleTxHash`, price |
462
484
 
463
485
  ### Stableswap Tools (v3)
@@ -476,7 +498,8 @@ For any client that supports MCP over stdio, point it to the `npx @indigoprotoco
476
498
  | `BLOCKFROST_API_KEY` | For write ops | — | Blockfrost project ID for transaction building |
477
499
  | `CARDANO_NETWORK` | No | `mainnet` | Cardano network: `mainnet`, `preprod`, or `preview` |
478
500
  | `MCP_TRANSPORT` | No | `stdio` | Transport mode: `stdio` or `http` |
479
- | `PORT` | No | `3000` | HTTP server port (only used when `MCP_TRANSPORT=http`) |
501
+ | `PORT` | No | `3000` | HTTP server port (only used when `MCP_TRANSPORT=http`); `MCP_PORT` is accepted as an alias |
502
+ | `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
503
  | `X402_PRIVATE_KEY` | No | — | EVM private key (`0x…`) of the payer wallet — enables auto-payment via split flow |
481
504
  | `PAYMENT_SERVER` | No | `https://mcp.openmm.io` | Settlement worker / proxy URL |
482
505
  | `X402_TESTNET` | No | `false` | Use Base Sepolia testnet |
@@ -503,11 +526,34 @@ When connected to an LLM agent, you can ask natural language questions like:
503
526
  - "Get a Steelswap estimate for swapping 100 ADA to iUSD"
504
527
  - "What are the current DEX yields for iAsset pairs?"
505
528
 
529
+ ## Distribution
530
+
531
+ The server is published to three places, and they are not the same artifact.
532
+
533
+ | Target | Built by | Output | Published by |
534
+ |---|---|---|---|
535
+ | npm — `@indigoprotocol/indigo-mcp` | `scripts/build.sh` | `dist/` | CI, on a `v*` tag |
536
+ | [MCP Registry](https://registry.modelcontextprotocol.io) — `io.github.IndigoProtocol/indigo-mcp` | `server.json` | metadata only | CI, on a `v*` tag (GitHub OIDC — no token) |
537
+ | [Smithery](https://smithery.ai/server/@indigoprotocol/indigo-mcp) | `scripts/smithery-build.sh` | `.smithery/stdio/server.mcpb` | `pnpm smithery:publish`, manually |
538
+
539
+ The container image (`Dockerfile`) builds from source and is used by Fly and any
540
+ other container host. It does **not** consume `.smithery/` output — that path is
541
+ Smithery-specific.
542
+
543
+ ### Cutting a release
544
+
545
+ 1. Merge the version bump (`package.json`; `SERVER_VERSION` is read from it)
546
+ 2. `git tag vX.Y.Z && git push origin vX.Y.Z`
547
+ 3. CI publishes to npm, then to the MCP Registry (the registry verifies ownership
548
+ via the package's `mcpName` field, so npm has to go first)
549
+ 4. Verify against the registry, not the workflow: `npm view @indigoprotocol/indigo-mcp version`
550
+ 5. `fly deploy` for the hosted HTTP endpoint, and `pnpm smithery:publish` for Smithery
551
+
506
552
  ## Development
507
553
 
508
554
  ### Prerequisites
509
555
 
510
- - Node.js >= 18
556
+ - Node.js >= 20 (the bundled `undici` requires the `File` global, added in Node 20)
511
557
  - npm
512
558
 
513
559
  ### Setup
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/v1",
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/v1",
64
+ INDEXER_URL: "https://analytics.indigoprotocol.io/api",
65
65
  BLOCKFROST_API_KEY: ""
66
66
  }
67
67
  };