Listed from the MCP registry; nobody on Odel publishes it.

Is this yours? Claim it
MCP server: One MCP server.

xsolana

@xgamesfunRun by its publisher: served from their own domain, namespace checked by the registry.MCP server · External

Design, check, simulate and review game economies for Solana: a JSON spec, no contract to write.

Smart contractsv0.29.13Apache-2.0JavaScript
Freeno charge per call

One address for any MCP client. No sign-in needed on this server.

What it does

2 read9 other

Grouped by tool name. At most: moves money, runs code or commands, deletes data, or sends messages for you.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Tools

11 · grouped by tool name · checked 25 Nov 2026

Read · 2Look things up

  • xsolana_check
  • xsolana_explain

Other · 9Neither hinted nor named

  • xsolana_guide
  • xsolana_examples
  • xsolana_simulate
  • xsolana_cost
  • xsolana_review
  • xsolana_design
  • xsolana_status
  • xsolana_token
  • xsolana_client
Try it in the Inspector
README12 min read

Build a Solana shop, loot box or rewards system in one JSON file. Check the rules, simulate payouts and see what players pay before you go live. xsolana is the CLI in @xgamesfun/solana. loot is the program every project shares.

npm license network MCP Registry

Start on devnet with test funds. Set "network": "mainnet" to use real money. The program has not been independently audited. Before you use it · Disclaimer

Names

solana-kit is this repository. xgames.fun hosts games. xcore is its hosting CLI. You can use xsolana with any host. xcore

What you can build

BuildFor example
ShopsA potion for 0.01 SOL, a skin paid in your own token, an item that costs an NFT
Loot boxes, gacha, packsA crate with a 1% legendary, a five-card pack with a guaranteed rare, gacha pity
Lotteries and rafflesA weekly draw, a no-loss lottery, a raffle for an NFT with an allowlist
AuctionsHighest bid wins, and anyone outbid gets their money back at once
NFT stakingLock tiers and boosts, for your collection or any collection you didn't mint
CraftingBurn three common gems to forge a rare one
Contests and predictionsPick a side, prizes by rank or by stake
Rewards, quests, airdropsCapped rewards your game's server vouches for, daily chests, holder-only drops
Trading between playersListings for sale or rent, offers, and loans against an NFT

Every move leaves a public receipt on chain. Random rolls come from MagicBlock's verifiable randomness (VRF).

How it works

  1. Describe your economy in xsolana.json, or ask your coding agent to write it.
  2. Run check for errors, simulate for payouts and cost for fees. Run review to see who can claim each payout.
  3. Preview setup with approve. It lists the transactions. When you're ready, run it again with the confirmation code. If setup stops partway through, earlier confirmed transactions stay on chain. Rerun approve to review what's left.

The wallet that signs setup owns the project. With a key file, anyone who reads it can act as you. Keep it outside your repository and back it up. For real funds, prefer a browser wallet backed by hardware. Try it on devnet first. Owner keys and handover

Choose where sales go before you approve. Set "treasury": "wallet:<address>" in your spec. Sales default to the signing wallet. To change the treasury later, the owner must send a separate transaction outside the spec. Collection resale royalties go to the original signing wallet.

A spec in 10 fields · Loot box tutorial

Get started

With an AI agent

Claude Code

/plugin marketplace add XGamesFun/solana-kit
/plugin install xsolana@xgamesfun

Codex

codex plugin marketplace add XGamesFun/solana-kit
codex plugin add xsolana@xgamesfun

claude.ai, ChatGPT or Claude Desktop: add https://xgames.fun/mcp as a custom connector. Nothing to install.

Cursor, Cline, opencode or any MCP client: run npx -y --package=@xgamesfun/solana@0.29.13 xsolana mcp.

Any agent that reads skills (Copilot, Gemini CLI, Windsurf…): npx skills add XGamesFun/solana-kit.

Then ask for the economy you want. docs/harnesses.md lists more ways in, such as the skill as a zip for desktop apps and the server over HTTP.

From a terminal

bash
# find a worked example close to your idea
npx -y @xgamesfun/solana@0.29.13 examples shop with loot boxes

# save a working shop with a potion and a mystery box
npx -y @xgamesfun/solana@0.29.13 examples hello-shop --save xsolana.json

# using a coin you already launched? read it from the chain into its "tokens" entry
npx -y @xgamesfun/solana@0.29.13 token <its mint address>

# does it work? where does the money go? what does it cost?
npx -y @xgamesfun/solana@0.29.13 check xsolana.json
npx -y @xgamesfun/solana@0.29.13 simulate xsolana.json
npx -y @xgamesfun/solana@0.29.13 cost xsolana.json

# review the rules and who can claim each payout
npx -y @xgamesfun/solana@0.29.13 explain xsolana.json
npx -y @xgamesfun/solana@0.29.13 review xsolana.json

# make a project key and fund the printed address with devnet SOL
npx -y @xgamesfun/solana@0.29.13 keygen ~/.config/xsolana/my-game.json
# preview setup
npx -y @xgamesfun/solana@0.29.13 approve xsolana.json --keypair ~/.config/xsolana/my-game.json
# send the setup you reviewed
npx -y @xgamesfun/solana@0.29.13 approve xsolana.json --keypair ~/.config/xsolana/my-game.json --yes <code>

Use Node 22 or newer. Run commands from the folder containing your spec or a parent folder. xsolana help <command> lists options. Add --verbose for detail or --json for scripts. Exit codes are 0 for success, 1 for failure and 2 for a usage error.

In hello-shop, price is what a player pays. value is a simulation estimate. Items mint collectible NFTs by default. For a consumable you track in your game, set "kind": "normal" and have your backend deliver it from the purchase receipt.

In your app

Hosting with xcore? Use GamesFun.loot. It handles the network and mainnet sign-in. The xgames.fun shared relay costs $10 per million calls within your allowance or $20 per million in overage. xcore page client

Using the npm client? Install @xgamesfun/solana. The import below needs a bundler or an import map for plain HTML. Start with the live spec, a connected wallet and its account. Set rpcUrl to your network's RPC endpoint. Devnet also has a default.

js
import { solanaApp, walletStandardSigner } from '@xgamesfun/solana/play';

const chain = spec.network === 'mainnet' ? 'solana:mainnet' : 'solana:devnet';
const app = solanaApp({ spec, rpcUrl, wallet: walletStandardSigner(wallet, account, chain) });
await app.recover(); // finish earlier purchases when the wallet reconnects
const items = (await app.shop()).map(item => ({ item, buy: () => app.buy(item.key, { listing: item }) }));
const boxes = (await app.boxes()).map(box => ({ box, open: () => app.openBox(box.key, { listing: box }) }));

Show each listing’s price and odds. Call its buy() or open() when the player chooses it. A random box normally needs one transaction approval. The wallet may also ask for one message signature per session to recover unfinished purchases. Page examples

ImportWhat it gives you
@xgamesfun/solana/playeverything a player does with a live economy, from a web page
@xgamesfun/solana/clientone builder per instruction, every address, account and receipt decoders
@xgamesfun/solana/sponsoryour server pays players' fees (never their price), so players with no SOL can play
@xgamesfun/solana/resultsresults and vouchers your game's server signs
@xgamesfun/solana/keyfilethe project's key file as a signer, for a script of the owner's own steps (Node)
@xgamesfun/solanathe tools themselves: check, simulate, cost, review, explainEconomy, plan
@xgamesfun/solana/mcp/httpthe MCP server as a web handler, to host it yourself
@xgamesfun/solana/chain/*small browser-safe Solana building blocks: base58, Borsh, transactions, tokens, Core
@xgamesfun/solana/idl.jsonthe program's IDL
@xgamesfun/solana/release.jsonthe exact program build this release is for

Using @solana/kit? loot.toKitInstruction(ix) turns any builder's instruction into Kit's shape.

Start with these. The client exports hundreds of names (every builder, address, account layout and receipt). Most apps need only a few:

NeedUse
A player's pagesolanaApp and walletStandardSigner from @xgamesfun/solana/play
Your server pays players' feessponsorHandler from @xgamesfun/solana/sponsor
Your server vouches for winssignVoucher from @xgamesfun/solana/results
An owner's own step, scriptedreadKeyFile from @xgamesfun/solana/keyfile, and one builder from @xgamesfun/solana/client
Reading what happenedreceipts(tx), decode(name, data), pda and lootError from @xgamesfun/solana/client
Checking a spec in codecheck, simulate, cost, review and explainEconomy from @xgamesfun/solana

Everything else is for when one of these doesn't cover a case; the types (types/) document each export.

Fees and costs

loot charges two flat fees, set in the platform account on each cluster. The figures here, and those the offline tools quote, are the values at this release; approve and status read the platform account and say when it charges other fees or a change waits. xsolana cost prices a spec at its own network's fees, and on devnet it also gives mainnet's.

WhatDevnetMainnetPaid by
Player fee0.002 SOL0.0005 SOLthe player (or a sponsor), once for each action they sign
Project fee0.00001 SOL0.00001 SOLthe owner or the key authorized to act for the project
Cap on each fee0.01 SOL0.01 SOLthe program refuses a higher fee
Fee raiseapplies 7 days after it is set; a cut applies at oncesameset by the platform
Randomness (MagicBlock VRF)0.0008 SOL per roll or draw (high priority; the program offers no cheaper tier)samewhoever asks: the player on a box, the sender of a draw
Metaplex Core protocol fee0.0015 SOL per NFT minted, on top of its rent (about 0.0031 SOL in all)samewhoever settles or mints it; Metaplex collects it (protocol fees)
Token Metadata fee0.01 SOL per token name written on chain, on top of its rentsamethe owner, at setup
Rent(bytes + 128) × 5,080 lamports per accountsamewhoever opens the account; some return it when they close
Network fee5,000 lamports a signature, plus a priority fee of 2 lamports a transactionsamethe signer

A shop item mints a collectible by default. Its mint costs about 0.0031 SOL including the Metaplex fee and rent. A normal item is delivered by your backend. The Token Metadata fee applies when you name a token on chain.

Rent, as cost reports it: a project with one collection (217 bytes) is 0.0017526 SOL, a token account (165 bytes) 0.00148844 SOL, and a project's lookup table of 21 addresses (728 bytes) 0.00434848 SOL. The tutorial's loot box takes about 0.017 SOL to go live. Any SOL you seed into pools comes on top. The program reference lists the rent of every account and says which ones return it.

Royalty. The original signing wallet receives the collection's resale royalty: 5% unless the spec says otherwise ("collection": { "name": …, "royaltyPercent": n }, 0 for none, at most 25). Marketplaces that honour Metaplex Core royalties pay it on each resale. check, cost, explain and approve all say it.

Devnet SOL is play money, and devnet's player fee is four times mainnet's. For a devnet spec, check warns about the fee as a share of a price using mainnet's fee, and gives devnet's beside it. The full fee rules are in the program reference.

Good to know

  • Devnet and mainnet, not independently audited. An economy is on devnet unless its file says "network": "mainnet". Mainnet is real money: try everything on devnet first.
  • An upgrade can mean setting up again. Most program versions so far have not carried accounts over: 0.29 can't read the accounts 0.28 made. Pin the package version. Upgrades says what is known, and what is not, about funds left in an older version's accounts.
  • Players trust the project. Your keys can mint and move your project's pools. The program protects players from each other and from mistakes, not from the project they chose.
  • The chain can't see your game. Your server vouches for wins and scores. Checking that a player really did something is your job. review shows what a cheater gets on each route.
  • Nothing runs by itself. Someone sends every draw, settle and schedule run, usually your app.

Before you use it has the full list, with the details behind each item. Some things aren't built yet: read the known limits before you promise players something unusual.

Questions

How do I make a loot box or gacha on Solana without writing a smart contract? Describe it as a box: its price, its outcomes and their odds. Run check and simulate, then approve it with your project's key file. If the randomness oracle never answers, the buyer can get a refund after 10 minutes. See the tutorial and the examples.

Can I add staking to an NFT collection I didn't mint? Yes. A staking farm takes any collection, with lock tiers, boosts and reward rates, and needs no authority over the NFTs. See NFTs and tokens.

Can I run a lottery, raffle or auction without deploying a program? Yes. Lotteries (including no-loss ones), raffles with allowlists, and auctions that refund the outbid at once are all part of the same spec.

How does this differ from writing my own program? Each project uses the same program and configures its rules in a spec. Custom mechanics must fit what the program supports. Known limits

Can players with no SOL play? Yes, if your own server sponsors their fees (@xgamesfun/solana/sponsor). They still pay any price themselves.

Can I use this with a game I already host? Yes. Use the page client with your existing host, or use xcore loot add for a game on xgames.fun. Page integration

Who holds the keys? Your wallet or project key signs on your computer. Players sign their own transactions. Owner keys

Is this @solana/kit? That's the Solana JavaScript SDK. For these economy tools, install @xgamesfun/solana.

Learn more

Versions and stability

Pin the package version in scripts and read the changelog before upgrading. Major and minor versions track the program. A new minor can require a new setup. Since 0.29.12, a patch may add warnings but must accept specs its predecessor accepted on the same network. Patches may change CLI defaults, text or exit codes. Use --json in scripts. Changelog · Program upgrades

To choose a new token's mint address, pass --mint-key <token>=<keyfile> to both approval commands. That file signs mint creation only. Keep it private on every network where you plan to use the address.

Contributing

Issues and pull requests are welcome. CONTRIBUTING.md has the setup (npm ci, npm run fixtures, npm run check), the repository's layout and how to send a change. Report a vulnerability privately, as SECURITY.md describes.

License

Apache-2.0. See NOTICE and DISCLAIMER.md.

Similar modules

Browse Smart contracts