cpu-game-mcp

cpu-game-mcp

Enables AI agents to play the CPU Game on EVM, including world exploration, building, crafting, and trading via natural language.

Category
Visit Server

README

cpu-game-mcp

MCP (Model Context Protocol) server for CPU Game — a blockchain game on EVM. It lets an AI agent play on your behalf: read the world map, reveal cells, build and mine, craft, move resources, and trade at marketplaces. Runs locally over stdio and is distributed via npm, so you start it with a single npx command from any MCP client.

Installation

Pick your client below and add the server. The only required setting is your wallet's PRIVATE_KEY (0x + 64 hex chars) — replace 0x… with yours.

<details> <summary><strong>Claude Code</strong></summary>

claude mcp add cpu-game -s user -e PRIVATE_KEY=0x… -- npx -y cpu-game-mcp@latest
  • -s user installs it across all your projects; omit it (or use -s local) for the current project only.
  • -e PRIVATE_KEY=… sets the required env var; -- separates Claude's flags from the server command.

</details>

<details> <summary><strong>Claude Desktop</strong></summary>

Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\), then restart the app:

{
  "mcpServers": {
    "cpu-game": {
      "command": "npx",
      "args": ["-y", "cpu-game-mcp@latest"],
      "env": { "PRIVATE_KEY": "0x…" }
    }
  }
}

</details>

<details> <summary><strong>Cursor</strong></summary>

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (this project):

{
  "mcpServers": {
    "cpu-game": {
      "command": "npx",
      "args": ["-y", "cpu-game-mcp@latest"],
      "env": { "PRIVATE_KEY": "0x…" }
    }
  }
}

</details>

<details> <summary><strong>VS Code (Copilot agent mode)</strong></summary>

Create .vscode/mcp.json — VS Code prompts for the key at startup instead of storing it:

{
  "inputs": [
    { "type": "promptString", "id": "privateKey", "description": "CPU Game private key", "password": true }
  ],
  "servers": {
    "cpu-game": {
      "command": "npx",
      "args": ["-y", "cpu-game-mcp@latest"],
      "env": { "PRIVATE_KEY": "${input:privateKey}" }
    }
  }
}

(In user settings.json, wrap the whole object in an "mcp": { … } key.)

</details>

<details> <summary><strong>Windsurf</strong></summary>

Add to ~/.codeium/windsurf/mcp_config.json, then restart Windsurf:

{
  "mcpServers": {
    "cpu-game": {
      "command": "npx",
      "args": ["-y", "cpu-game-mcp@latest"],
      "env": { "PRIVATE_KEY": "0x…" }
    }
  }
}

</details>

Environment variables

Required

Variable Description
PRIVATE_KEY Your wallet private key — 0x followed by 64 hex chars (32 bytes).

Optional — has a sensible default; normal users can omit it.

Variable Default When you need it
RPC_URL chain's public RPC A custom RPC endpoint for sending on-chain transactions (e.g. reveal).

Session state (JWT / session keys) is persisted to ~/.cpu-game/.

What the agent can do

Once connected, the server exposes tools grouped by area:

  • Sessionauthenticate, get_game_config (static rulebook: resources, costs, contract addresses), get_balance (spendable $CPU + gas).
  • Worldget_map, get_cell, get_changes (react to other players).
  • Reveal & buildreveal (surface a cell's deposits on-chain), build (place a building; an extractor starts mining automatically), get_mining_status, claim_mining.
  • Transportquote_transport, transport, get_transport_status, list_my_transports, get_pending_transports, resume_transport.
  • Craftinglist_recipes, craft, get_craft_status, claim_craft.
  • Tradingget_markets, list_lots, get_lot, quote_buy, buy_lot, create_lot, cancel_lot, list_my_lots.

Paid routes and on-chain actions are settled automatically; always check get_balance before a paid action.

Requirements

  • Node.js ≥ 20

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured