whatisgithub

What is demo-game?

mcp-gtw/demo-game — explained in plain English

Analysis updated 2026-05-18

1PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A multiplayer action game where every character is played entirely by an AI agent through MCP tools, demonstrating the mcp-gtw library.

Mindmap

mindmap
  root((MCP Game))
    What it does
      AI-only controlled characters
      Authoritative grid server
      Live browser view
    Tech stack
      Python
      Phaser
      MCP protocol
    Use cases
      Demo mcp-gtw library
      Test agent tool-calling
      Explore stateful MCP apps
    Audience
      Developers
      MCP protocol builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

See a real worked example of building a stateful multiplayer app on the mcp-gtw gateway library

USE CASE 2

Test how an AI agent controls a character using a small, well-defined set of MCP tools

USE CASE 3

Study how a single process can serve an MCP endpoint, game simulation, and web client together

USE CASE 4

Use as a starting point for building your own AI-controlled real-time game or simulation

What is it built with?

PythonPhaserViteMCPDocker

How does it compare?

mcp-gtw/demo-game0xustaz/streamgatea-bissell/unleash-lite
Stars111
LanguagePythonPythonPython
Setup difficultymoderatehardhard
Complexity3/54/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Python 3.12+, the uv tool, and Node 22+ with npm to build the Vite client bundle.

MIT license: free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

MCP Game is a demonstration project showing off what is possible with a library called mcp-gtw. It is a multiplayer, top down action game where every character in the game is controlled entirely by an AI agent, not by a human clicking or typing directly. There are no manual keyboard or mouse controls at all: a person opens the web page in a browser, that page hands their AI agent a private connection, and once the agent logs in, it becomes that character in the shared game world. The AI controls its character using a small set of tools such as move, look, attack, shoot, chop, and speak, which are the only ways to affect the world. The server keeps full authority over the game, calculating everything in terms of a grid, so all agents are playing fair by the same rules rather than trusting anything the browser or the agent claims. When a player logs in, they can choose a character class such as warrior, archer, monk, or lancer, along with a skin color, while enemy characters always appear in red. Under the hood, the whole thing runs as a single program that serves the connection for AI agents, the authoritative simulation of the game world, a live view stream, and the game's own web based client all at once. The visual side uses the Phaser game framework along with a set of licensed 2D art assets, and the project bundles everything so it can be run locally without hunting down separate pieces. To try it, you need Python 3.12 or newer, the uv Python tool, and Node.js with npm to build the web client, after which a couple of setup commands install everything and start a local server in a browser. This project is aimed at developers exploring how AI agents can interact with real time, stateful applications through a standard protocol, and it works well as a hands on example of the mcp-gtw library rather than a game meant for casual players.

Copy-paste prompts

Prompt 1
Connect to this MCP game server and log in as a warrior, then explore the game world.
Prompt 2
Explain how AppGateway subclasses mcp-gtw's Gateway to serve both the MCP endpoint and the web client.
Prompt 3
Show me how the server keeps grid-based authority over player actions like move and attack.
Prompt 4
Help me add a new character class to this MCP game following its existing classes.py pattern.

Frequently asked questions

What is demo-game?

A multiplayer action game where every character is played entirely by an AI agent through MCP tools, demonstrating the mcp-gtw library.

What language is demo-game written in?

Mainly Python. The stack also includes Python, Phaser, Vite.

What license does demo-game use?

MIT license: free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is demo-game to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is demo-game for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.