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
| Metric | Value |
| MCP Tools | 56 across 9 categories |
| MCP Resources | 10 (6 static docs + 4 live data feeds) |
| REST Endpoints | ~61 |
| Test Suites | 5 (225+ tests) |
| Agent SDK | BIP39/BIP32 HD wallet with pure Node.js crypto |
| AI Primitives | 5 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 │
└─────────────────────────────────────────────────────────────┘
| Category | Count | Examples |
| Blockchain | 8 | Chain info, balance, UTXOs, history, broadcast, mempool, block, headers |
| Glyph | 9 | Token info, search, metadata, history, types, holders, popular |
| dMint | 4 | Contracts, algorithms, profitability, status |
| WAVE | 5 | Resolve names, availability, subdomains, records, reverse lookup |
| Swap | 2 | Open orders, trade history |
| Utility | 3 | Protocol info, address validation, health check |
| Wallet | 3 | BIP39 create/restore, tx decode |
| Script | 2 | Decode script, compile script |
| AI Primitives | 9 | Inference proofs, agent identity, micropayment channels, data marketplace |
| Agent Enhancement | 7 | Build tx, estimate fee, send batch, watch address, derive address, burn token, get token UTXOs |
| Token Operations | 4 | Send RXD, create FT, create NFT, transfer token |
4. MCP Resources (10)
Static Documentation (6)
| URI | Description |
radiant://knowledge-base | Comprehensive Radiant technical knowledge base (701 lines) |
radiant://opcodes | Full opcode reference including V2 opcodes |
radiant://glyph-protocol | Glyph v2 token standard reference |
radiant://electrumx-api | ElectrumX JSON-RPC API documentation |
radiant://wave-protocol | WAVE naming system specification |
radiant://ai-contracts | AI primitive contract documentation |
Live Data Feeds (4)
| URI | Description |
radiant://chain/status | Current chain height, hashrate, difficulty |
radiant://chain/mempool | Mempool size and fee estimates |
radiant://tokens/popular | Top fungible and non-fungible tokens |
radiant://network/peers | Connected 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
| Feature | Implementation |
| BIP39 Mnemonic | 2048-word English wordlist, PBKDF2-HMAC-SHA512 (2048 rounds) |
| BIP32 HD Keys | HMAC-SHA512 chain code derivation, hardened child keys |
| Key Format | secp256k1 compressed public keys (33 bytes) |
| Address Format | Base58check P2PKH (prefix 0x00 mainnet, 0x6f testnet) |
| Signing | ECDSA with secp256k1 via Node.js crypto |
7. AI-Native Primitives
Five RadiantScript smart contracts provide blockchain-native AI capabilities:
| Contract | Purpose | File |
| AgentIdentity | On-chain AI agent identity registration with model hash verification | contracts/AgentIdentity.rxd |
| InferenceProof | Timestamped proof that an AI model produced a specific output | contracts/InferenceProof.rxd |
| MicropaymentChannel | Payment channels for per-inference billing between agents | contracts/MicropaymentChannel.rxd |
| DataMarketplace | Buy/sell datasets with hash-locked delivery and escrow | contracts/DataMarketplace.rxd |
| ReputationToken | Soulbound reputation NFTs for AI agents based on performance | contracts/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:
- Network Overview & Parameters
- UTXO Model & Transaction Structure
- Script System & Opcodes
- Reference System (Induction Proofs)
- Glyph Token Protocol
- WAVE Naming System
- ElectrumX API Reference
- radiantjs SDK Usage
- Mining & Consensus
- AI Integration Patterns
- Smart Contract Examples
- V2 Hard Fork Opcodes
- 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
| Variable | Default | Description |
ELECTRUMX_HOST | electrumx.radiant4people.com | ElectrumX server hostname |
ELECTRUMX_PORT | 50012 | ElectrumX server port |
ELECTRUMX_SSL | true | Use SSL/TLS connection |
REST_PORT | 3080 | REST API listen port |
AGENT_MNEMONIC | (none) | BIP39 mnemonic for agent wallet |
10. Test Coverage
| Suite | Tests | Description |
| Smoke | 66 | All 56 tools + 10 resources register correctly |
| Primitives | 47 | Agent wallet, BIP39, address derivation, signing |
| Compiler | 33 | RadiantScript compilation integration |
| Tx-Builder | 73 | Transaction building, fee estimation, batch send, burn, token UTXOs |
| Live | 6+ | 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
| Item | Status | Blocker |
| Auto-generated Python/Go/Rust clients | Deferred | OpenAPI spec ready, generation is mechanical |
| npm publish | Deferred | Needs npm publish --access public |
| WebSocket subscriptions in REST | Planned | None |
| Token transfer with UTXO management | Implemented | — |
Enhancement Opportunities
- Multi-agent coordination via on-chain messaging
- Streaming inference proof verification
- Cross-chain bridge tools
- Advanced UTXO selection strategies
- GPU-accelerated hash verification for AI agents
Version History
| Version | Tools | Key Additions |
| 1.0.0 | 43 | Initial release: blockchain, glyph, dMint, WAVE, swap, utility, wallet, AI primitives |
| 1.1.0 | 44 | decode_script, tokens/popular resource, Swagger UI, SSE transport |
| 1.2.0 | 45 | compile_script (RadiantScript integration) |
| 1.3.0 | 49 | send_rxd, create_ft, create_nft, transfer_token |
| 1.4.0 | 56 | 7 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.