Skip to content
MCP server

TON PRIMES

Play TON PRIMES, a number-theory NFT game on TON, from an AI agent

Runs locally
Install

TON PRIMES is an open-source MCP server for games and play. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, API, Telegram
Runs
Locally
Version
0.5.0
Listing updated

Similar MCP servers

Install

Run in a terminal

claude mcp add ton-primes --env PRIMES_MNEMONIC='<PRIMES_MNEMONIC>' --env TONCENTER_API_KEY='<TONCENTER_API_KEY>' -- npx -y @ton-primes/mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "ton-primes": {
      "command": "npx",
      "args": [
        "-y",
        "@ton-primes/mcp"
      ],
      "env": {
        "PRIMES_MNEMONIC": "<PRIMES_MNEMONIC>",
        "TONCENTER_API_KEY": "<TONCENTER_API_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "ton-primes": {
      "command": "npx",
      "args": [
        "-y",
        "@ton-primes/mcp"
      ],
      "env": {
        "PRIMES_MNEMONIC": "<PRIMES_MNEMONIC>",
        "TONCENTER_API_KEY": "<TONCENTER_API_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "ton-primes": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ton-primes/mcp"
      ],
      "env": {
        "PRIMES_MNEMONIC": "<PRIMES_MNEMONIC>",
        "TONCENTER_API_KEY": "<TONCENTER_API_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "ton-primes": {
      "command": "npx",
      "args": [
        "-y",
        "@ton-primes/mcp"
      ],
      "env": {
        "PRIMES_MNEMONIC": "<PRIMES_MNEMONIC>",
        "TONCENTER_API_KEY": "<TONCENTER_API_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "ton-primes": {
      "command": "npx",
      "args": [
        "-y",
        "@ton-primes/mcp"
      ],
      "env": {
        "PRIMES_MNEMONIC": "<PRIMES_MNEMONIC>",
        "TONCENTER_API_KEY": "<TONCENTER_API_KEY>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • PRIMES_NETWORKtestnet or mainnet (default testnet)
  • PRIMES_MNEMONIC24 words for a DEDICATED wallet; unset = read-only
  • PRIMES_REFERRAL_KEYReferral number a mint cites when the call names none (default 0)
  • TONCENTER_API_KEYtoncenter API key for higher rate limits

About TON PRIMES

This local MCP server lets an AI agent interact with TON PRIMES, a number-theory game on the TON blockchain and Telegram where each integer is minted in turn as an NFT and primes are proved on chain. The game describes its token's internal floor price as one that never falls.

The agent can read chain state, request a quote, then mint and bid. It runs over stdio from the npm package @ton-primes/mcp and can target testnet or mainnet, with testnet the default. Without a wallet mnemonic it is read-only; with a dedicated wallet's 24 words it can transact. Optional settings cover a referral number and a toncenter API key for higher rate limits.

Use a dedicated wallet only, since the mnemonic gives the agent spending ability.

What it does

Read chain state
Inspect the game's on-chain state without a wallet.
Quote before acting
Request a quote before minting or bidding.
Mint and bid
Transact with a dedicated wallet when a mnemonic is provided.
Testnet or mainnet
Choose the network by environment variable, defaulting to testnet.
Referral support
Set a default referral number cited on mints.

Good for

  • Let an agent read TON PRIMES state
  • Get a quote before minting a number
  • Run the game on testnet safely
  • Automate bidding with a dedicated wallet

Pricing

Open source

Playing the game costs TON; the game states 1 TON per mint

Prices change. Check primes.live before you buy.

TON PRIMES FAQ

Is TON PRIMES read-only by default?

Yes. Without PRIMES_MNEMONIC set, it is read-only.

Which networks work?

Testnet and mainnet, selected with PRIMES_NETWORK; testnet is the default.

How do I install TON PRIMES?

It is an npm package, @ton-primes/mcp, run over stdio.

Should I use my main wallet?

No. The mnemonic should belong to a dedicated wallet.

Is TON PRIMES free?

Yes. TON PRIMES is open source, so you can use and self-host it for free.

How do I add TON PRIMES to Claude Code?

Run this command in your terminal: claude mcp add ton-primes --env PRIMES_MNEMONIC='<PRIMES_MNEMONIC>' --env TONCENTER_API_KEY='<TONCENTER_API_KEY>' -- npx -y @ton-primes/mcp

What are the best alternatives to TON PRIMES?

The closest alternatives to TON PRIMES are Space-core, TronEnergyFrog, BRAINIAC Account Abstraction, BRAINIAC Base Chain Data and Semiosis.

Where this comes from

  • Description: written from the project's website and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers