o3de-mcp

o3de-mcp

Automate Open 3D Engine (O3DE) with AI — an MCP server for editor control, project & build management.

Category
访问服务器

README

o3de-mcp

License

Automate Open 3D Engine (O3DE) with AI — an MCP server for editor control, project & build management.

See the architecture documentation for a detailed system diagram and communication flow.

Features

Capability Detection:

  • get_capabilities — check editor connectivity and CLI availability before using other tools
  • Dynamic tool discovery — new tools are automatically reported

Editor Automation (requires a running O3DE Editor with the AiCompanion + EditorPythonBindings gems):

  • Execute arbitrary Python scripts inside the editor (azlmbr API)
  • List, create, delete, and duplicate entities
  • Add components, get/set component properties
  • Load, save, and query levels
  • Enter/exit game mode, undo/redo
  • Fast-fail when editor is unreachable (avoids repeated timeouts)

Project & Build Management (CLI-based, no editor required):

  • Discover local O3DE engine installations (multi-engine support)
  • List registered projects, gems, and available templates
  • Create projects and gems from templates
  • Register, enable, and disable gems
  • Edit project properties
  • Build projects via CMake
  • Export projects for distribution

Prerequisites

  • Python 3.10+
  • O3DE installed and registered (engine path in the O3DE manifest or O3DE_ENGINE_PATH env var)
    • Linux/macOS: ~/.o3de/o3de_manifest.json
    • Windows: %USERPROFILE%\.o3de\o3de_manifest.json
  • For editor tools (optional): O3DE Editor running with the o3de-ai-companion-gem and EditorPythonBindings gems enabled. The companion gem provides the AgentServer that o3de-mcp connects to for real-time editor automation. Project tools work without the editor — call get_capabilities() to check what's available.

Installation

pip install -e .

Or with uv:

uv pip install -e .

Usage

As a standalone MCP server

o3de-mcp

With Claude Code

Add to your MCP config (or use a project-level .mcp.json):

  • Linux/macOS: ~/.claude/mcp.json
  • Windows: %USERPROFILE%\.claude\mcp.json
{
  "mcpServers": {
    "o3de": {
      "command": "o3de-mcp"
    }
  }
}

With Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "o3de": {
      "command": "o3de-mcp"
    }
  }
}

Testing with MCP Inspector

MCP Inspector provides a web UI for interactively testing tools without an AI assistant. Useful for verifying tool behavior, inspecting responses, and debugging.

npx @modelcontextprotocol/inspector o3de-mcp

This opens the Inspector UI at http://localhost:6274. From there you can browse all registered tools, invoke them with custom parameters, and see raw responses.

To pass environment variables (e.g., a custom engine path or editor port):

npx @modelcontextprotocol/inspector -e O3DE_ENGINE_PATH=/path/to/engine -e O3DE_EDITOR_PORT=4600 o3de-mcp

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run a single test
pytest tests/test_project.py::TestValidateName::test_valid_simple

# Lint and format
ruff check src/ tests/
ruff format src/ tests/

# Type checking
mypy src/

SBOM (Software Bill of Materials)

A CycloneDX SBOM is generated on every CI run and uploaded as a build artifact. To generate one locally:

python scripts/generate-sbom.py              # JSON + XML
python scripts/generate-sbom.py --format json # JSON only

The script creates an isolated virtual environment with only runtime dependencies, so the SBOM accurately reflects what ships — dev/build tooling is excluded.

CI

GitHub Actions runs lint, type checking, tests, and SBOM generation on every push and PR to main. See .github/workflows/ci.yml.

Security

  • Editor tool inputs (entity IDs, component types) are validated against strict regex patterns before use.
  • User-supplied strings are serialized via json.dumps / json.loads when passed into editor scripts — never raw string interpolation.
  • Project and gem names are validated against O3DE naming conventions.
  • Filesystem paths are resolved and validated before being passed to subprocesses.

Documentation

Document Audience Description
AGENTS.md AI agents Token-efficient usage guide, decision trees, error handling
docs/architecture.md Developers & agents System architecture diagram and communication flows
docs/tool-reference.md Agents & developers Compact parameter reference for all tools
docs/recipes.md Agents & developers Composable patterns for scenes, physics, lighting, scripting
docs/components.md Agents & developers O3DE component name catalog with dependency chains

Examples

Progressive walkthroughs from project creation to a complete game:

  1. New Project — create, configure, and build a project
  2. Build a Scene — sky, lights, ground, camera, static objects
  3. Physics Playground — dynamic bodies, triggers, stacking
  4. Scripted Game — complete mini-game with player, obstacles, goals
  5. Batch Operations — efficient bulk entity creation patterns
  6. CLI-Only Workflow — project management without the editor
  7. Gem Development — create and integrate custom gems
  8. MCP Inspector — interactively test tools via a web UI

Configuration

Environment Variable Description Default
O3DE_ENGINE_PATH Override automatic engine discovery Auto-detected from manifest
O3DE_ENGINE_NAME Select engine by name when multiple are registered First valid engine
O3DE_EDITOR_HOST Editor remote console host 127.0.0.1
O3DE_EDITOR_PORT Editor remote console port 4600
O3DE_EDITOR_TIMEOUT Editor command timeout (seconds) 10
O3DE_CMAKE_GENERATOR CMake generator for builds Auto-detected per platform
O3DE_CONFIGURE_TIMEOUT CMake configure timeout (seconds) 600
O3DE_BUILD_TIMEOUT CMake build timeout (seconds) 1800
O3DE_EXPORT_TIMEOUT Project export timeout (seconds) 3600

The server also reads the O3DE manifest for registered engines, projects, and gems:

  • Linux/macOS: ~/.o3de/o3de_manifest.json
  • Windows: %USERPROFILE%\.o3de\o3de_manifest.json

Related Projects

License

This project is dual-licensed under Apache 2.0 or MIT (your choice), matching the O3DE engine license. Free for commercial and non-commercial use.

SPDX-License-Identifier: Apache-2.0 OR MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选