> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Godot AI Coding in VS Code with Summer Engine

> Connect Summer Engine's MCP server to VS Code or GitHub Copilot and build games compatible with Godot 4 right inside Microsoft's editor and Copilot's AI agent.

## Summer Engine in VS Code & GitHub Copilot

VS Code and GitHub Copilot's coding agent support MCP (Model Context Protocol). With Summer Engine's integration, the AI can control your game engine: add nodes to scenes, set properties, import assets, run the game, and debug, all from within your coding workflow.

This guide covers both **VS Code** (with Copilot or other AI extensions) and **GitHub Copilot's agent mode**—they use the same MCP configuration.

## Prerequisites

* **VS Code**: With GitHub Copilot (agent mode) or another MCP-aware AI extension
* **Node.js**: For running the MCP server (Node 18+)
* **Summer Engine**: Installed and running with your project open

## Configuration

VS Code reads MCP servers from:

* **Project-level:** `.vscode/mcp.json` in your project root (recommended, stays with the project)
* **User-level:** Run **MCP: Open User Configuration** from the Command Palette (⇧⌘P)

### Step 1: Create or Edit the Config File

Create `.vscode/mcp.json` in your project root, or open the user config via **MCP: Open User Configuration**. If the file already exists, add Summer Engine to the existing `servers` object.

### Step 2: Add Summer Engine

<CodeGroup>
  ```json New file (.vscode/mcp.json) theme={null}
  {
    "servers": {
      "summer-engine": {
        "type": "stdio",
        "command": "npx",
        "args": ["summer-engine", "mcp"]
      }
    }
  }
  ```

  ```json Adding to existing servers theme={null}
  {
    "servers": {
      "other-server": { ... },
      "summer-engine": {
        "type": "stdio",
        "command": "npx",
        "args": ["summer-engine", "mcp"]
      }
    }
  }
  ```
</CodeGroup>

<Tip>
  **Alternative:** Use **MCP: Add Server** from the Command Palette for a guided setup. Choose "Standard I/O" and enter `npx` as the command with `summer-engine mcp` as arguments.
</Tip>

### Step 3: Restart VS Code

Close and reopen VS Code (or reload the window) so it loads the new MCP config. The Summer Engine MCP server starts when VS Code starts; it connects to the engine on the first tool call.

### Step 4: Verify

1. Run **MCP: List Servers** from the Command Palette
2. You should see **summer-engine** with 52 tools
3. Try a prompt in Copilot Chat: "Use Summer Engine to add a MeshInstance3D with a BoxMesh to the scene"

If the node appears in Summer Engine, the setup is working.

## Using Summer Engine with VS Code / Copilot

Once configured, the AI can use Summer Engine's tools when you ask for game-related changes. Example prompts:

* "Add a Camera3D and DirectionalLight3D to the scene root"
* "Get the scene tree from Summer Engine"
* "Import this model and add it to the World node: \[URL]"
* "Run the game and capture a screenshot"
* "Set the project's main scene to res\://main.tscn"

<Tip>
  **Engine must be running.** VS Code and Copilot talk to Summer Engine over localhost. Open your project in the engine first, or run `npx summer-engine run` from the project directory.
</Tip>

## Troubleshooting

### "Summer Engine is not running"

Start Summer Engine and open your project. The MCP server connects to the engine's local API on port 6550. The engine writes a token to `~/.summer/api-token` when it starts.

### MCP server not appearing

* **Config path:** Verify `.vscode/mcp.json` is in your project root (the folder you opened in VS Code)
* **JSON validity:** Ensure no trailing commas, proper quotes, and valid JSON structure
* **Restart:** Fully quit and reopen VS Code

### Tools return errors

See the [Tools Reference](/mcp/tools-reference) for parameter formats. Common issues: wrong node path format (`./World/Player`), invalid property values (use engine string format like `"Vector3(0, 10, 0)"`), or the game running when scene edits are attempted (stop it first with `summer_stop`).

## Next Steps

<CardGroup cols={2}>
  <Card title="Tools Reference" icon="wrench" href="/mcp/tools-reference">
    All 23 MCP tools with parameters and examples
  </Card>

  <Card title="Building a Game" icon="gamepad-2" href="/mcp/building-a-game">
    How an AI builds a full game using MCP
  </Card>

  <Card title="MCP Setup Overview" icon="plug" href="/mcp/setup">
    Architecture, prerequisites, and other IDEs
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/mcp/cli-reference">
    summer install, run, create, and more
  </Card>
</CardGroup>

***

Need help or have questions? Reach out to our founders at [founders@summerengine.com](mailto:founders@summerengine.com) or join our community on [Discord](https://discord.gg/yUpgtxnZky) for fast responses.
