NeoStack AI

Gemini CLI

Using Google's Gemini CLI as your AI agent

Gemini CLI provides access to Google's Gemini models with a generous free tier.

Video Tutorial

Setup

  1. Install Gemini CLI:

    npm install -g @google/gemini-cli
  2. Authenticate using one of these methods:

    • Google Account - Run gemini and sign in when prompted
    • API Key - Set GEMINI_API_KEY environment variable
    • Vertex AI - Set GOOGLE_CLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS
  3. Configure the MCP server connection (see below)

  4. Open the Agent Chat window in Unreal and select Gemini CLI from the agent dropdown

MCP Server Configuration

To give Gemini CLI access to Unreal Editor tools, you need to configure the MCP server connection.

gemini mcp add unreal-editor http://localhost:9315/sse --transport sse

Option 2: Manual Configuration

Add the following to your ~/.gemini/settings.json (Linux/macOS) or %APPDATA%\gemini\settings.json (Windows):

{
  "mcpServers": {
    "unreal-editor": {
      "url": "http://localhost:9315/sse",
      "timeout": 60000,
      "description": "Unreal Editor tools via AgentIntegrationKit"
    }
  }
}

The timeout field (in milliseconds) is optional but recommended for tool calls that may take longer to execute.

The MCP server starts automatically when Unreal Editor launches with the plugin enabled. Make sure Unreal Editor is running before starting Gemini CLI.

Verify Connection

After configuration, start Gemini CLI and ask it to list available tools or run a safe read-only call like read_asset to verify the connection:

> What tools do you have access to from unreal-editor?

Features

  • Multiple Gemini models (2.5 Pro, 2.5 Flash, etc.)
  • Web search and URL context tools
  • Sandbox execution environment
  • MCP server support for Unreal Editor tools
  • Custom commands and extensions

Common unified Unreal tools exposed by this plugin include edit_rigging, edit_animation_asset, edit_character_asset, edit_ai_tree, edit_graph, and generate_asset.

Pricing

Gemini CLI offers a generous free tier through Google AI Studio. Check Google AI Studio for current limits.

Custom Path

If your Gemini CLI installation is in a non-standard location, set the path in Project Settings > Plugins > Agent Integration Kit > Gemini CLI Path.

Troubleshooting

IssueSolution
MCP tools not availableEnsure Unreal Editor is running and the plugin is enabled
Connection refusedCheck that the MCP server port (default 9315) is not blocked
Wrong portVerify the port in Project Settings > Plugins > Agent Integration Kit > Server Port
Tools timing outIncrease timeout in settings.json (default is 30000ms)

Reset MCP Configuration

If you're having persistent connection issues, try removing and re-adding the server:

gemini mcp remove unreal-editor
gemini mcp add unreal-editor http://localhost:9315/sse --transport sse

Debug Mode

Run Gemini CLI with debug logging to see detailed connection info:

gemini --log-level debug

Gemini CLI uses the SSE transport (Server-Sent Events). The plugin supports this via the GET /sse endpoint. Make sure your MCP configuration uses http://localhost:9315/sse as the URL.

On this page