Quickstart
This gets an MCP client talking to Elysium testnet, read-only, in about five minutes. Then it adds a wallet and a policy.
Node 22.12 or later is required.
1. Install#
npm install -g @elyrail/cliThis installs the elyrail command. The MCP server runs with npx -y @elyrail/mcp, so it needs no separate install.
2. Create a config#
elyrail init --dir my-agent --network testnetThis writes three things:
my-agent/elyrail.json- a
policy.jsonthat denies almost everything .gitignorelines for state, keystores and secrets
To start read-only, remove the policyFile line from elyrail.json.
3. Check it#
elyrail doctor --config my-agent/elyrail.jsondoctor checks:
- the RPC endpoint's chain ID (99801 for testnet) and its latency;
- the audit log;
- file permissions.
4. Connect a client#
Claude Code:
claude mcp add --transport stdio --scope local elyrail -- npx -y @elyrail/mcp --config /absolute/path/to/my-agent/elyrail.jsonFor Claude Desktop and Cursor, see MCP clients. Ask the agent for the latest Elysium testnet block. It calls get_block.
5. Add a wallet#
Use a throwaway testnet key, never a real one.
elyrail keystore create --out my-agent/wallet.keystore.jsonSet up the wallet:
-
Write the password to
my-agent/wallet.passwordwith mode 0600. -
Add the wallet to
elyrail.json:json { "policyFile": "./policy.json", "wallet": { "keystoreFile": "./wallet.keystore.json", "passwordFile": "./wallet.password" } } -
Fund the printed address with testnet HYPE.
-
Edit
policy.jsonto allow what the agent may do, for example one recipient:json { "recipients": [{ "address": "0xTreasuryAddress", "label": "treasury" }] } -
Check the policy:
bash elyrail policy lint my-agent/policy.json
Restart the client. Ask the agent to call describe_policy, then to send 0.001 HYPE to the treasury. Now ask it to send to any other address. It gets POLICY_DENIED with RECIPIENT_NOT_ALLOWED, and nothing is signed.