LIVE
Nirium← Home
Package + API + MCP

Build on
Nirium

B2B Infrastructure: TypeScript package, 86 REST endpoints, MCP server for Claude/Cursor, and native support for x402 + MPP micropayments.

bash
npm install nirium
Non-Custodial
Institutional Grade
SCF INSTAWARD
COC COMPLIANT

Provisioning: 5 Lines

Autonomous corporate rebalancing (USDC to CETES) in production.

typescript
import { Agent } from "nirium"; const agent = new Agent({ apiKey: process.env.NIRIUM_API_KEY, baseUrl: "https://nirium-agent.fly.dev", }); // Live market data — rates attributed to their source const market = await agent.getMarket(); // The node catalog: what runs, on which network const nodes = await agent.getNodes(); // Anchor evidence to IPFS and get a verifiable CID back const { cid } = await agent.anchorAuditRecord({ hash: "<sha256>" });

B2B Micropayments for Agents

x402 for API-level atomic payments. MPP Charge for per-request settlement without an external facilitator.

x402 — Atomic Per-call Payment

Linux Foundation Standard

typescript
import { Agent } from "nirium"; const agent = new Agent({ baseUrl: "https://nirium-agent-mainnet.fly.dev" }); // PAY for someone else's API. The 402, the signature and the retry // happen underneath — you just await a fetch. agent.initX402({ secretKey: process.env.STELLAR_SECRET_KEY, // or { signer } from a wallet network: "stellar:pubnet", }); const res = await agent.x402Fetch( "https://nirium-agent-mainnet.fly.dev/api/v1/premium/market", // $0.05 USDC ); const data = await res.json(); // ───────────────────────────────────────────────────────────── // CHARGE for YOUR OWN API. Same rail, other side of the counter. // Funds go payer → you. They never touch Nirium. // Third-party facilitator use is invite-only while legal review closes — // same gate as Treasury and Payouts. Request access before integrating. import { x402Serve } from "nirium"; app.use("/premium", x402Serve({ payTo: "G...", // your Stellar address routes: { "GET /signals": "$0.02" }, facilitatorApiKey: process.env.X402_FACILITATOR_API_KEY, }));
No CustodianAtomic On-chain

Pay per request

The same wallet that signed you in can pay for an API call. $0.02 USDC, no card, no subscription — and no XLM: Pollar sponsors the account reserve and the x402 facilitator sponsors the network fee.

MPP — Corporate Settlement

Stripe/Tempo Spec

typescript
import { Agent } from "nirium"; const agent = new Agent({ baseUrl: "https://nirium-agent-mainnet.fly.dev" }); // MPP Charge: the client signs a full USDC transfer inside each request. // No external facilitator — the server validates by simulation and submits. agent.initMpp({ secretKey: process.env.STELLAR_SECRET_KEY, network: "stellar:pubnet", }); // $0.05 USDC — charges and delivers on mainnet const res = await agent.mppFetch( "https://nirium-agent-mainnet.fly.dev/api/v1/mpp/market", ); // Note: /signals and /execute are testnet-only. Signals come from the // autonomous loop and execution needs a signing key; the mainnet box has // neither by design, so it answers 501 without charging you.
Balance ReturnedIdeal for Agents
EndpointPriceNetwork
GET /api/v1/premium/signals$0.02Testnet onlyneeds the autonomous loop, disabled on the mainnet box
GET /api/v1/premium/market$0.05Mainnet + testnet
POST /api/v1/premium/execute$0.25Testnet onlyneeds a signing key the mainnet box deliberately does not hold
GET /api/v1/mpp/signals$0.02Testnet onlyneeds the autonomous loop, disabled on the mainnet box
GET /api/v1/mpp/market$0.05Mainnet + testnet
POST /api/v1/mpp/execute$0.25Testnet onlyneeds a signing key the mainnet box deliberately does not hold
Featurex402MPP ChargeMPP Channel
On-chain tx per call
Requires SaaS facilitator
Institution needs XLMOpt.
Optimized forRapid IntegrationNative B2B P2PHigh-Freq Settlement

The table compares the three protocols. Nirium runs x402 and MPP Charge today, on testnet and mainnet. MPP Channel requires a funded on-chain channel contract, so it stays behind the same external-audit gate as the treasury vault — the endpoints exist and report channel mode as disabled.

Console Integration (MCP)

MCP Server
Claude & Cursor

Connect your Claude Desktop or Cursor instance to your infrastructure in 2 minutes. Enable your node to manage corporate capital securely and auditably.

json
// Claude Desktop config (~/.claude/claude_desktop_config.json) { "mcpServers": { "nirium": { "command": "npx", "args": ["-y", "nirium-mcp"], "env": { "NIRIUM_API_KEY": "your_key_here" } } } }

11 Base Operations

get_market_state

Get live tickers: XLM/USDC price, base fee, Blend supply rate

get_loop_status

Check autonomous loop status, scan count, and uptime

start_loop

Start the autonomous market scanning loop (Auth)

stop_loop

Stop the autonomous market scanning loop (Auth)

execute_demo

Simulate a strategy via Soroban dry-run (Free)

get_premium_signals

Market signals from the autonomous loop, testnet only — factual data, not a recommendation ($0.02 USDC)

get_premium_market

Market state with reference rates attributed to their source, via x402 ($0.05 USDC)

execute_paid_strategy

Execute strategy on-chain via x402, testnet only — needs a signing key the mainnet box does not hold ($0.25 USDC)

+ 3 MORE TOOLS IN DOCUMENTATION
Live Protocol Surface v0.11.0

Telemetry Hub

86 Endpoints architected strictly for institutional autonomous routing and forensic export (for operators subject to Fintech Law).

Core B2B Infrastructure

GET
Live
/health

Liveness probe

GET
Live
/api/info

Agent metadata, network and version

GET
Live
/api/tickers

CETES + Blend reference rates

GET
Live
/api/nodes

Execution Node catalog (status + custody)

GET
Live
/api/loop/status

Autonomous loop state + last decision

POST
Live
/api/execute-demo

Run a demo rebalance — no key required

POST
Live
/api/auth/token

Exchange credentials for a JWT

POST
Live
/api/auth/keys

Issue an API key (also GET / DELETE)

Compliance Explorer

Auth & Security

POST/api/auth/token
CORE
POST/api/auth/keys
CORE
GET/api/health
LIVE
POST/api/authenticate
LIVE

Treasury Engine

POST/api/loop/start
PREMIUM
POST/api/loop/stop
CORE
POST/api/execute
PREMIUM
GET/api/loop/status
LIVE

Compliance & IPFS

POST/api/audit/log
LIVE
GET/api/audit/info
LIVE
GET/api/reporting/summary
LIVE
GET/api/reporting/export
LIVE

Market Intelligence

GET/api/market
LIVE
GET/api/tickers
LIVE
GET/api/strategies
LIVE
GET/api/signals/recent
LIVE

Disbursement & Nodes

GET/api/nodes
LIVE
POST/api/payroll/run
CORE
POST/api/payroll/submit
CORE
POST/api/payroll/onboard
CORE
+4
+8
+12
+16

+18 Modular subsystems for Institutional Orchestration

Soroban Mainnet Readiness

Hardened Execution Nodes

Non-custodial Soroban smart contracts deployed on Stellar Testnet.

NiriumVaultCore treasury: vaults, agent delegation, strategy execution, 2-of-3 multisig
CBTWMZCG3P72EHFAQ4ZLSEBIOFYJC244H5J6DHZIJ56FHFWJ2CFAWSZU
NiriumProtocolUnified registry: ELO reputation, strategy marketplace, agent scoring, skill gate
CC2TU5BDTKTPRRRQPEF77I54XYHFQ25XGIRO2TCWKSR7NRJDFR5L5NR5
CETES (Mexican Bonds)Government Bond Asset (Etherfuse)
CC72F57YTPX76HAA64JQOEGHQAPSADQWSY5DWVBR66JINPFDLNCQYHIC
USDC (Stellar Testnet SAC)Primary liquidity asset
CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA

Infrastructure Requirements?

Get access to the provisioning endpoints in Sandbox.