# shin2344234/godot-mcp architecture

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

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

## Overview

godot-mcp is an MCP server through which AI clients inspect and modify Godot projects, use GDScript language services, run and debug games, and execute tests. The main workflow is client requests → MCP tool routing → domain operations → the live editor bridge or headless Godot, with results returned as tool responses. Separate branches cover language-server support, live-game control/debugging, and test execution. Source excerpts establish several internal calls; broader feature links use README documentation, so some domain-to-backend links are documented rather than traced through sampled operation implementations.

Main entry points: [`server/src/ops/catalog.ts`](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/catalog.ts) (Tool catalog), [`server/src/bridge/editorBridge.ts`](https://github.com/shin2344234/godot-mcp/blob/main/server/src/bridge/editorBridge.ts) (Editor bridge), [`server/src/index.ts`](https://github.com/shin2344234/godot-mcp/blob/main/server/src/index.ts) (CLI entry), [`server/src/mcp/server.ts`](https://github.com/shin2344234/godot-mcp/blob/main/server/src/mcp/server.ts) (MCP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["MCP interface"]
  node_entrypoint["CLI entry<br/>[index.ts]"]
  node_mcp["MCP server<br/>[server.ts]"]
  node_catalog["Tool catalog<br/>[catalog.ts]"]
  node_resources["Resources and prompts<br/>[resources.ts]"]
end

subgraph group_project["Project authoring"]
  node_scene["Scene and node edits<br/>[scene.ts]"]
  node_projectops["Project settings<br/>[projectEdit.ts]"]
  node_resourcesops["Resource authoring<br/>[resources.ts]"]
  node_animation["Animation and audio<br/>[animation.ts]"]
  node_world["World and visual tools<br/>[world.ts]"]
  node_files["Project files<br/>[files.ts]"]
  node_exports["Imports and exports<br/>[exports.ts]"]
end

subgraph group_runtime["Godot runtime"]
  node_bridge["Editor bridge<br/>[editorBridge.ts]"]
  node_headless["Headless Godot<br/>[headless.ts]"]
  node_runs["Game run manager<br/>[runs.ts]"]
  node_debug["Live game debug<br/>[debug.ts]"]
  node_gameops["Live game tools<br/>[liveGame.ts]"]
end

subgraph group_services["Language and testing"]
  node_lspmanager["Language server manager<br/>[manager.ts]"]
  node_lspclient["LSP client<br/>[client.ts]"]
  node_code["GDScript tools<br/>[code.ts]"]
  node_tests["Test runner<br/>[runner.ts]"]
  node_frameworks["Test frameworks<br/>[frameworks.ts]"]
  node_junit["JUnit results<br/>[junit.ts]"]
end

node_client(("AI agent"))
node_godot(("Godot engine"))

node_client -->|"starts server"| node_entrypoint
node_entrypoint -->|"serves requests"| node_mcp
node_mcp -->|"loads operations"| node_catalog
node_mcp -->|"exposes"| node_resources
node_mcp -->|"returns tool results"| node_client
node_catalog -.->|"routes tools"| node_scene
node_catalog -.->|"routes tools"| node_projectops
node_catalog -.->|"routes tools"| node_resourcesops
node_catalog -.->|"routes tools"| node_animation
node_catalog -.->|"routes tools"| node_world
node_catalog -.->|"routes tools"| node_files
node_catalog -.->|"routes tools"| node_exports
node_scene -.->|"edits through"| node_bridge
node_scene -.->|"falls back to"| node_headless
node_projectops -.->|"edits through"| node_bridge
node_resourcesops -.->|"edits through"| node_bridge
node_animation -.->|"edits through"| node_bridge
node_world -.->|"edits through"| node_bridge
node_exports -.->|"runs exports"| node_headless
node_bridge -->|"sends editor requests"| node_godot
node_headless -->|"runs headless"| node_godot
node_entrypoint -->|"creates service"| node_runs
node_runs -.->|"launches game"| node_godot
node_catalog -.->|"routes tools"| node_debug
node_catalog -.->|"routes tools"| node_gameops
node_debug -->|"controls run"| node_runs
node_gameops -.->|"controls run"| node_runs
node_entrypoint -->|"creates manager"| node_lspmanager
node_lspmanager -->|"uses editor bridge"| node_bridge
node_lspmanager -->|"connects client"| node_lspclient
node_code -->|"uses language services"| node_lspmanager
node_catalog -.->|"routes tools"| node_code
node_catalog -.->|"routes tools"| node_tests
node_tests -->|"runs Godot tests"| node_headless
node_tests -->|"detects frameworks"| node_frameworks
node_tests -->|"parses results"| node_junit

click node_entrypoint "https://github.com/shin2344234/godot-mcp/blob/main/server/src/index.ts"
click node_mcp "https://github.com/shin2344234/godot-mcp/blob/main/server/src/mcp/server.ts"
click node_catalog "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/catalog.ts"
click node_resources "https://github.com/shin2344234/godot-mcp/blob/main/server/src/mcp/resources.ts"
click node_scene "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/scene.ts"
click node_projectops "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/projectEdit.ts"
click node_resourcesops "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/resources.ts"
click node_animation "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/animation.ts"
click node_world "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/world.ts"
click node_files "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/files.ts"
click node_exports "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/exports.ts"
click node_bridge "https://github.com/shin2344234/godot-mcp/blob/main/server/src/bridge/editorBridge.ts"
click node_headless "https://github.com/shin2344234/godot-mcp/blob/main/server/src/godot/headless.ts"
click node_runs "https://github.com/shin2344234/godot-mcp/blob/main/server/src/godot/runs.ts"
click node_debug "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/debug.ts"
click node_gameops "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/liveGame.ts"
click node_lspmanager "https://github.com/shin2344234/godot-mcp/blob/main/server/src/lsp/manager.ts"
click node_lspclient "https://github.com/shin2344234/godot-mcp/blob/main/server/src/lsp/client.ts"
click node_code "https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/code.ts"
click node_tests "https://github.com/shin2344234/godot-mcp/blob/main/server/src/testing/runner.ts"
click node_frameworks "https://github.com/shin2344234/godot-mcp/blob/main/server/src/testing/frameworks.ts"
click node_junit "https://github.com/shin2344234/godot-mcp/blob/main/server/src/testing/junit.ts"

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_entrypoint,node_mcp,node_catalog,node_resources toneBlue
class node_scene,node_projectops,node_resourcesops,node_animation,node_world,node_files,node_exports toneAmber
class node_bridge,node_headless,node_runs,node_debug,node_gameops toneMint
class node_lspmanager,node_lspclient,node_code,node_tests,node_frameworks,node_junit toneRose
class node_client,node_godot toneIndigo
```

## Components

### MCP interface

- [CLI entry](https://github.com/shin2344234/godot-mcp/blob/main/server/src/index.ts): `server/src/index.ts`
- [MCP server](https://github.com/shin2344234/godot-mcp/blob/main/server/src/mcp/server.ts): `server/src/mcp/server.ts`
- [Tool catalog](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/catalog.ts): `server/src/ops/catalog.ts`
- [Resources and prompts](https://github.com/shin2344234/godot-mcp/blob/main/server/src/mcp/resources.ts): `server/src/mcp/resources.ts`

### Project authoring

- [Scene and node edits](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/scene.ts): `server/src/ops/scene.ts`
- [Project settings](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/projectEdit.ts): `server/src/ops/projectEdit.ts`
- [Resource authoring](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/resources.ts): `server/src/ops/resources.ts`
- [Animation and audio](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/animation.ts): `server/src/ops/animation.ts`
- [World and visual tools](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/world.ts): `server/src/ops/world.ts`
- [Project files](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/files.ts): `server/src/ops/files.ts`
- [Imports and exports](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/exports.ts): `server/src/ops/exports.ts`

### Godot runtime

- [Editor bridge](https://github.com/shin2344234/godot-mcp/blob/main/server/src/bridge/editorBridge.ts): `server/src/bridge/editorBridge.ts`
- [Headless Godot](https://github.com/shin2344234/godot-mcp/blob/main/server/src/godot/headless.ts): `server/src/godot/headless.ts`
- [Game run manager](https://github.com/shin2344234/godot-mcp/blob/main/server/src/godot/runs.ts): `server/src/godot/runs.ts`
- [Live game debug](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/debug.ts): `server/src/ops/debug.ts`
- [Live game tools](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/liveGame.ts): `server/src/ops/liveGame.ts`

### Language and testing

- [Language server manager](https://github.com/shin2344234/godot-mcp/blob/main/server/src/lsp/manager.ts): `server/src/lsp/manager.ts`
- [LSP client](https://github.com/shin2344234/godot-mcp/blob/main/server/src/lsp/client.ts): `server/src/lsp/client.ts`
- [GDScript tools](https://github.com/shin2344234/godot-mcp/blob/main/server/src/ops/code.ts): `server/src/ops/code.ts`
- [Test runner](https://github.com/shin2344234/godot-mcp/blob/main/server/src/testing/runner.ts): `server/src/testing/runner.ts`
- [Test frameworks](https://github.com/shin2344234/godot-mcp/blob/main/server/src/testing/frameworks.ts): `server/src/testing/frameworks.ts`
- [JUnit results](https://github.com/shin2344234/godot-mcp/blob/main/server/src/testing/junit.ts): `server/src/testing/junit.ts`

### Other components

- **AI agent**
- **Godot engine**

## Connections

- AI agent → CLI entry: starts server (evidence: `README.md`)
- CLI entry → MCP server: serves requests (evidence: `server/src/index.ts`)
- MCP server → Tool catalog: loads operations (evidence: `server/src/mcp/server.ts`)
- MCP server → Resources and prompts: exposes (evidence: `server/src/mcp/server.ts`)
- MCP server → AI agent: returns tool results (evidence: `README.md`)
- Tool catalog → Scene and node edits: routes tools
- Tool catalog → Project settings: routes tools
- Tool catalog → Resource authoring: routes tools
- Tool catalog → Animation and audio: routes tools
- Tool catalog → World and visual tools: routes tools
- Tool catalog → Project files: routes tools
- Tool catalog → Imports and exports: routes tools
- Scene and node edits → Editor bridge: edits through (evidence: `README.md`)
- Scene and node edits → Headless Godot: falls back to (evidence: `README.md`)
- Project settings → Editor bridge: edits through (evidence: `README.md`)
- Resource authoring → Editor bridge: edits through (evidence: `README.md`)
- Animation and audio → Editor bridge: edits through (evidence: `README.md`)
- World and visual tools → Editor bridge: edits through (evidence: `README.md`)
- Imports and exports → Headless Godot: runs exports (evidence: `README.md`)
- Editor bridge → Godot engine: sends editor requests (evidence: `server/src/bridge/editorBridge.ts`)
- Headless Godot → Godot engine: runs headless (evidence: `server/src/godot/headless.ts`)
- CLI entry → Game run manager: creates service (evidence: `server/src/index.ts`)
- Game run manager → Godot engine: launches game (evidence: `README.md`)
- Tool catalog → Live game debug: routes tools
- Tool catalog → Live game tools: routes tools
- Live game debug → Game run manager: controls run (evidence: `server/src/ops/debug.ts`)
- Live game tools → Game run manager: controls run (evidence: `README.md`)
- CLI entry → Language server manager: creates manager (evidence: `server/src/index.ts`)
- Language server manager → Editor bridge: uses editor bridge (evidence: `server/src/lsp/manager.ts`)
- Language server manager → LSP client: connects client (evidence: `server/src/lsp/manager.ts`)
- GDScript tools → Language server manager: uses language services (evidence: `server/src/ops/code.ts`)
- Tool catalog → GDScript tools: routes tools
- Tool catalog → Test runner: routes tools
- Test runner → Headless Godot: runs Godot tests (evidence: `server/src/testing/runner.ts`)
- Test runner → Test frameworks: detects frameworks (evidence: `server/src/testing/runner.ts`)
- Test runner → JUnit results: parses results (evidence: `server/src/testing/runner.ts`)
