State Memory MCP
Local SQLite graph of tasks, decisions and blockers that coding assistants keep across sessions
A local SQLite store of 3D/2D entities, positions and relations for agents to query, simulate and plan on
By PuterVision TypeScript Local · stdio Knowledge and memoryDeveloper tools
34 popularity score ★ 21 ↓ 161/wk
Opens the app, which asks before it adds the server.
npm install -g @putervision/world-model-mcpclaude mcp add world-model -- world-model-mcp run{
"mcpServers": {
"world-model": {
"command": "world-model-mcp",
"args": [
"run"
]
}
}
}{
"mcpServers": {
"world-model": {
"command": "world-model-mcp",
"args": [
"run"
]
}
}
}{
"servers": {
"world-model": {
"type": "stdio",
"command": "world-model-mcp",
"args": [
"run"
]
}
}
}[mcp_servers.world-model]
command = "world-model-mcp"
args = ["run"]gemini mcp add --scope user world-model world-model-mcp -- runWORLD_MODEL_MCP_PROJECT |
Optional: Project id that scopes the stored world model; defaults to the current directory's name. |
|---|---|
WORLD_MODEL_STORAGE_DIR |
Optional: Folder for the SQLite databases; defaults to .world-model-mcp/ in the project. |
LOG_LEVEL |
Optional: Log verbosity: debug, info, warn or error. |
World Model MCP keeps a running spatial picture of a scene for an agent: named entities with 3D bounding boxes, positions, tags and a confidence score, plus relations between them such as on, inside, contains and near. Everything lives in a SQLite database inside the project folder, and no language model is involved in indexing or answering queries.
On top of that store it offers geometry helpers. An agent can search entities by text or by distance, predict a movement and check it for box collisions, plan a route around obstacles, ask what should be visible from a given pose and field of view, and fold vision detections back into the model. Entities that drop out of view are kept with a confidence that decays over time. It can also turn a planned path into timed WASD or arrow-key presses and screen coordinates for a Playwright script, though it only produces those inputs and presses nothing itself.
For longer work it adds snapshots with diff, undo and time travel, a shared blackboard with leases for several agents, spatial 'specs' that check clearance and containment, and SHA-256 evidence bundles tied to task ids. It is built to pair with the same maker's vision-memory and state-memory servers but runs on its own.
The v0.6.1 source registers 15 tools, as the README says. Not in the README: every time the server starts with `run`, it runs the same setup as `world-model-mcp init` (src/index.ts calls runAutoInit). That creates `.world-model-mcp/`, appends to `.gitignore`, writes or updates CLAUDE.md, `.agents/AGENTS.md`, `.windsurfrules`, `.github/copilot-instructions.md` and Cursor, VS Code and Gemini rule files in the project, merges an entry into `.cursor/mcp.json` and `.vscode/mcp.json`, and edits home-directory files such as `~/.cursorrules` and the Claude Desktop config when those apps' folders exist (src/cli/init.ts).
| Runtime | Node.js 18+ |
|---|
Node.js 18.18.0 or later with npm. The package is installed globally (`npm install -g @putervision/world-model-mcp`) so the `world-model-mcp` command is on PATH. No account, API key or network service is needed. The server works on the folder it is started in (or the project named by WORLD_MODEL_MCP_PROJECT), so start it from the project directory.
It sees nothing itself: positions and detections come from the agent or another server. generate_game_inputs returns key timings and screen coordinates but presses no keys; a separate Playwright setup must run them. By default queries return up to 50 entities (`limit`), compact slices hold 16, get_expected_view uses a 90-degree, 100-unit view and wait_for_spatial_state stops after 10000 ms (src/tools/definitions.ts). manage_snapshot restore and undo overwrite live state and cannot be reversed unless a snapshot was saved first. Starting the server rewrites agent instruction and MCP config files (see About).
Suits developers building agents for 3D games, simulations, robotics experiments or browser game automation who want a deterministic local record of where things are, with collision and visibility checks, instead of coordinates in the prompt. It reaches no outside service. It is a poor fit for general text memory across sessions; a memory server fits that better. Since starting it edits CLAUDE.md, AGENTS.md, editor rules and MCP configs, run it where those changes can be reviewed. We also hold a different project of the same name (saravananjaichandar/world-model-mcp, a Python package); it is a separate server.
update_entityquery_entitiesset_relationget_spatial_mapsimulate_movementingest_observationget_expected_viewlink_to_goalrecord_outcomemanage_spatial_speccreate_evidence_packuse_spatial_blackboardmanage_snapshotwait_for_spatial_stategenerate_game_inputs