# yurineko73/godot-mcp-native architecture

> Architecture diagram of the GitHub repository yurineko73/godot-mcp-native, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yurineko73/godot-mcp-native
- Repository: https://github.com/yurineko73/godot-mcp-native

## Overview

Godot MCP Native lets AI assistants inspect and edit a Godot project through MCP; its gdmcp CLI offers agent-friendly commands against the same service. The main workflow is assistant or CLI request → transport/API handling → tool execution → project operation and response. The graph also preserves the documented scene, node, script, resource, editor, debugging, project, and runtime capabilities. CLI wiring is supported by excerpts and the SOURCE INDEX; several Godot-side internals were not sampled, so their links rely on README statements or are omitted.

Main entry points: [`cli/gdmcp/src/main.rs`](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/main.rs) (CLI entry), [`addons/godot_mcp/native_mcp/tool_executor.gd`](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/native_mcp/tool_executor.gd) (Tool registry and execution), [`cli/gdmcp/src/client.rs`](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/client.rs) (API client), [`cli/gdmcp/src/commands/tool_call.rs`](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/tool_call.rs) (Direct tool calls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["gdmcp CLI"]
  node_cli_entry["CLI entry<br/>[main.rs]"]
  node_cli_config["CLI config<br/>[config.rs]"]
  node_cli_commands["Command routing<br/>[cli.rs]"]
  node_api_client["API client<br/>[client.rs]"]
  node_cli_contracts["API contracts<br/>[contracts.rs]"]
  node_cli_output["Output rendering<br/>[output.rs]"]
  node_cmd_batch["Batch operations<br/>[batch.rs]"]
  node_cmd_debug["Debug commands<br/>[debug.rs]"]
  node_cmd_nodes["Node commands<br/>[nodes.rs]"]
  node_cmd_project["Project commands<br/>[project.rs]"]
  node_cmd_resources["Resource commands<br/>[resources.rs]"]
  node_cmd_runtime["Runtime commands<br/>[runtime.rs]"]
  node_cmd_scenes["Scene commands<br/>[scenes.rs]"]
  node_cmd_scripts["Script commands<br/>[scripts.rs]"]
  node_cmd_tool_call["Direct tool calls<br/>[tool_call.rs]"]
  node_cmd_tools["Tool discovery<br/>[tools.rs]"]
end

subgraph group_server["MCP service"]
  node_mcp_server["MCP server"]
  node_transports["HTTP / stdio<br/>[mcp_http_server.gd]"]
  node_tool_engine["Tool registry and execution<br/>[tool_executor.gd]"]
end

subgraph group_tools["Godot tools"]
  node_node_tools["Node tools"]
  node_scene_tools["Scene tools"]
  node_script_tools["Script tools"]
  node_resource_tools["Resource tools"]
  node_editor_tools["Editor tools"]
  node_project_tools["Project tools"]
  node_debug_tools["Debug tools"]
end

subgraph group_project["Project operations"]
  node_runtime_probe["Runtime probe"]
  node_godot_project[("Godot project")]
end

node_assistant(("AI assistant"))

node_assistant -->|"sends MCP requests"| node_mcp_server
node_assistant -->|"runs commands"| node_cli_entry
node_cli_entry -->|"loads config"| node_cli_config
node_cli_entry -->|"dispatches"| node_cli_commands
node_cli_entry -->|"creates client"| node_api_client
node_cli_entry -->|"renders response"| node_cli_output
node_cli_entry -->|"routes batch"| node_cmd_batch
node_cli_entry -->|"routes debug"| node_cmd_debug
node_cli_entry -->|"routes nodes"| node_cmd_nodes
node_cli_entry -->|"routes project"| node_cmd_project
node_cli_entry -->|"routes resources"| node_cmd_resources
node_cli_entry -->|"routes runtime"| node_cmd_runtime
node_cli_entry -->|"routes scenes"| node_cmd_scenes
node_cli_entry -->|"routes scripts"| node_cmd_scripts
node_cli_entry -->|"routes direct call"| node_cmd_tool_call
node_cli_entry -->|"routes discovery"| node_cmd_tools
node_cmd_scenes -->|"calls tool API"| node_cmd_tool_call
node_cmd_scripts -->|"calls tool API"| node_cmd_tool_call
node_cmd_batch -->|"preflights and executes"| node_api_client
node_cmd_tool_call -->|"posts execution"| node_api_client
node_api_client -->|"decodes errors"| node_cli_contracts
node_api_client -->|"sends HTTP requests"| node_mcp_server
node_mcp_server -->|"serves MCP"| node_transports
node_transports -.->|"dispatches tools"| node_tool_engine
node_tool_engine -->|"provides tools"| node_node_tools
node_tool_engine -->|"provides tools"| node_scene_tools
node_tool_engine -->|"provides tools"| node_script_tools
node_tool_engine -->|"provides tools"| node_resource_tools
node_tool_engine -->|"provides tools"| node_editor_tools
node_tool_engine -->|"provides tools"| node_project_tools
node_tool_engine -->|"provides tools"| node_debug_tools
node_debug_tools -->|"includes runtime probe"| node_runtime_probe
node_node_tools -->|"reads and edits"| node_godot_project
node_scene_tools -->|"reads and edits"| node_godot_project
node_script_tools -->|"reads and edits"| node_godot_project
node_resource_tools -->|"reads and edits"| node_godot_project
node_editor_tools -->|"controls editor"| node_godot_project
node_project_tools -->|"inspects project"| node_godot_project
node_runtime_probe -->|"observes runtime"| node_godot_project

click node_cli_entry "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/main.rs"
click node_cli_config "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/config.rs"
click node_cli_commands "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/cli.rs"
click node_api_client "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/client.rs"
click node_cli_contracts "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/contracts.rs"
click node_cli_output "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/output.rs"
click node_cmd_batch "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/batch.rs"
click node_cmd_debug "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/debug.rs"
click node_cmd_nodes "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/nodes.rs"
click node_cmd_project "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/project.rs"
click node_cmd_resources "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/resources.rs"
click node_cmd_runtime "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/runtime.rs"
click node_cmd_scenes "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/scenes.rs"
click node_cmd_scripts "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/scripts.rs"
click node_cmd_tool_call "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/tool_call.rs"
click node_cmd_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/tools.rs"
click node_mcp_server "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/mcp_server_native.gd"
click node_transports "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/native_mcp/mcp_http_server.gd"
click node_tool_engine "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/native_mcp/tool_executor.gd"
click node_node_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/node_tools_native.gd"
click node_scene_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/scene_tools_native.gd"
click node_script_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/script_tools_native.gd"
click node_resource_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/resource_tools_native.gd"
click node_editor_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/editor_tools_native.gd"
click node_project_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/project_tools_native.gd"
click node_debug_tools "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/debug_tools_native.gd"
click node_runtime_probe "https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/runtime/mcp_runtime_probe.gd"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli_entry,node_cli_config,node_cli_commands,node_api_client,node_cli_contracts,node_cli_output,node_cmd_batch,node_cmd_debug,node_cmd_nodes,node_cmd_project,node_cmd_resources,node_cmd_runtime,node_cmd_scenes,node_cmd_scripts,node_cmd_tool_call,node_cmd_tools toneBlue
class node_mcp_server,node_transports,node_tool_engine toneAmber
class node_node_tools,node_scene_tools,node_script_tools,node_resource_tools,node_editor_tools,node_project_tools,node_debug_tools toneMint
class node_runtime_probe,node_godot_project toneRose
class node_assistant toneIndigo
```

## Components

### gdmcp CLI

- [CLI entry](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/main.rs): `cli/gdmcp/src/main.rs`
- [CLI config](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/config.rs): `cli/gdmcp/src/config.rs`
- [Command routing](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/cli.rs): `cli/gdmcp/src/cli.rs`
- [API client](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/client.rs): `cli/gdmcp/src/client.rs`
- [API contracts](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/contracts.rs): `cli/gdmcp/src/contracts.rs`
- [Output rendering](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/output.rs): `cli/gdmcp/src/output.rs`
- [Batch operations](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/batch.rs): `cli/gdmcp/src/commands/batch.rs`
- [Debug commands](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/debug.rs): `cli/gdmcp/src/commands/debug.rs`
- [Node commands](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/nodes.rs): `cli/gdmcp/src/commands/nodes.rs`
- [Project commands](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/project.rs): `cli/gdmcp/src/commands/project.rs`
- [Resource commands](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/resources.rs): `cli/gdmcp/src/commands/resources.rs`
- [Runtime commands](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/runtime.rs): `cli/gdmcp/src/commands/runtime.rs`
- [Scene commands](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/scenes.rs): `cli/gdmcp/src/commands/scenes.rs`
- [Script commands](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/scripts.rs): `cli/gdmcp/src/commands/scripts.rs`
- [Direct tool calls](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/tool_call.rs): `cli/gdmcp/src/commands/tool_call.rs`
- [Tool discovery](https://github.com/yurineko73/godot-mcp-native/blob/main/cli/gdmcp/src/commands/tools.rs): `cli/gdmcp/src/commands/tools.rs`

### MCP service

- [MCP server](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/mcp_server_native.gd): `addons/godot_mcp/mcp_server_native.gd`
- [HTTP / stdio](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/native_mcp/mcp_http_server.gd): `addons/godot_mcp/native_mcp/mcp_http_server.gd`
- [Tool registry and execution](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/native_mcp/tool_executor.gd): `addons/godot_mcp/native_mcp/tool_executor.gd`

### Godot tools

- [Node tools](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/node_tools_native.gd): `addons/godot_mcp/tools/node_tools_native.gd`
- [Scene tools](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/scene_tools_native.gd): `addons/godot_mcp/tools/scene_tools_native.gd`
- [Script tools](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/script_tools_native.gd): `addons/godot_mcp/tools/script_tools_native.gd`
- [Resource tools](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/resource_tools_native.gd): `addons/godot_mcp/tools/resource_tools_native.gd`
- [Editor tools](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/editor_tools_native.gd): `addons/godot_mcp/tools/editor_tools_native.gd`
- [Project tools](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/project_tools_native.gd): `addons/godot_mcp/tools/project_tools_native.gd`
- [Debug tools](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/tools/debug_tools_native.gd): `addons/godot_mcp/tools/debug_tools_native.gd`

### Project operations

- [Runtime probe](https://github.com/yurineko73/godot-mcp-native/blob/main/addons/godot_mcp/runtime/mcp_runtime_probe.gd): `addons/godot_mcp/runtime/mcp_runtime_probe.gd`
- **Godot project**

### Other components

- **AI assistant**

## Connections

- AI assistant → MCP server: sends MCP requests (evidence: `README.md`)
- AI assistant → CLI entry: runs commands (evidence: `README.md`)
- CLI entry → CLI config: loads config (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Command routing: dispatches (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → API client: creates client (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Output rendering: renders response (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Batch operations: routes batch (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Debug commands: routes debug (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Node commands: routes nodes (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Project commands: routes project (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Resource commands: routes resources (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Runtime commands: routes runtime (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Scene commands: routes scenes (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Script commands: routes scripts (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Direct tool calls: routes direct call (evidence: `cli/gdmcp/src/main.rs`)
- CLI entry → Tool discovery: routes discovery (evidence: `cli/gdmcp/src/main.rs`)
- Scene commands → Direct tool calls: calls tool API (evidence: `cli/gdmcp/src/commands/scenes.rs`)
- Script commands → Direct tool calls: calls tool API (evidence: `cli/gdmcp/src/commands/scripts.rs`)
- Batch operations → API client: preflights and executes (evidence: `cli/gdmcp/src/commands/batch.rs`)
- Direct tool calls → API client: posts execution (evidence: `cli/gdmcp/src/commands/tool_call.rs`)
- API client → API contracts: decodes errors (evidence: `cli/gdmcp/src/client.rs`)
- API client → MCP server: sends HTTP requests (evidence: `README.md`)
- MCP server → HTTP / stdio: serves MCP (evidence: `README.md`)
- HTTP / stdio → Tool registry and execution: dispatches tools
- Tool registry and execution → Node tools: provides tools (evidence: `README.md`)
- Tool registry and execution → Scene tools: provides tools (evidence: `README.md`)
- Tool registry and execution → Script tools: provides tools (evidence: `README.md`)
- Tool registry and execution → Resource tools: provides tools (evidence: `README.md`)
- Tool registry and execution → Editor tools: provides tools (evidence: `README.md`)
- Tool registry and execution → Project tools: provides tools (evidence: `README.md`)
- Tool registry and execution → Debug tools: provides tools (evidence: `README.md`)
- Debug tools → Runtime probe: includes runtime probe (evidence: `README.md`)
- Node tools → Godot project: reads and edits (evidence: `README.md`)
- Scene tools → Godot project: reads and edits (evidence: `README.md`)
- Script tools → Godot project: reads and edits (evidence: `README.md`)
- Resource tools → Godot project: reads and edits (evidence: `README.md`)
- Editor tools → Godot project: controls editor (evidence: `README.md`)
- Project tools → Godot project: inspects project (evidence: `README.md`)
- Runtime probe → Godot project: observes runtime (evidence: `README.md`)
