# SoltoshiDICE browser MCP setup

This local MCP controls the ordinary game tab. It supports the six production
games, poker tournaments, wallet connection, on-chain names, referrals and bank
controls through visible UI. Wallet owners handle extension setup and approvals.
It does not accept private keys, automatically fund accounts or run unattended
wallet approvals. It is not a hosted HTTP MCP endpoint.

## Install

1. Install Node.js 22.13+ and Microsoft Edge on a desktop with a graphical display.
2. Download [mcp.zip](https://soltoshidice.wtf/agents/mcp.zip). Its SHA-256 and
   package version are in [mcp.json](https://soltoshidice.wtf/agents/mcp.json).
   Compare the archive's SHA-256 before extracting into its own directory.
   PowerShell: `Get-FileHash ./mcp.zip -Algorithm SHA256`.
   macOS/Linux: `shasum -a 256 ./mcp.zip`.
3. Open a terminal in the extracted directory and run `npm ci`.
4. Add a local stdio server to your MCP client using this generic configuration.
   Replace both executable/file paths with the actual absolute paths on your
   computer. Windows JSON paths need forward slashes or escaped backslashes.

```json
{
  "mcpServers": {
    "soltoshidice": {
      "command": "/absolute/path/to/node",
      "args": ["/absolute/path/to/extracted/server.mjs"],
      "env": {
        "GAME_MCP_MAINNET": "1",
        "GAME_MCP_HEADED": "1",
        "GAME_MCP_CHANNEL": "msedge"
      }
    }
  }
}
```

This explicitly enables real-money production play. Configure it only for a
wallet you own or are authorized to operate, with a stated spending limit.
The default runtime refuses production unless this opt-in and a visible browser
are configured. Clients with different configuration formats should use these
same command, arguments and environment values. Clients that only support remote
MCP URLs cannot run this local connector; use their ordinary browser tools and
the public playbook instead. Never put `/agents/mcp.json` into an HTTP MCP URL
field: it describes the download and is not a JSON-RPC service.

## First connection

Restart/reload your client's MCP connection after configuring it, then call:

```json
{"name":"games_list","arguments":{}}
{"name":"games_guide","arguments":{"game":"onboarding"}}
{"name":"games_open","arguments":{"player":"alice","environment":"production"}}
```

For an invitation, include `referralWallet` in `games_open`, set to the inviter's
registered public wallet address. It is applied before first registration.
Existing on-chain referral parents do not change.

A dedicated visible Edge window opens. Have the wallet owner install their
official Solana Wallet Standard extension in this profile (a fresh profile has
no extensions), unlock it, and complete wallet setup directly in the extension.
They can use a separate tab for installation. Reload the game before any active
hand if necessary. Do not enter secrets through MCP or into the game page.

The agent reads and operates only the game tab: four entry acknowledgments with
the owner's authorization, Connect Wallet, Verify wallet and Claim name. The
owner handles the wallet's connection, message and transaction approval windows.
Use `games_wait` while waiting, not repeated connection/submission clicks.

Profiles and evidence are stored in `~/.soltoshidice-mcp` by default in production.
`GAME_MCP_DATA_DIR` can specify a private absolute directory. Never publish that
directory: wallet extension state and the player's own hole-card screenshots
are private. Reuse the same player id and directory after restart. Do not run
two processes against the same profile. Keep the process/browser alive for a
poker hand even after folding; closing it can interrupt private dealing.

## Tools

| Tool | Purpose |
| --- | --- |
| games_list | Environments, mainnet enablement and open players |
| games_guide | onboarding, cee-lo, slots, holdem, poker-tournament, blackjack, fights, rps, bank, recovery |
| games_open | Open a persistent player; optional referralWallet and phone viewport |
| games_observe | Visible page, screenshot, current controls and snapshot |
| games_act | click/fill/select/press on a fresh visible control ref |
| games_pointer | Scroll/drag or use coordinates from the current screenshot |
| games_wait | Wait up to 15 seconds and observe again |
| games_dialog | Respond to a game browser alert/confirm, not wallet approval |
| games_lifecycle | Foreground/reload/reconnect; avoid reload during live poker |
| games_evidence | Visible receipt links and diagnostics, not a settlement guarantee |
| games_close | Close a player and preserve its profile; wait for settlement first |
| games_fault | Isolated development testing only; refused on production |

Example after observing an actual enabled control:

```json
{"name":"games_act","arguments":{"player":"alice","snapshot":"RETURNED-SNAPSHOT-UUID","ref":"RETURNED-CONTROL-REF","action":"click"}}
```

Do not submit those placeholders literally. On a stale reference, observe again.
Select controls by returned name and current state; do not assume fixed ref ids.

The server also exposes the `soltoshidice://playbook` MCP resource. The same
guide is public at [llms-full.txt](https://soltoshidice.wtf/llms-full.txt).
No additional server key or subscription to SoltoshiDICE is needed. Normal
wallet balances, network fees, game stakes and eligibility requirements apply.

## Troubleshooting

- No wallet listed: install/unlock the official extension in this dedicated
  profile, then reload before a hand. Your normal browser profile is separate.
- Approval pending: the owner must inspect the wallet window; MCP does not
  observe it. If declined, stop and resolve the reason before retrying.
- Wrong network/configuration: the runtime fails closed if production's pinned
  program/mint changes. Download/review the current official package.
- Insufficient funds: check SDICE, SOL fees, deposits and session funding.
- Pending transaction: use the existing Check Transaction/history/recovery UI.
  Do not clear storage or issue a duplicate wager.
- Browser launch failure: verify Edge is installed and a graphical session is
  available. `GAME_MCP_CHANNEL=chrome` can select installed Chrome, subject to
  that browser's extension/automation support. Mainnet headless mode is refused.

The shipped archive contains production configuration only. Repository-local
developers also retain isolated devnet fixtures and historical acceptance tests.
This release is tested with local browser/MCP fixtures and read-only production
checks. It does not claim a fresh real-wallet settlement test for every game.

Support: battlejoose@gmail.com · [Terms](https://soltoshidice.wtf/terms) ·
[Privacy](https://soltoshidice.wtf/privacy).
