AI Agents, CLI & MCP
Build worlds with
your AI agent.
Ask the AI assistant built into your dashboard, or bring your own agent. Allegory has a command line and an MCP server, so Claude, ChatGPT or OpenClaw can list your scenes, edit entities and push scene code.
Available now
Four ways AI works on your scenes.
The built-in assistant, the terminal and your own agent all work on the same scenes — and the activity log shows which door each change came through.
Built-in AI assistant
AvailableDescribe what you want in your Allegory dashboard and the assistant builds it. Nothing to install or connect.
Try it free →Allegory CLI
AvailableScenes, entities, components and scripts from any terminal. Table output for people, --json for scripts and agents.
Install →MCP server
AvailableOne tool per CLI command at app.allegoryxr.com/mcp. Connect Claude Code, Claude Desktop or claude.ai in a minute.
Connect →Your own editor
AvailablePull a scene’s HTML, JavaScript and CSS into a folder, edit with your tools, push back what changed.
How it works →Command line
allegory, in your terminal.
Commands are allegory <resource> <action>. The list comes from Allegory itself, so new commands appear without updating the CLI — allegory help always shows what your account can run today.
- Sign-in works over ssh and inside containers
- --json prints the raw result; errors come back as JSON too
- Pick an account once with allegory use "Acme Studio"
# install — Node 20 or later, no dependencies npm install -g allegoryxr # sign in: prints a link and a code — approve in any browser allegory login allegory scenes list --search mars allegory scenes show 42 allegory entities update 7 --name "Airlock" allegory components add --entity 7 --type light allegory activity list --limit 10 # everything, grouped by resource, with examples allegory help
Scene code
Edit scene scripts in your own editor.
Pull a scene’s scripts into a folder, one file each, and push back only what changed. Great for you — and for coding agents that live in a repo.
- If someone changed a script on the server since you pulled, push skips it and tells you
- --dry-run shows the plan; --json reports every file for CI
- New .js, .css or .html files become new scripts
# writes ./mars-base/, one file per script allegory scripts pull scene_abc123 cd mars-base && $EDITOR spin.js # what would be sent, then send what changed allegory scripts push --dry-run allegory scripts push # new file? attach it to an entity as it goes up allegory scripts push --attach wobble.js=12
MCP server
Connect your agent in one line.
Allegory is an MCP server with one tool per CLI command. Your agent signs in through the browser with OAuth — no API keys to paste.
- Claude Desktop and claude.ai: Settings → Connectors → Add custom connector, with https://app.allegoryxr.com/mcp
- Stdio-only clients: npx -y mcp-remote https://app.allegoryxr.com/mcp
- Run allegory mcp to print these instructions any time
# Claude Code
claude mcp add --transport http allegory \
https://app.allegoryxr.com/mcp
# or a project's .mcp.json
{
"mcpServers": {
"allegory": {
"type": "http",
"url": "https://app.allegoryxr.com/mcp"
}
}
}
Built for agents
Safe to hand to an agent.
Deletes need a yes
A delete shows what it removes and asks you to type its name. Without a terminal — in a script or agent — it is refused unless --yes is given.
Roles respected
Any member can read and change things; deleting needs the account’s owner or an admin. The CLI says so before sending.
Activity log
Who changed what, and through which door: the editor, AI, the CLI or MCP.
Predictable output
--json on stdout, JSON errors on stderr, and exit codes 0, 1 and 2 an agent can act on.
Example
One prompt, one component, one command.
Ask any assistant for an A-Frame component, save it, and put it on an entity from the terminal.
- Works with Claude, ChatGPT, OpenClaw and other assistants
- The same component runs on a headset, a phone and a laptop
- Any text argument can come from a file: --code-file, --attributes-file
Write an A-Frame component that slowly spins an entity. Make the speed configurable.
AFRAME.registerComponent('spin', {
schema: { speed: { default: 20 } },
tick(time, delta) {
const deg = this.data.speed * delta / 1000;
this.el.object3D.rotation.y +=
THREE.MathUtils.degToRad(deg);
}
});
Questions
Agents, answered.
How do I install the CLI?
You need Node 20 or later. Run npm install -g allegoryxr, then allegory login and approve the sign-in in your browser. allegory help lists everything you can run.
Is there AI built into Allegory?
Yes. Your Allegory dashboard has a built-in AI assistant: describe what you want and it works on your scene. Changes it makes appear in the activity log, marked AI. You can also bring your own agent through the CLI or MCP.
What can an agent do?
Whatever the CLI can: list and create scenes, show a scene’s entities, update entities and components, pull and push scene scripts, and read the activity log. Run allegory help for the current list.
Which assistants work?
Any MCP client can connect to https://app.allegoryxr.com/mcp — Claude Code, Claude Desktop and claude.ai among them. Coding agents that run terminal commands can use the CLI directly.
Can an agent delete my scenes?
Only if its account role allows deletes (owner or admin), and only with an explicit --yes when there is no person at a terminal to confirm. Every change shows up in the activity log.
Is Allegory affiliated with Anthropic or OpenAI?
No. Claude, ChatGPT and OpenClaw are named because they work with A-Frame and MCP. Their names and logos belong to their owners.