From 38dd6f9b660b28d3d2c6f0d42df03f072d6db246 Mon Sep 17 00:00:00 2001 From: "Manish Kumar (GrandFox)" Date: Sun, 11 Oct 2026 05:54:21 -0700 Subject: [PATCH 1/2] fix(mcp): add viem as direct dependency to resolve mppx peer import (#118) --- packages/mcp/README.md | 3 +++ packages/mcp/package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/mcp/README.md b/packages/mcp/README.md index 0557487..19c0b85 100644 --- a/packages/mcp/README.md +++ b/packages/mcp/README.md @@ -96,3 +96,6 @@ STELLAR_SECRET_KEY=S... AGENT_API_URL=http://localhost:3001 npx tsx src/index.ts ## License Apache-2.0 - see [LICENSE](https://github.com/nirium-protocol/nirium/blob/main/packages/mcp/LICENSE). +### Dependencies & Runtime Setup + +irium-mcp ships with iem configured as a direct runtime dependency, satisfying mppx's peer requirement out of the box and preventing ERR_MODULE_NOT_FOUND: viem crashes during startup. diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 04ad797..7924307 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -39,7 +39,7 @@ "@x402/fetch": "^2.17.0", "@x402/stellar": "^2.17.0", "mppx": "^0.6.31", - "zod": "^3.25.0" + "viem": "^2.21.0",`n "zod": "^3.25.0" }, "devDependencies": { "@types/node": "^22.0.0", From ac974e6e975c7bdfc8717eda53271ec46c93088a Mon Sep 17 00:00:00 2001 From: maxx-GENIUS Date: Wed, 14 Oct 2026 05:38:56 +0000 Subject: [PATCH 2/2] fix(mcp): resolve JSON parse error and pin viem to ^2.55.19 - Fix literal newline escape in packages/mcp/package.json - Pin viem range to ^2.55.19 matching SDK pinned version - Restore backtick formatting for nirium-mcp and viem in README.md Closes #118 --- packages/mcp/README.md | 10 +-- packages/mcp/package.json | 131 +++++++++++++++++++------------------- 2 files changed, 72 insertions(+), 69 deletions(-) diff --git a/packages/mcp/README.md b/packages/mcp/README.md index 19c0b85..eb1642c 100644 --- a/packages/mcp/README.md +++ b/packages/mcp/README.md @@ -1,6 +1,6 @@ # nirium-mcp -Model Context Protocol server for [Nirium](https://nirium.xyz) - exposes market data, autonomous treasury loop control, and x402/MPP paid endpoints to any MCP-compatible AI: Claude, GPT, Cursor, VS Code Copilot, and others. +Model Context Protocol server for [Nirium](https://nirium.xyz) - exposes market data, autonomous treasury loop control, and x402 paid endpoints (MPP tools are experimental) to any MCP-compatible AI: Claude, GPT, Cursor, VS Code Copilot, and others. Software-only. This server never holds funds - paid tools sign per-request payments from a Stellar wallet you control via `STELLAR_SECRET_KEY`. @@ -26,7 +26,7 @@ No install needed - run directly with `npx`, or add to your MCP client config. } ``` -`STELLAR_SECRET_KEY` and `NIRIUM_API_KEY` are optional - omit them and the free tools still work; paid (x402/MPP) and authenticated tools will tell you what's missing instead of failing silently. +`STELLAR_SECRET_KEY` and `NIRIUM_API_KEY` are optional - omit them and the free tools still work; paid x402 (MPP experimental) and authenticated tools will tell you what's missing instead of failing silently. ## Tools @@ -34,10 +34,10 @@ No install needed - run directly with `npx`, or add to your MCP client config. - `get_market_state` - XLM/USDC price, SDEX spread, base fee, Blend rate, CETES rate - `get_loop_status` - autonomous loop status, scan count, last AI decision - `execute_demo` - dry-run a strategy via real Soroban simulation, no funds moved -- `get_wallet_info` - show the configured x402/MPP wallet and enabled tools +- `get_wallet_info` - show the configured x402 (MPP experimental) wallet and enabled tools - `get_nodes` - list the execution nodes with live status, custody model and network - `anchor_audit_record` - anchor a hash (or a small JSON record) to IPFS, get back a CID -- `get_reporting_summary` - settled payouts, x402/MPP receipts and anchors for a period +- `get_reporting_summary` - settled payouts, x402 receipts and anchors for a period **Authenticated - requires `NIRIUM_API_KEY`** - `start_loop` - start the autonomous scanning loop @@ -96,6 +96,8 @@ STELLAR_SECRET_KEY=S... AGENT_API_URL=http://localhost:3001 npx tsx src/index.ts ## License Apache-2.0 - see [LICENSE](https://github.com/nirium-protocol/nirium/blob/main/packages/mcp/LICENSE). + ### Dependencies & Runtime Setup + irium-mcp ships with iem configured as a direct runtime dependency, satisfying mppx's peer requirement out of the box and preventing ERR_MODULE_NOT_FOUND: viem crashes during startup. diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 7924307..bf90ff6 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,65 +1,66 @@ -{ - "name": "nirium-mcp", - "version": "0.6.3", - "description": "Model Context Protocol server for Nirium - exposes market data, autonomous loop control, and x402/MPP paid signals to any MCP-compatible AI (Claude, GPT, Cursor, VS Code Copilot).", - "main": "dist/index.js", - "bin": { - "nirium-mcp": "dist/index.js" - }, - "homepage": "https://nirium.xyz", - "repository": { - "type": "git", - "url": "git+https://github.com/nirium-protocol/nirium.git", - "directory": "packages/mcp" - }, - "bugs": { - "url": "https://github.com/nirium-protocol/nirium/issues", - "email": "niriumprotocol@gmail.com" - }, - "author": { - "name": "Nirium Protocol", - "email": "niriumprotocol@gmail.com", - "url": "https://nirium.xyz" - }, - "files": [ - "dist", - "README.md" - ], - "scripts": { - "prepublishOnly": "npm run build", - "build": "tsc", - "start": "node dist/index.js", - "dev": "tsc --watch" - }, - "dependencies": { - "@modelcontextprotocol/sdk": "^1.27.1", - "@stellar/mpp": "^0.7.1", - "@stellar/stellar-sdk": "^14.0.0", - "@x402/core": "^2.17.0", - "@x402/fetch": "^2.17.0", - "@x402/stellar": "^2.17.0", - "mppx": "^0.6.31", - "viem": "^2.21.0",`n "zod": "^3.25.0" - }, - "devDependencies": { - "@types/node": "^22.0.0", - "tsx": "^4.19.0", - "typescript": "^5.7.0" - }, - "keywords": [ - "nirium", - "mcp", - "model-context-protocol", - "stellar", - "soroban", - "agent", - "autonomous", - "treasury", - "x402", - "mpp", - "agentic-payments", - "claude", - "llm-tools" - ], - "license": "Apache-2.0" -} +{ + "name": "nirium-mcp", + "version": "0.6.3", + "description": "Model Context Protocol server for Nirium - exposes market data, autonomous loop control, and x402 paid signals (MPP tools are experimental) to any MCP-compatible AI (Claude, GPT, Cursor, VS Code Copilot).", + "main": "dist/index.js", + "bin": { + "nirium-mcp": "dist/index.js" + }, + "homepage": "https://nirium.xyz", + "repository": { + "type": "git", + "url": "git+https://github.com/nirium-protocol/nirium.git", + "directory": "packages/mcp" + }, + "bugs": { + "url": "https://github.com/nirium-protocol/nirium/issues", + "email": "niriumprotocol@gmail.com" + }, + "author": { + "name": "Nirium Protocol", + "email": "niriumprotocol@gmail.com", + "url": "https://nirium.xyz" + }, + "files": [ + "dist", + "README.md" + ], + "scripts": { + "prepublishOnly": "npm run build", + "build": "tsc", + "start": "node dist/index.js", + "dev": "tsc --watch" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "^1.27.1", + "@stellar/mpp": "^0.7.1", + "@stellar/stellar-sdk": "^14.0.0", + "@x402/core": "^2.17.0", + "@x402/fetch": "^2.17.0", + "@x402/stellar": "^2.17.0", + "mppx": "^0.6.31", + "viem": "^2.55.19", + "zod": "^3.25.0" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "tsx": "^4.19.0", + "typescript": "^5.7.0" + }, + "keywords": [ + "nirium", + "mcp", + "model-context-protocol", + "stellar", + "soroban", + "agent", + "autonomous", + "treasury", + "x402", + "mpp", + "agentic-payments", + "claude", + "llm-tools" + ], + "license": "Apache-2.0" +} \ No newline at end of file