cpu-game-mcp
Enables AI agents to play the CPU Game on EVM, including world exploration, building, crafting, and trading via natural language.
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 userinstalls 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:
- Session —
authenticate,get_game_config(static rulebook: resources, costs, contract addresses),get_balance(spendable $CPU + gas). - World —
get_map,get_cell,get_changes(react to other players). - Reveal & build —
reveal(surface a cell's deposits on-chain),build(place a building; an extractor starts mining automatically),get_mining_status,claim_mining. - Transport —
quote_transport,transport,get_transport_status,list_my_transports,get_pending_transports,resume_transport. - Crafting —
list_recipes,craft,get_craft_status,claim_craft. - Trading —
get_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
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.