Radiant AI Integration Strategy

Version 2.0 Last Updated: February 2026 Status: Implementation Reference

1. Executive Summary

The radiant-mcp-server package makes the Radiant blockchain natively accessible to AI coding assistants (Windsurf Cascade, Claude Desktop, Cursor) and any HTTP client via a comprehensive REST API. It was built in 6 implementation sessions across February 2026.

Key Metrics

MetricValue
MCP Tools56 across 9 categories
MCP Resources10 (6 static docs + 4 live data feeds)
REST Endpoints~61
Test Suites5 (225+ tests)
Agent SDKBIP39/BIP32 HD wallet with pure Node.js crypto
AI Primitives5 smart contracts for agent identity, inference proofs, micropayments, data marketplace, reputation

Repository: github.com/Radiant-Core/radiant-mcp-server


2. Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                    AI CLIENTS                                │
│  Windsurf Cascade │ Claude Desktop │ Cursor │ HTTP clients   │
└────────┬──────────┴────────┬───────┴────────┴────────┬──────┘
         │ MCP (stdio)       │ MCP (SSE)               │ REST
┌────────▼──────────────────▼──────────────────────────▼──────┐
│                  radiant-mcp-server                          │
│                                                              │
│  ┌──────────┐  ┌──────────┐  ┌───────────┐  ┌───────────┐  │
│  │ 56 Tools │  │10 Resrces│  │ REST API  │  │ Agent SDK │  │
│  └────┬─────┘  └────┬─────┘  └─────┬─────┘  └─────┬─────┘  │
│       └──────────────┴──────────────┴──────────────┘        │
│                         ▼                                    │
│  ┌──────────────────────────────────────────────────────┐   │
│  │              ElectrumX Client (WSS)                   │   │
│  └──────────────────────┬───────────────────────────────┘   │
└─────────────────────────┼───────────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────────┐
│              ElectrumX Server → Radiant Core Node            │
└─────────────────────────────────────────────────────────────┘

3. MCP Tools (56)

CategoryCountExamples
Blockchain8Chain info, balance, UTXOs, history, broadcast, mempool, block, headers
Glyph9Token info, search, metadata, history, types, holders, popular
dMint4Contracts, algorithms, profitability, status
WAVE5Resolve names, availability, subdomains, records, reverse lookup
Swap2Open orders, trade history
Utility3Protocol info, address validation, health check
Wallet3BIP39 create/restore, tx decode
Script2Decode script, compile script
AI Primitives9Inference proofs, agent identity, micropayment channels, data marketplace
Agent Enhancement7Build tx, estimate fee, send batch, watch address, derive address, burn token, get token UTXOs
Token Operations4Send RXD, create FT, create NFT, transfer token

4. MCP Resources (10)

Static Documentation (6)

URIDescription
radiant://knowledge-baseComprehensive Radiant technical knowledge base (701 lines)
radiant://opcodesFull opcode reference including V2 opcodes
radiant://glyph-protocolGlyph v2 token standard reference
radiant://electrumx-apiElectrumX JSON-RPC API documentation
radiant://wave-protocolWAVE naming system specification
radiant://ai-contractsAI primitive contract documentation

Live Data Feeds (4)

URIDescription
radiant://chain/statusCurrent chain height, hashrate, difficulty
radiant://chain/mempoolMempool size and fee estimates
radiant://tokens/popularTop fungible and non-fungible tokens
radiant://network/peersConnected ElectrumX peer count

5. REST API (~61 endpoints)

All tools are also exposed as HTTP endpoints at http://localhost:3080/api. Full OpenAPI 3.1 specification available at docs/openapi.yaml.

Key Endpoints

# Blockchain
GET  /api/chain
GET  /api/address/:address/balance
GET  /api/address/:address/utxos
GET  /api/address/:address/history
POST /api/tx/broadcast
GET  /api/block/:hashOrHeight

# Glyph Tokens
GET  /api/token/:ref/metadata
GET  /api/token/:ref/history
GET  /api/tokens/search?q=...
GET  /api/tokens/popular

# Agent Enhancement
POST /api/tx/build
GET  /api/tx/estimate-fee?inputs=N&outputs=N
POST /api/tx/send-batch
POST /api/address/:address/watch
POST /api/wallet/derive
POST /api/token/burn
GET  /api/address/:address/token-utxos

# Wallet
POST /api/wallet/create
POST /api/wallet/restore
POST /api/script/decode
POST /api/script/compile

# Swagger UI
GET  /api/docs/swagger
GET  /api/docs/openapi.json

Starting the REST Server

ELECTRUMX_HOST=electrumx.radiant4people.com \
ELECTRUMX_PORT=50012 \
ELECTRUMX_SSL=true \
node dist/rest.js

6. Agent SDK (BIP39/BIP32 Wallet)

The package includes a full HD wallet implementation using only Node.js built-in crypto module — no external dependencies.

import { AgentWallet } from './wallet';

// Generate with BIP39 mnemonic (12-24 words)
const { wallet, mnemonic } = AgentWallet.generateWithMnemonic('mainnet', 12);
console.log(wallet.address);   // Base58check P2PKH
console.log(mnemonic);         // 12 recovery words

// Restore from mnemonic
const restored = AgentWallet.fromMnemonic(mnemonic, 'mainnet');

// Derive sub-wallets (different paths = isolated wallets)
const subWallet = AgentWallet.fromMnemonic(mnemonic, 'mainnet', '', "m/44'/0'/1'/0/0");

// Sign a transaction
const signature = wallet.sign(txHash);

Implementation Details

FeatureImplementation
BIP39 Mnemonic2048-word English wordlist, PBKDF2-HMAC-SHA512 (2048 rounds)
BIP32 HD KeysHMAC-SHA512 chain code derivation, hardened child keys
Key Formatsecp256k1 compressed public keys (33 bytes)
Address FormatBase58check P2PKH (prefix 0x00 mainnet, 0x6f testnet)
SigningECDSA with secp256k1 via Node.js crypto

7. AI-Native Primitives

Five RadiantScript smart contracts provide blockchain-native AI capabilities:

ContractPurposeFile
AgentIdentityOn-chain AI agent identity registration with model hash verificationcontracts/AgentIdentity.rxd
InferenceProofTimestamped proof that an AI model produced a specific outputcontracts/InferenceProof.rxd
MicropaymentChannelPayment channels for per-inference billing between agentscontracts/MicropaymentChannel.rxd
DataMarketplaceBuy/sell datasets with hash-locked delivery and escrowcontracts/DataMarketplace.rxd
ReputationTokenSoulbound reputation NFTs for AI agents based on performancecontracts/ReputationToken.rxd

Example: Inference Proof

// An AI agent can prove it produced a specific output
const proof = await mcpClient.call('radiant_create_inference_proof', {
  model_hash: 'sha256_of_model_weights',
  input_hash: 'sha256_of_prompt',
  output_hash: 'sha256_of_response',
  timestamp: Date.now()
});
// Returns: { txid, proofRef, onChainTimestamp }

8. Knowledge Base

The radiant://knowledge-base resource provides a comprehensive 701-line technical reference covering 13 sections:

  1. Network Overview & Parameters
  2. UTXO Model & Transaction Structure
  3. Script System & Opcodes
  4. Reference System (Induction Proofs)
  5. Glyph Token Protocol
  6. WAVE Naming System
  7. ElectrumX API Reference
  8. radiantjs SDK Usage
  9. Mining & Consensus
  10. AI Integration Patterns
  11. Smart Contract Examples
  12. V2 Hard Fork Opcodes
  13. Common Patterns & Best Practices

This knowledge base is injected as context when an AI agent connects, giving it comprehensive understanding of the Radiant blockchain without requiring additional documentation lookups.


9. Setup & Configuration

MCP Configuration (stdio transport)

{
  "mcpServers": {
    "radiant": {
      "command": "npx",
      "args": ["radiant-mcp-server"],
      "env": {
        "ELECTRUMX_HOST": "electrumx.radiant4people.com",
        "ELECTRUMX_PORT": "50012",
        "ELECTRUMX_SSL": "true"
      }
    }
  }
}

SSE Transport

# Start SSE server for web-based AI clients
npx radiant-mcp-sse

# Connect via:
# GET  http://localhost:3080/sse       (event stream)
# POST http://localhost:3080/message   (send messages)

Environment Variables

VariableDefaultDescription
ELECTRUMX_HOSTelectrumx.radiant4people.comElectrumX server hostname
ELECTRUMX_PORT50012ElectrumX server port
ELECTRUMX_SSLtrueUse SSL/TLS connection
REST_PORT3080REST API listen port
AGENT_MNEMONIC(none)BIP39 mnemonic for agent wallet

10. Test Coverage

SuiteTestsDescription
Smoke66All 56 tools + 10 resources register correctly
Primitives47Agent wallet, BIP39, address derivation, signing
Compiler33RadiantScript compilation integration
Tx-Builder73Transaction building, fee estimation, batch send, burn, token UTXOs
Live6+Real ElectrumX connection tests (requires network)
# Run all tests
npm test

# Run specific suite
npm test -- --grep "smoke"
npm test -- --grep "primitives"
npm test -- --grep "tx-builder"

11. Future Work

Deferred Items

ItemStatusBlocker
Auto-generated Python/Go/Rust clientsDeferredOpenAPI spec ready, generation is mechanical
npm publishDeferredNeeds npm publish --access public
WebSocket subscriptions in RESTPlannedNone
Token transfer with UTXO managementImplemented

Enhancement Opportunities


Version History

VersionToolsKey Additions
1.0.043Initial release: blockchain, glyph, dMint, WAVE, swap, utility, wallet, AI primitives
1.1.044decode_script, tokens/popular resource, Swagger UI, SSE transport
1.2.045compile_script (RadiantScript integration)
1.3.049send_rxd, create_ft, create_nft, transfer_token
1.4.0567 agent enhancement tools: build_tx, estimate_fee, send_batch, watch_address, derive_address, burn_token, get_token_utxos

For the full implementation details, see the radiant-mcp-server repository.