OpenCAGE can be driven by an AI assistant, such as Claude, through the Model Context Protocol (MCP). You describe what you want — "create a new level which spawns the player in a corridor built from SCI_AndroidLab's pieces" — and the assistant does it in OpenCAGE:
The assistant works in the OpenCAGE window you have open, through the same code the editor's own menus and dialogs use. Everything it does appears in the editor and the Viewport as it happens. Script changes land on the editor's undo history, and nothing is written to the game until it (or you) saves.
OpenCAGE ships a small program for this, OpenCAGE.MCP.exe, in the folder OpenCAGE is installed in, beside OpenCAGE.exe. On Steam, find that folder with right-click OpenCAGE → Manage → Browse local files. Your AI app runs that program. If OpenCAGE isn't open, the program starts it the first time the assistant uses it.
Claude Desktop: open Settings → Developer → Edit Config and add OpenCAGE to claude_desktop_config.json, using the path to your OpenCAGE folder (backslashes doubled), then restart Claude Desktop:
{
"mcpServers": {
"opencage": {
"command": "C:\\Path\\To\\OpenCAGE\\OpenCAGE.MCP.exe"
}
}
}
Claude Code: add it once from a terminal:
claude mcp add opencage -- "C:\Path\To\OpenCAGE\OpenCAGE.MCP.exe"
Other MCP apps: any app that can run a local ("stdio") MCP server works the same way: give it the path to OpenCAGE.MCP.exe. The program also takes these optional arguments:
--editor <path> — the OpenCAGE.exe to start, if not the one beside it;--no-launch — only work with an OpenCAGE that is already open;-- — passed to OpenCAGE when the program starts it, for example -- -disable_viewport.Assistants can only reach OpenCAGE while Options → Misc → Allow AI Assistants (MCP) is ticked. It is on by default. Untick it and nothing can drive the editor: an assistant that tries, even one that started OpenCAGE itself, is told to turn the option back on.
OpenCAGE.MCP.exe passes the assistant's requests to the open OpenCAGE over a local connection. Only programs running as you, on your PC, can use it. With more than one OpenCAGE open, the first one opened takes the requests.While the assistant is running one of OpenCAGE's tools, the left end of the status bar, along the bottom of the OpenCAGE window, shows a blue label: AI assistant working: tool..., naming the tool, such as AI assistant working: Open level... or AI assistant working: Find composites.... OpenCAGE's usual status messages (loading, saving, undo) appear beside it. The label stays for about three seconds after each call, so an assistant making several calls in a row shows one steady label, and it goes once the assistant stops. While it's up, let the assistant finish before you edit or close OpenCAGE.

Closing OpenCAGE while a tool is running asks first, in a box titled Close OpenCAGE?: An AI assistant is in the middle of a task in OpenCAGE (tool). Closing OpenCAGE now stops it part-way through. Close OpenCAGE anyway?

