Solana game and NFT economies without a smart contract
Loot boxes and gacha, shops, lotteries and raffles, auctions, NFT staking farms, crafting and capped rewards, written as a JSON spec instead of a new Anchor program. They all run on loot, one shared Solana program, and an AI coding agent (Claude Code, Codex, Cursor or any MCP client) can design, check, simulate and price one from a sentence.
Devnet only. The program is not yet independently audited, and nothing runs on mainnet until it is.
View on GitHubUse it from your agent
What you can build
- Loot boxes, gacha and packsOutcomes with odds, prizes of items, tokens or NFTs from a stash the project holds. Rolls come from a VRF oracle.
- ShopsA purchase in one transaction, in SOL or any token, or with an NFT as the price.
- Lotteries and rafflesRounds with a pot that carries over or one that doesn’t, no-loss lotteries, allowlists of any size.
- AuctionsThe highest bid wins; an outbid player is refunded at once.
- NFT staking farmsLock tiers, boosts, early exits, fixed or shared reward rates, for any collection, minted by the project or not.
- CraftingRecipes that take items, tokens or NFTs and make something new.
- Contests and prediction poolsPrizes by rank or by stake, decided by the project or the deciders it names.
- Rewards, quests and airdropsCapped grants a game’s server vouches for, timed schedules, holder-only drops and perks.
Every move leaves a public receipt on chain. The program reference says who signs what, every instruction, the fees and the known limits.
How it works
- Describe itSay what you want in a sentence to your agent, or write the JSON spec yourself.
- Check and simulateThe checker refuses what the program would refuse; the simulation shows where the money goes, day by day; the review says what a cheater could get.
- Approve in your walletA local page lists every transaction. You approve them in your own wallet. Nothing here signs for you.
Use it from an AI coding agent
Claude Code
/plugin marketplace add XGamesFun/solana-kit
/plugin install xsolana@xgamesfunCodex
codex plugin marketplace add XGamesFun/solana-kit
codex plugin add xsolana@xgamesfunChat apps (claude.ai, ChatGPT, Claude Desktop)
Add this address as a custom connector (an MCP server by URL). Nothing to install; going live is still your own approval, in your own wallet, on your computer.
https://xgames.fun/mcpAny agent with MCP (Cursor, Cline, opencode…)
npx -y --package=@xgamesfun/solana@0.25.2 xsolana mcpThen ask for an economy, for example: “a fishing game where each cast costs 0.02 SOL, with a rare golden fish and a monthly draw.”
Use it from a terminal
npx -y @xgamesfun/solana@0.25.2 examples shop with loot boxes
npx -y @xgamesfun/solana@0.25.2 check xsolana.json
npx -y @xgamesfun/solana@0.25.2 simulate xsolana.json
npx -y @xgamesfun/solana@0.25.2 cost xsolana.json
npx -y @xgamesfun/solana@0.25.2 review xsolana.json
npx -y @xgamesfun/solana@0.25.2 approve xsolana.jsonUse it from code
npm install @xgamesfun/solana
import * as loot from '@xgamesfun/solana/client';
const ix = loot.openBoxIx({ player, project, box, nonce }); // no Solana SDKThe client, chain and player modules run in browsers and in Node 22 or later, with TypeScript declarations for every entry point.
Questions people ask
How do I make a loot box or gacha on Solana without writing a smart contract?
Describe it as a box in an xsolana spec: its price, its outcomes, their odds and what each one pays. Run xsolana check and xsolana simulate, then approve going live in your own wallet with xsolana approve. Every project shares one program, loot, so there is no Anchor program to write or deploy. Rolls come from MagicBlock’s VRF, and an order the oracle hasn’t answered after 7 days can be refunded.
How do I add staking to an NFT collection I didn’t mint?
A staking farm in the spec takes any collection, with lock tiers, boosts and fixed or shared reward rates. The project needs no authority over the NFTs.
Can I run a lottery, raffle or auction on Solana without deploying a program?
Yes. Lotteries (including no-loss ones), raffles with an allowlist of any size, and auctions that refund the outbid at once are all routes in the same spec, on the same shared program.
Is there an MCP server or Claude Code plugin for building on Solana?
Yes. The xsolana plugin installs in Claude Code and Codex; claude.ai, ChatGPT and Claude Desktop can add the hosted server at https://xgames.fun/mcp as a custom connector; and any MCP client can run it locally with npx -y --package=@xgamesfun/solana@0.25.2 xsolana mcp. It is in the official MCP Registry as io.github.XGamesFun/solana-kit. Its eleven tools design, check, simulate, price, explain and review an economy; the agent never signs and never asks for a key.
How is this different from writing my own Anchor program?
Nothing is written, deployed or upgraded per project. Every project’s rules are enforced by the one shared program, and the toolkit’s tests run every instruction against that program. The trade-off is that an economy can only be what the spec can say.
Does it run on mainnet?
Not yet. It runs on devnet until the program is independently audited.
Links
- Source, docs and examples on GitHub
- @xgamesfun/solana on npm
- MCP Registry entry
- The agent skill
- llms.txt, this page as plain text for AI assistants