@gizmo3d/mcp
v0.3.4
Published
MCP server for Gizmo world automation commands and resources.
Downloads
682
Maintainers
Readme
@gizmo3d/mcp
@gizmo3d/mcp exposes Gizmo automation through the Model Context Protocol. It
maps engine automation commands to MCP tools and automation resources to MCP
resources/resource templates.
Most users should start MCP through the CLI:
npm install -g @gizmo3d/cli
gizmo mcp --world /absolute/path/to/world.jsonUse this package directly when you want to embed or customize the MCP server.
Install
npm install @gizmo3d/mcpCLI Usage
Generic MCP config:
{
"mcpServers": {
"gizmo": {
"command": "gizmo",
"args": ["mcp", "--world", "/absolute/path/to/world.json"]
}
}
}If the current workspace already has .gizmo/session.json, the args can be:
["mcp"]gizmo start prints ready-to-use MCP configs for live sessions.
Library Usage
The package exports:
createAutomationMcpServer- resource URI helpers
- argument parsing helpers
- stdio server helpers
import { createAutomationMcpServer } from '@gizmo3d/mcp';The stdio server opens a Gizmo automation session and exposes world resources and mutating tools to the connected MCP client.
Resources and Tools
Common resources include:
engine://session/infoengine://world/summaryengine://components/catalogengine://modules/typesengine://modules/instancesengine://entitiesengine://entities/{stableId}engine://render/screenshotengine://viewport/camera
Tools are generated from engine automation command definitions such as
add-entity, delete-entity, set-transform, modify-component,
reinitialize-world, and viewport camera commands.
Generated references:
Security
The MCP server can read and mutate world files. JavaScript/MJS world files can execute code. Only attach MCP clients you trust to workspaces and world files you trust.
Read SECURITY.md before exposing live sessions or opening unknown world files.
Local Development
From the repo root:
npm run build --workspace=mcp
npm run test --workspace=mcpDocumentation
License
Apache-2.0
