
hugegreencandle/xahau-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
First MCP for the Xahau network — offline Hook intelligence (WASM inspection + a Hooks-specific static-analysis rule engine), read-only ledger/codec/governance tools, and unsigned-tx builders.
Обзор
A Model Context Protocol server for the with two firsts: it (no xahaud node required), and it runs a 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 — small on-ledger WebAssembly smart contracts. There was no MCP for Xahau and no static analyzer for Hooks; this is both. Three open-source tools, one workflow: xahau-mcp is the stage. Point any MCP-capable agent (Claude, etc.) at this server and it can: - — simulate_transaction is a pre-sign : every hook an unsigned transaction would trigger runs as real bytecode against live ledger state, with per-hook accept/rollback, decoded emitted transactions, simulated state writes and labeled static engine preflights.
README
Показан фрагмент оригинального README. Открыть оригинал.
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.
The trifecta — safe Hooks, end to end
Three open-source tools, one workflow: write → simulate one tx → prove all inputs. xahau-mcp is the simulate stage.
| stage | tool | what it does |
|---|---|---|
| write | xahc | author + compile a safe Hook to clean, lint-passed WASM |
| simulate one | xahau-mcp | run the real bytecode against one live transaction |
| prove all | xahc-prover | prove an invariant holds for every input in scope — or return the counterexample |
Why it’s useful
Point any MCP-capable agent (Claude, etc.) at this server and it can:
-
See the future before signing —
simulate_transactionis a pre-sign flight simulator: every hook an unsigned transaction would trigger runs as real bytecode against live ledger state, with per-hook accept/rollback, decoded emitted transactions, simulated state writes and labeled static engine preflights. Its siblingwhat_ifis a time machine: replay any real historical transaction — with your modifications — at its original ledger. Verified to reproduce a real claim’s emittedGenesisMintpayout to the drop (72,251,963 drops), test-locked. -
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. Noxahaudnode needed. -
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.
Установка
npx -y xahau-mcpКонфигурация
{
"mcpServers": {
"xahau": { "command": "npx", "args": ["-y", "xahau-mcp"] }
}
}