While the question is up, the assistant waits for you: anything new it asks OpenCAGE for is turned away until you've answered, and a level that's loading carries on loading but doesn't open its panels until then. The question only comes up while a tool is actually running. Between calls, even while the label is still showing, OpenCAGE closes as it always does.
These are the tools the assistant is given. You don't call them yourself — describe what you want and the assistant picks them — but knowing them helps you ask for what's possible.
| Area | Tools |
|---|---|
| Levels & game | get_editor_state, list_levels, load_level, create_level (optionally importing composites), save_level (optionally Save & Build, choosing which bakers run), list_backups, create_backup, restore_backup, delete_backups, launch_game, launch_options, close_game, game_directories, runtime_utils (Live Link to the running game) |
| Finding things | find_composites, get_composite, describe_entity, find_entities (by name, type, value or place), find_references, get_placements, get_zones, list_dead_proxies, list_function_types, describe_function_type, list_enums, list_enum_string_values |
| Scripting | create_entities (functions, composite instances, variables, aliases and proxies, with positions, parameters, links and flowgraph nodes), create_composite, set_parameters, remove_parameters, rename_entity, delete_entities, copy_entities, add_links, remove_links, set_trigger_sequence, retarget_proxy, remove_references |
| Composites | manage_composites (rename, move, folders, delete), deinstance and group_into_composite — the De-instance Composite Instance and Create Composite From Selected commands — and duplicate_composite (optionally switching chosen instances to the copy, as Create Composite Variant does) |
| Flowgraphs | get_flowgraph, layout_flowgraph (gives a composite shown as a link list flowgraph pages that draw all its links), edit_flowgraph_pages (including arrange, as Arrange Page does), edit_flowgraph_nodes, capture_flowgraph |
| CAGEAnimation | get_cage_animation, find_cage_animations, animate_parameters (keyframes), set_animation_events, preview_cage_animation, set_animated_model |
| Entity resources | get_entity_resources, set_renderable (model and materials), set_collision, set_physics_system, get_character_appearance, set_character_appearance |
| Collision & physics | list_collision_proxies, import_collision_proxy, list_physics_systems, import_physics_system, export_collision_mesh |
| Other levels | search_level, describe_level_composite, port_composites (see Composite Porting), export_composites_to_levels, release_level_cache |
| Models | list_models, describe_model, place_model, import_model, export_model, edit_model |
| Materials & textures | list_materials, describe_material, create_material, edit_material, list_material_permutations, retry_shader_harvest, list_material_mappings, edit_material_mapping, list_textures, describe_texture, import_texture, export_textures, edit_texture |
| Sky & UI | get_galaxy, set_galaxy, list_ui_files, edit_ui_pak |
| Animation & sound | list_animation_sets, list_animations, describe_animation, list_skeletons, export_animations, import_animation, list_blend_sets, edit_blend_set, list_anim_trees, get_anim_tree, edit_anim_tree, get_behaviour_tree, edit_behaviour_tree, list_sound_banks, describe_sound_event, export_sound, replace_sound |
| Packages | export_composite_package, inspect_composite_package, import_composite_package |
| Configuration & text | list_config_files, read_config, write_config, edit_config_elements, get_config_record, set_config_record, reset_configs, list_strings, set_strings, list_text_databases, set_text_databases — what the configuration editors edit |
| Editor & viewport | open_composite, select_entities, editor_options, undo, redo, capture_viewport, get_viewport_state, set_viewport_view, set_viewport_camera, viewport_action, place_in_viewport, get_composite_preview |
Asked for "a new level which spawns the player in a corridor built from SCI_AndroidLab", an assistant works through something like this:
create_level makes and opens a new level, as File → Create Level does.search_level on PRODUCTION/SCI_ANDROIDLAB finds Archetypes\Script\Mission\SpawnPositionSelect, the composite that holds the player's Character. It also finds the corridor pieces under AYZ\Science\...\Corridor_Elements, and where the level places them.port_composites brings them in, with their models, materials, textures and collision. The player's display models (DisplayModel:RIPLEY_FP and the suit variants) come along automatically.create_entities places the floor, wall and arch pieces in the new level's root composite, spaced by their sizes. It also places a SpawnPositionSelect instance on the floor, with spawn_on_reset set to true so the player spawns there when the level starts.create_composite can add some script as well. For example, a light that a ThinkOnce switches on at the start. Its flowgraph page is laid out automatically.capture_viewport lets it look at the result, and save_level with Save & Build writes the level and builds its navmesh, lighting and the rest. Then it's ready for Launch Game.AI: prefix ("AI: Add 17 entities"). Edit → Undo (or asking the assistant to undo) takes it back. This covers everything in the level's script: entities, parameters, links, trigger sequences, CAGEAnimations, entity resources (models, collision, physics), flowgraph pages and nodes, and composites (new, renamed, moved, deleted, De-instance, Create Composite). Porting composites, imports, and changes to models, materials, textures, animations, sounds, configuration files and text can't be undone, as when you make them yourself; the tools that change files every level shares can do a dry run first.runtime_utils lets it check what the game is running, call methods on entities and take screenshots of the game. set_viewport_view's live_link_camera links the game's camera and the Viewport's. See Live Link.