llmgine-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@llmgine-mcpCreate a world called 'test' and spawn an NPC named 'Guard' at position (0,0)"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
llmgine
The LLM-native game engine. An ECS game engine where intelligence is a core primitive: attach a Mind (LLM cognition), Eyes (perception/vision), and Voice (neural TTS) to any entity the same way you attach physics or a sprite. An NPC, a boss, a monster, a quest giver, a faction, the weather — if it's in the world, it can think, see, and speak.
Working title. TypeScript · 3D (three.js) + headless + 2D canvas · MIT.
deterministic 60 Hz ECS sim ←— validated intents —— async LLM minds
│ ▲
└—————— perception snapshots + pixel vision ———————┘The hard problem: games are deterministic real-time loops; LLMs are slow, async, and non-deterministic. llmgine resolves it structurally:
The sim never blocks on a thought. Minds observe snapshots, think on their own cadence (plus event wakeups: damaged, spoken to), and return intents.
Intents pass the same validated action pipeline as player input — a Mind can only do what its body allows. No hallucinated teleports, no 9999 damage.
Every LLM-augmented module has a deterministic fallback (behavior policies, weighted loot tables, quest state machines). If the API is down, the game still runs.
Genesis turns the LLM into a content generator: prefabs, loot, quests as validated JSON. The model proposes; the engine disposes.
Quickstart
Requires Node >= 18. llmgine is not published to npm yet — today you run it from a clone (which works end-to-end);
npm install llmginewill work once it's published.
From a clone (the working path today):
git clone https://github.com/lordbasilaiassistant-sudo/llmgine
cd llmgine
npm install
npm run build # engine → dist/
npm test # unit tests, no network (pretest rebuilds dist/ automatically)
npm run demo # the 3D arena demo → http://localhost:4173Optional: copy .env.example to .env and add a ZAI_API_KEY
to give minds a live model (see below) — the demo auto-detects it locally.
Start your own game — scaffold from the clone; the generated project links
back to it with a file: dependency (no npm registry needed):
node dist/cli/index.js create my-game # from the clone root
cd my-game && npm install && npm run dev # http://localhost:4173From npm (once published):
npm install llmgine # not yet — 404s today, tracked for a deliberate release
npx llmgine create my-gameWhat the code looks like:
import {
World, GameLoop, SpatialGrid, ActionRegistry, actionSystem,
Transform, Velocity, Named, Health, Speech, Behavior,
STANDARD_VERBS, behaviorSystem, movementSystem,
Mind, MindMemory, CognitionDriver, OpenAICompatibleProvider,
} from "llmgine";
const world = new World(42); // seeded — deterministic
const grid = new SpatialGrid();
const actions = new ActionRegistry();
for (const v of STANDARD_VERBS) actions.register(v);
// any entity + Mind = intelligent entity
const guard = world.create();
world.add(guard, Transform, { x: 0, y: 0 });
world.add(guard, Velocity);
world.add(guard, Named, { name: "Gate Guard" });
world.add(guard, Health);
world.add(guard, Speech);
world.add(guard, Behavior, { mode: "idle" });
world.add(guard, Mind, {
persona: "A vigilant town guard. Suspicious of strangers.",
goals: ["guard the gate"],
thinkEvery: 8, // seconds between thoughts
fallbackMode: "wander", // deterministic policy if the LLM is unavailable
});
world.add(guard, MindMemory);
const driver = new CognitionDriver({
provider: new OpenAICompatibleProvider(), // reads ZAI_API_KEY / LLM_API_KEY + LLM_BASE_URL
actions, grid,
});
world.addSystem(actionSystem(actions));
world.addSystem(behaviorSystem());
world.addSystem(movementSystem(grid));
world.addSystem(driver.system());
new GameLoop(world).start(); // browser; or loop.advance(n) headlessRelated MCP server: antics-mcp
Get a free model (GLM)
The default provider targets z.ai's OpenAI-compatible API, where glm-4.5-flash is free — free minds for every NPC in your game:
Create a key at z.ai and set
ZAI_API_KEY.That's it. Tiers:
fast(flash — NPC chatter),smart(deep reasoning),vision(pixel Eyes). Map tiers to any models you like.
Any OpenAI-compatible endpoint works instead: OpenAI, Ollama, LM Studio, vLLM —
new OpenAICompatibleProvider({ baseUrl, apiKey, models }).
Disclosure: if you want more than the free tier, this is a referral link for the GLM Coding Plan — we may receive credit, which funds the project's development: https://z.ai/subscribe?ic=BWTG6TRYYQ
The demo — The Neural Colosseum
A 3D torchlit arena: you (a gladiator) vs The Arena Master, a boss whose mind is a live GLM model. It perceives the pit, taunts you in character (rendered in the "thought ribbon" and speech bubbles, voiced by local Kokoro neural TTS), commands its goblins, fights, and drops loot through deterministic tables. Remove the API key and the same fight runs on pure instinct.
git clone https://github.com/lordbasilaiassistant-sudo/llmgine
cd llmgine && npm install
npm run demo # http://localhost:4173 — auto-detects ZAI_API_KEY locallyFor AI agents: the MCP server
The engine ships as an MCP tool so agents can build and test games headlessly. Claude Code auto-connects via the repo's .mcp.json when opened inside a built clone; any other client:
{ "mcpServers": { "llmgine": { "command": "node", "args": ["<path-to-clone>/dist/mcp/server.js"], "env": { "ZAI_API_KEY": "…" } } } }Tools: create_world, define_prefab, define_loot_table, list_prefabs,
spawn, attach_mind, act, run (advance N ticks → event log),
query_world, save_world, load_world, destroy_world, generate_prefab
(Genesis). An agent can design a boss, attach a mind to it, simulate 10
seconds of combat, and read the death/loot events back — no browser, no human
in the loop. Full walkthrough: docs/mcp.md.
Build (and play) games with your agent
Agents are first-class players here, not just builders. Every game can wire an
AgentPort (llmgine/agent) — observe/act/step/save through the exact same
Eyes-perception + validated-verb pipeline the LLM Minds use. In a browser it's
window.llmgine; with the dev server running, any local process can drive the
live game over HTTP:
curl -s localhost:4173/agent/call -d '{"method":"observe"}'
curl -s localhost:4173/agent/call -d '{"method":"act","args":["move_to",{"x":0,"y":-100}]}'
curl -s localhost:4173/agent/call -d '{"method":"step","args":[120]}' # deterministic 2s
curl -s localhost:4173/agent/call -d '{"method":"actionLog"}' # why was my verb rejected?step() pauses real time and advances the fixed-timestep sim — agent
playtests are reproducible. Rejected actions carry the validator's reason.
Give your agent the skill file at
skills/llmgine/SKILL.md (drop it into
.claude/skills/ for Claude Code) — it teaches the architecture contract, the
build loop, the gotcha ledger, and the verify loop. npm run agent:verify
runs the headless engine acceptance (determinism, adversarial verb rejection,
LLM-down fallback) in seconds.
What's in the box
Layer | Contents |
| ECS, fixed-timestep loop, seeded RNG, event journal, spatial grid, prefabs (validated JSON), action/intent pipeline, save/load |
gameplay | combat (PvE/PvP, factions, aggro), loot/drop tables, quests + rewards, inventory, dialogue/speech, spawning — each fully functional with zero LLM |
| provider-agnostic inference (tiers: fast/smart/vision), Mind/Eyes/Voice components, cognition scheduler, memory, budgets + caching, Genesis content generation |
| three.js renderer: model factories with live-sim-driven animation, chase cam, |
| headless renderer (tests/servers/MCP) + canvas 2D (prototyping/minigames) |
| the engine as an agent tool |
Full design: ARCHITECTURE.md. Focused guides in docs/: input (touch + gamepad) · audio · save/load · navigation · projectiles · glTF models · MCP server.
Honest status (v0.1)
Works (tested): everything in the table above — 50 unit tests + a live GLM
suite (npm run test:live) where a real model drives a Mind through the intent
pipeline and Genesis generates a valid, spawnable prefab. The demo has been
played to completion by a scripted agent in a real browser: pack culled,
boss duel won, quest completed, rewards granted, live GLM taunts mid-fight —
and the same run with no API key completes on deterministic fallbacks.
Also in the box now (all tested): touch joystick + gamepad input, procedural SFX + looping ambient music (zero asset files), verb-gated projectiles/ranged combat, NavGrid A* pathfinding (behavior routes around obstacles), save slots (F5/F9 quicksave in the demo), glTF model helpers, and a provider-level repair for GLM flash's malformed tool calls (captured live, unit-tested).
Also works (tested): llmgine create <name> (run from a clone:
node dist/cli/index.js create <name>) scaffolds a starter game that installs
and builds against the clone via a file: link — proven end-to-end
(create → npm install → build). llmgine export windows|android|ios|pwa|store generates the
Electron/.exe config, Capacitor mobile config, installable PWA, and a store
listing kit (assets checklist, pricing worksheet, AI disclosure) — generator
output is covered by CLI subprocess tests. The heavy toolchains run in your
game project (#1
tracks producing reference artifacts).
Remaining gaps (tracked as issues):
Human feel-tests: audio ear-test (#2), phone/pad in hand (#3), a real .glb exercised in an example (#6).
Multiplayer (the event journal + intent log are the designed foundation).
Voxel/heightmap terrain; STT input.
Vision ("pixels" Eyes) is wired end-to-end but not yet exercised by the demo.
License
MIT. Contributions welcome — see CONTRIBUTING.md.
This server cannot be installed
Maintenance
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI agents to query and control the Unity Editor, supporting scene management, GameObject manipulation, asset browsing, play mode control, and real-time editor operations through 52+ tools.Last updated1MIT

antics-mcpofficial
AlicenseAqualityBmaintenanceEnables AI agents to deploy multiplayer web games as playable URLs with rooms, live state sync, and leaderboards, all through a single tool call.Last updated44844Inno Setup- Alicense-qualityCmaintenanceLocal MCP server that gives AI agents 44 engine tools to build, run, and debug real 2D and 3D games through conversation.Last updatedMIT
- Alicense-qualityDmaintenanceBridges AI assistants to running game instances for testing, debugging, and verification. Works with any game engine via a simple TCP protocol.Last updated19MIT
Related MCP Connectors
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Discover AI tools for game development — 100+ tools indexed by engine, task, and pricing.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lordbasilaiassistant-sudo/llmgine'
If you have feedback or need assistance with the MCP directory API, please join our Discord server