Add UniPlays to your agent
Add the uniplays entry to mcpServers in your project’s .mcp.json.
{
"mcpServers": {
"uniplays": {
"type": "http",
"url": "https://mcp.uniplays.fun/mcp",
"headers": {
"Authorization": "Bearer ${UNIPLAYS_API_KEY}"
}
}
}
}Set UNIPLAYS_API_KEY in the environment that launches this tool, then restart it.
Restart Claude Code, approve the project’s MCP server when prompted, and run /mcp to check the uniplays connection.
Send your first message
Paste this into your agent. It waits for your review before any launch.
Read uniplays://sdk/client, uniplays://manifest/schema, and uniplays://runtime/constraints before writing code. Scaffold the comet-courier template named Comet Courier with ticker COMET. Download and extract the returned archive. Apply the returned gameJson to game.json, then turn it into my own playable game, keeping saves and a leaderboard labeled as unverified. Keep platform features optional. Package the bundle, create an upload, PUT the archive with its Content-Length, validate with mode: full, and preview it. Fix errors and show me the preview. Before preparing a launch, show me the token name, symbol, description, and social links. Wait for my review. I will sign the transaction in my wallet.
Game templates
12 templatesvanilla-minimal
Plain HTML and JavaScript with no build step.
arcade
A game loop, cloud saves, and a leaderboard.
idle-store
Saves, a shop with dollar prices, and features for token holders. Purchases are charged through UniPlays checkout, so they only work on networks that have it.
gated
Unlock features for token holders, with a check on your own server that players cannot bypass.
multiplayer
Play decided by the server, with player sign-in checks, using a small Node backend.
match
Staked matches, with a free practice mode. Needs your own backend.
farm-market
A farming loop with saves, collectible items and wallet-confirmed trading.
crest-club
A token whose game fee is shared by the holders of three crest types.
hosted-farm
The same farm with a hosted backend that keeps the clock and the farm state, so a harvest cannot be faked in the browser.
prize-draws
Two paid prize draws with a fixed set of prizes, played from the page.
moonpetal-grove
A garden game with collectible critters, a shop, a player market, item buy offers, a prize egg and holder crests.
comet-courier
An arcade run with daily and season boards, runs checked on a hosted backend, a holder perk, a streak reward and collectible drops.
What your agent can do 35
What your agent can do 35
Your agent picks the tools. This list is for reference.
Build & test
- scaffold
- Create a game from a template. Inputs: template, name?, symbol?. Returns an archive, a file list, and gameJson. Replace the archive’s game.json with the returned gameJson.
- create_upload
- Start an upload of your game archive. Inputs: sizeBytes?, contentType?. Returns uploadId, a signed API url, method PUT, headers, maxBytes and expiry. PUT the archive to that url with the returned headers and a Content-Length equal to its size.
- validate
- Check your upload. Inputs: uploadId, mode? (static or full), gameId? for updates. Defaults to static validation. Returns jobId, status, errors, warnings, hashes, and review status. Full mode also runs the browser test.
- preview
- Get a preview link. Inputs: uploadId, gameId? for updates. Preview and publish both need a passing validation in mode full whose browser gate ran. Returns an unlisted preview URL that expires after 24 hours.
Launch & update
- publish
- Prepare a launch, update, or rollback. devBuyWei is an optional first purchase of your token and minTokensOut is the fewest tokens you will accept for it. Returns a link where you review and sign it with your wallet, and the transaction itself (txRequest), a versionId, and a confirmEndpoint.
- confirm_publish
- If you sign somewhere other than the signing page, send the original versionId and the txHash. The API checks that the transaction is yours and succeeded, then makes the version live. If confirmation is still pending, retry with the same pair. Nothing is signed or sent here.
- list_recoverable_publishes
- Find launches you signed that never finished going live. Lists up to 20, newest first. Needs publish access. Drafts, updates, rollbacks and finished launches are not listed, so keep your original version IDs yourself.
- versions
- Read your published versions with release notes, capabilities and transactions. Use a version ID when preparing a rollback.
- list_items
- Read your item definitions and exact prices from the live published game.json. Add or change items in game.json, then validate and publish a new version.
- checkout_catalog
- Read your published shop catalog, how purchases are split and the catalog version on the network, then prepare an update so they match. Prices change only through a new published version.
- composer_launch
- Launch a game together with its reward pool in one guided flow: check the deployment, prepare an unsigned create or stage step, and recover an interrupted launch. It never signs, never replaces a published launch and never claims ownership for a wallet.
Check on your game
- environment
- Check which network you are on, whether services are healthy, whether contracts are verified and whether hosting is available. Also shows the launch terms and whether you accepted them. You accept the terms in your wallet, never with a key.
- owned_games
- List the games owned by your access key’s wallet, a page at a time.
- stats
- Read player counts, sessions, time played, how many players return, and purchases for a game and time window. Owners get full detail; other callers get public data.
- token
- Read your token’s price, curve progress, graduation status, holders, and fees.
- assets
- Look up your item types: supply, mint history, inventory and holders. Some views, such as who can sign rewards, a game handover or full holder lists, need the game owner.
- market
- Read item listings, exact price quotes, completed sales and volume. Your earnings from sales need the game owner. This tool cannot approve or make a trade.
Hosting
- hosting_inspect
- Read a hosting plan you own and its payment history. Nothing is paid or changed.
- hosting_status
- See whether your hosted backend is healthy: logs with private data removed, daily usage, prepaid credit and monthly statements. Developer only.
- hosting_template
- Create a starter backend for a farming game: a private module that keeps game state safe on the server, plus a versioned backend file.
- hosting_validate
- Check a hosted backend’s source size, fingerprint and settings before you upload it. Your code is never run.
- hosting_manage
- Retry a saved private deployment, or set a spending limit you approved, for a hosting plan you own. Needs publish access. It does not add money to the account or export player data.
- hosting_preview
- Run a paid test deployment of your backend with separate test data. No NFTs are signed.
- hosting_publish
- Deploy your private backend code to a prepaid hosting plan and connect it to the matching game version.
- hosting_payment
- Prepare the $25 starting credit or a manual top-up for you to approve. Only confirmed payments count.
Reward pool, prize draws & chance
- economy
- Read your game’s reward pool (the game treasury): its balance, how purchases are split, the limits in force and the maximums set at launch. It can also read one signed award.
- configure_economy
- Prepare a change to your reward pool: a rule, a limit or an offer, for the wallet that owns the game. It reads the pool first and refuses a request above a maximum set at launch, instead of letting the network refuse it. Raising a limit waits out a delay; lowering one takes effect at once.
- npc_offers
- Read a standing offer from the reward pool to buy items: its price per item, how many are left today, when it expires and whether it is firm. Reading it does not reserve a sale for a seller.
- set_npc_offer
- Prepare a standing offer to buy items: the price per item, items per day, expiry and how long it stays firm. A price above the item’s maximum, or any change that makes a firm offer worse, is refused.
- rewards_epoch
- Read one reward period: its state, remaining budget and dates. It also shows who signs your rewards and who can veto them, and prepares the funding step. It signs nothing; funding needs the signer’s approval of the terms.
- draws
- Read your paid prize draws: each draw’s state, exact price, prizes left and waiting plays, one wallet’s plays, and the data to check one play. Only draws created through UniPlays are listed. Nothing here plays or refunds.
- chance_rounds
- Read one chance round or one entry in it: its terms and the table of possible outcomes. It never draws or reveals a result. Chance is closed for now.
- open_chance_round
- Prepare a chance round from a table set at launch. The odds, payouts and entry window are checked first, and the biggest possible payout leaves the reward pool when the round opens.
Matches & hand-offs
- match_config
- Read the match result signer and the time window it is valid in, create a match ID from complete terms, or read the terms a player must see before joining.
- handoff
- Set up a step an access key cannot finish alone, so you can finish it in your wallet or dashboard: market_wallet, hosting_export, hosting_account, hosting_secrets, reward_delegation, holder_rewards_launch, launch_terms, draw_create, draw_play or draw_refund. It signs nothing, accepts no terms for you, and takes a secret’s name, never its value.
Resources & prompts
Resources & prompts
- uniplays://hosting
- How hosting works: modes, limits, SDK helpers, secure rewards, usage metering and prepaid billing.
- uniplays://sdk/client/index
- The SDK reference by section and method, to read before the full one.
- uniplays://sdk/client
- Every SDK method with its signature and errors.
- uniplays://manifest/schema
- The game.json format.
- uniplays://runtime/constraints
- Code, engine, network and size rules for a game.
- uniplays://patterns/capabilities
- Which capabilities to declare, how player consent works, and how to fall back.
- uniplays://patterns/token
- Reading the token, declaring a shop, and confirming purchases.
- uniplays://patterns/assets
- Item definitions you publish, wallet-reviewed item actions and marketplace reads. Item writes need a supported network and a wallet session.
- uniplays://policy/token
- Token launch, fee, supply and graduation rules.
- uniplays://policy/ranking
- How play activity, verification and retention affect ranking.
- uniplays://sdk/server
- Guidance for your own server. Optional hosted functions use the built @uniplays/sdk/backend helpers; read uniplays://hosting for availability and prepaid billing.
- uniplays://developer/workflows
- Which permission each read needs: environment, owned games, assets, market and hosting.
- uniplays://patterns/treasury
- Reward pool rules: limits, awards, and the standing offers to buy items.
- uniplays://policy/chance
- Chance round rules, what a player sees before a first entry, and how results are checked.
- uniplays://patterns/mobile
- What declaring touch promises, and how to make a game play well on a phone.
- uniplays://patterns/drops
- Optional fair loot drops declared in game.json: drop tables, the seasons a game update must keep, and how a game server records kills and grants each drop once.
- uniplays://patterns/draws
- Optional paid plays for the game’s own NFTs: the draws block, dollar and token pricing, how a result is decided after the play, creating and stocking a draw, and the rule that only a draw made by the UniPlays factory counts.
- uniplays://policy/draws
- The draws disclosure players see: every statement, the hash an acknowledgement is recorded against, and what a screen must do with it.
- uniplays://patterns/holder-rewards
- Paying part of the game fee to NFT holders: the total fee, the holder part and the weights, what is fixed at launch, what the reward pool keeps, and the two-transaction first publish.
- uniplays://policy/claw
- UPLAY claw price, buyback and platform fee split rules.
- uniplays://contracts/errors
- Contract errors by name, with when each one happens.
- uniplays://examples/{slug}
- The selected example’s manifest, instructions, file digests, and archive URL.
- uniplays://games/{gameId}/manifest
- A private game.json. Your key must own the game.
Prompts
- build-arcade-game
- Start a game with a loop, saves, and an unverified leaderboard.
- add-leaderboard
- Add scores, seasonal rankings, and verification labels.
- add-token-store
- Add a shop with dollar prices, and confirm every purchase in the UniPlays purchase window.
- add-token-gate
- Add holder-only access, with a plan to enforce it on your server.
- convert-to-server-authoritative
- Use your own backend or optional UniPlays functions. Read uniplays://hosting; never authorize hosting payments without the developer’s explicit approval.
- add-game-economy
- Add a reward pool, item buying or a chance game. The agent reads the limits fixed at launch before preparing anything.
Keys and connection problems
Keys and connection problems
Access keys
Keys are shown once. Save yours somewhere safe. Give reading tools uniplays:read; publishing tools need uniplays:read + uniplays:publish. Manage or revoke keys in your profile.
Connection problems
A 401 Unauthorized response means the key is missing, expired, or revoked. Check the address and key in your agent’s configuration. Your wallet signs launch transactions; an access key cannot sign them.