xahau-mcp
Provides tools for interacting with the Xahau network (a fork of the XRP Ledger), including running Hook WebAssembly bytecode, static analysis of Hooks, decoding transactions and ledger state, building unsigned transactions, and analyzing governance and economics.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xahau-mcprun hook_report on the hook with hash abc123"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
xahau-mcp
A Model Context Protocol server for the Xahau network with two firsts: it runs a Hook's real WebAssembly bytecode in a local VM (no xahaud node required), and it runs a Hooks-specific static-analysis / security rule engine over it — both fully offline. Around that core it adds read-only ledger access, a Xahau-aware binary codec, an instruction-count fee estimate, network-reward math, governance helpers, and unsigned-transaction builders.
Xahau is the XRPL fork whose flagship feature is Hooks — small on-ledger WebAssembly smart contracts. There was no MCP for Xahau and no static analyzer for Hooks; this is both.
Why it's useful
Point any MCP-capable agent (Claude, etc.) at this server and it can:
Run a Hook without deploying it —
execute_hookinstantiates the real CreateCode WASM in a local VM, supplies the Hook API over a simulated transaction + ledger state, and reports the actualaccept/rollbackdecision, return code/string, state writes, emitted transactions and a call trace. The first dev-accessible Hook simulator that needs noxahaudnode.Audit a Hook before it's installed — paste the CreateCode WASM (or an on-ledger hook hash) and get SARIF-lite findings: missing
accept/rollbackexit, unguarded loops (_g), unknownenvimports, dangerousHookGrants, over-broadHookOn, and more.Decode the cryptic
HookOnbitmap in both directions — the 256-bit, inverted, active-low mask (with the active-high SetHook bit) is easy to get wrong; here it's verified and round-trip-tested.Read Xahau ledger state — accounts, installed hooks, hook definitions, hook state, transactions (with
HookExecutionsmetadata), ledgers.Build unsigned transactions (SetHook, ClaimReward, Payment) with an automatic security preflight — returned unsigned, to be signed offline.
Related MCP server: Foundry MCP Server
Safety posture
Read-only toward the network. There is no
submitand nosignanywhere in this server.No key custody. Builder tools never accept a secret/seed and always return an unsigned transaction plus instructions to sign offline (e.g. with xaman or
xrpl-accountlib). They default to testnet.Honest fidelity.
execute_hookruns the real bytecode against a simulated environment. The VM implements a large slice of the 78-function Hook API — the full XFL float API (verified againstfloat_one), the slot table + STObject subfield extraction (slot_subfield/sto_subfield, byte-exact against real txns), state,otxn_*/hook_*,util_accid/util_raddr/util_verify/util_sha512h, and more. STObject mutation (sto_emplace/erase/validate),util_keylet(account + hook verified against live ledger indexes; offer/escrow/check/ticket/signers canonical + fail-safe), andslot_setwith async pre-resolve (execute_hook resolveKeylets:truefetches the ledger objects the hook reads and re-runs) are now supported. What still can't be faithful is honestly recorded: unverified keylet subtypes,meta_slot, and other un-modelled calls return the realNOT_IMPLEMENTEDcode, are listed inunsupportedCalls, and mark the rundegraded— never faked. The VM models the guard budget (_genforces each guard's declaredmaxiter→GUARD_VIOLATION), and reportsstateApplied(state writes commit only onaccept, discarded onrollback). It is not a consensus-faithfulxahaudreplica — it has no fee/fuel metering beyond guards, XFL math truncates rather than round-half-up (sofloat_mulratio's round-up flag and last-significant-digit results can differ), value-level math is verified only where tested, and a pathological unguarded infinite loop can hang the run; always confirm financial/resource hooks on testnet.hook_dry_runisSTATIC_ONLY,compute_rewardisDOCUMENTED_MODEL,estimate_hook_feeisESTIMATE.Resources & prompts. Beyond tools, the server exposes MCP resources (
xahau://rules,xahau://hook-api,xahau://tx-types) and guided prompts (audit_hook,simulate_hook,explain_hook) so agents can pull reference data and run the common workflows directly.
Tools
Hook intelligence (offline — the core)
Tool | Purpose |
| Run the real Hook bytecode in a local VM against a simulated tx/state → actual accept/rollback, return code, state writes, emits, trace ( |
| Differential fuzzing: sweep many generated transactions through the VM to map the hook's accept/rollback decision boundary (which tx types / amounts it accepts vs rejects). |
| One-call full report: structure + plain-English classification + security findings + fee. |
| Infer in plain English what a hook does (firewall/emitter/stateful/financial/…). |
| Compare two hook versions — API/HookOn/size deltas + newly-gained sensitive capabilities. |
| Generate a starter Hook in C for an intent (firewall/payment-limit/state-counter/…) — then verify with analyze/execute. |
| Run the static-analysis rule engine over a hook → SARIF-lite findings. |
| Pull every hook on an account and analyze all of them. |
| Parse CreateCode WASM: imports, exports ( |
| Byte size (SetHook fee) + static instruction count (complexity proxy), |
|
|
| Enumerate analyzer rules · look up a Hook API function's role & hazards. |
Codec / decode (offline)
Tool | Purpose |
| HookOn bitmap ⇄ transaction-type list. |
| A SetHook tx → its hook definitions, HookOn decoded. |
| Xahau tx blob ⇄ JSON (unsigned). |
| URIToken ID validation · XAH⇄drops. |
| Decode an Import/Burn2Mint XPOP → source ledger, inner burn tx, burned drops, UNL validators. |
| Validate classic/X-address (type, account-id, tag) · encode/decode X-addresses. |
| 3-char ISO ⇄ 160-bit currency · Ripple-time ⇄ Unix/ISO. |
| Decode native drops / 8-byte / 48-byte issued STAmount / amount object → value+currency+issuer. |
| Decode a Xaman txjson or tx_blob → plain-English "what you authorize" + safety warnings. |
Ledger (read-only RPC)
Tool | Purpose |
| Node/account reads. |
| Hook reads. |
| Tx (with |
| Trustlines · DEX offers · URITokens (NFTs, URI decoded). |
Economics / governance
Tool | Purpose |
| Project claimable XAH network reward ( |
| Grade an account for quantum (HNDL) readiness — master-key/regular-key/multisig + hooks → score, tier, recommendations (with a Hook/PQC angle). |
| Genesis governance constants + live read · Burn2Mint classification. |
Unsigned builders (no keys, testnet-default)
Tool | Purpose |
| UNSIGNED SetHook with automatic |
| UNSIGNED ClaimReward · Import/B2M · Payment. |
| Autofill Sequence/Fee/LastLedgerSequence/NetworkID from the live network → ready to sign offline (never signs). |
Install
Install straight from GitHub — no npm-registry account needed; it builds on install:
npm install -g github:Hugegreencandle/xahau-mcpOr clone and build:
git clone https://github.com/Hugegreencandle/xahau-mcp && cd xahau-mcp
npm install # the `prepare` script compiles dist/ automatically
npm run smoke # health check + a live mainnet read
npm test # ~115 tests (offline)Also published to GitHub Packages as @hugegreencandle/xahau-mcp. GitHub Packages requires auth even for public installs, so add to your .npmrc:
@hugegreencandle:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN # token with read:packagesthen npm install -g @hugegreencandle/xahau-mcp. (The github: install above needs no auth and is simpler.)
Add to an MCP client (e.g. Claude Code / Desktop):
{ "mcpServers": { "xahau": { "command": "node", "args": ["/path/to/xahau-mcp/dist/index.js"] } } }Security
Designed defensively and reviewed (npm audit + a danger-surface pass):
Read-only & no key custody — no
sign/submitanywhere; builder tools never accept a secret and only emit unsigned transactions to sign offline.No code-exec surface — no
eval/Function, nochild_process/shell, no filesystem writes, no dynamicrequire. RPCfetchonly ever hits the fixed endpoints indata/endpoints.json(or yourXAHAU_RPC_URLSoverride) — never a URL built from tool input, so no SSRF.Untrusted Hook WASM is sandboxed —
execute_hook/fuzz_hookrun hook bytecode in Node's WebAssembly engine, which has no syscall/fs/network access; a hook can only call the in-memory JS Hook-API shims, with bounds-checked memory reads/writes.Known limits (DoS-of-self, not RCE/exfil): the VM has no fuel metering beyond guards, so a pathological unguarded infinite-loop hook can hang a single run — just cancel it. Tool output is data, not instructions (treat it as such, as with any MCP).
Dependencies:
npm auditreports only low-severity advisories transitively underxrpl-accountlib's signing libraries (elliptic/bip32/tiny-secp256k1) — code paths this server never calls (it uses only the binary codec).
How it works
No heavy deps. Three runtime deps:
@modelcontextprotocol/sdk,zod, andxrpl-accountlib(used only for the Xahau-aware binary codec; its signing surface is never called). RPC is plainfetch; the WASM reader is hand-rolled and zero-dep; the VM uses Node's built-inWebAssemblyengine to run the bytecode with a JS Hook API shim — no WASM toolchain or native deps.Real data, regenerable.
data/is built from a live Xahau node'sserver_definitionsand the canonical Hook API list (Xahau/hooks-rsc/extern.h) vianpm run fetch:all. The 78-function Hook API catalog carries per-function hazard metadata that drives the analyzer.HookOn semantics are verified against the Xahau docs: 256-bit, bit n = tx type n, inverted/active-low (set = does not fire), with bit 22 (SetHook) active-high.
License
MIT © 2026 Dane Brown. Not affiliated with XRPL Labs or the Xahau project. Analyzer findings are heuristic guidance, not a security guarantee — always test on testnet and review hooks independently before mainnet use.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hugegreencandle/xahau-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server