Logo de py-ue5-mcp-server

py-ue5-mcp-server

Comunidade
edi3on

an ue5 mcp server that allows the user to access functions in blueprint actors

Publicado poredi3on
Repositóriopy-ue5-mcp-server
IdiomaPython
Forks
7
Estrelas
8
Ferramentas disponíveis
0
Tipo de transportestdio
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    py-ue5-mcp-server disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • Ferramentas disponíveis: 0

    Confira abaixo as ações que o cliente MCP pode executar, com nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    Estrelas: 8 e forks: 7 no repositório vinculado.

MseeP.ai Security Assessment Badge

py-ue5-mcp-server

Unreal Engine 5 MCP Server for Claude

This repository contains a Model Context Protocol (MCP) Python server that enables Claude to interact with Unreal Engine 5 through natural language. By leveraging the Remote Control API, this integration allows you to create, manipulate, and control 3D objects and Blueprint actors in Unreal Engine directly through conversations with Claude.

Overview

This MCP server bridges the gap between Claude's natural language processing capabilities and Unreal Engine's powerful 3D environment. Users can simply describe what they want to create or modify in Unreal Engine, and Claude will interpret these requests and execute the appropriate actions through the MCP server.

Key Features

  • Natural Language Control: Create and manipulate 3D objects using conversational text with Claude
  • Blueprint Actor Interaction: Access functions in Blueprint actors through simple text prompts
  • Scene Management: Build, modify, and arrange scenes with text-based instructions
  • Asset Discovery: Search and utilize assets in your Unreal project through Claude
  • Real-time Feedback: Get immediate visual results in your Unreal Engine viewport

Requirements

  • Python 3.10+
  • Unreal Engine 5.x with Remote Control API plugin enabled
  • Claude Desktop (Windows)
  • Basic knowledge of Unreal Engine fundamentals

Installation

1. Set Up the Repository

bash
git clone https://github.com/yourusername/ue5-mcp.git
cd ue5-mcp
pip install uv mcp requests

2. Configure Claude Desktop

  1. Open Claude Desktop
  2. Go to File → Settings → Developer → Edit Config
  3. Add the following to claude_desktop_config.json, adjusting the path to your local repository:
json
{
  "mcpServers": {
    "ue5-mcp": {
      "command": "uv",
      "args": ["--directory", "C:\\path\\to\\ue5-mcp", "run", "ue5_mcp_server.py"],
      "env": {}
    }
  }
}

Note: If you have other MCP servers configured, you may need to disable them to prevent conflicts.

3. Prepare Unreal Engine

  1. Open Unreal Engine and your project
  2. Ensure the Remote Control API plugin is enabled:
    • Edit → Plugins → Search for "Remote Control API"
    • Check that it's enabled and restart the editor if needed

Usage

Getting Started

  1. Launch Unreal Engine with your project
  2. Start Claude Desktop (restart it if it was already running)
  3. Begin chatting with Claude about creating or modifying content in Unreal Engine

Example Prompts

Here are some example prompts you can use with Claude:

  • "Create a snowman at position 0, 100, 50"
  • "Spawn a snowman family in the scene"
  • "Modify the center snowman's scale to make it bigger"
  • "Move the snowman to position 100, 200, 0"
  • "Rotate the snowman 45 degrees"
  • "Get a list of all actors in the scene"

Understanding Units

The server uses centimeters as the default unit for all measurements:

  • 1 Unreal Unit = 1 centimeter
  • A standard snowman has dimensions of approximately 350cm × 350cm (3.5m × 3.5m)
  • Positioning and scaling are all relative to this centimeter-based system

How It Works

Technical Implementation

The UE5-MCP server uses the following core components:

1. MCP Server Framework

The server is built using FastMCP, which establishes a bidirectional communication channel between Claude and Unreal Engine. The main components are:

python
# Create the MCP server with lifespan support
mcp = FastMCP(
    "Unreal-Engine-MCP",
    description="Unreal Engine integration through the Model Context Protocol (Default unit: CENTIMETERS)",
    lifespan=server_lifespan
)

2. Connection to Unreal Engine

The server connects to Unreal Engine through the Remote Control API, a built-in HTTP server that runs inside Unreal:

python
# Default Unreal Engine Remote Control API settings
UE_HOST = "http://127.0.0.1"  # localhost
UE_PORT = "30010"             # default port
UE_URL = f"{UE_HOST}:{UE_PORT}/remote/object/call"

3. Core Tools

The server exposes several tools to Claude through function decorators:

python
@mcp.tool()
async def get_all_scene_actors(ctx: Context) -> str:
    """Get a list of all actors in the current level"""
    # Implementation...

@mcp.tool()
async def spawn_actor(ctx: Context, blueprint_path: str, ...) -> str:
    """Spawn a blueprint actor in the current Unreal Engine level"""
    # Implementation...
    
@mcp.tool()
async def spawn_snowman_family(ctx: Context, ...) -> str:
    """Spawns a family of three snowmen in the current Unreal Engine level"""
    # Implementation...
    
@mcp.tool()
async def modify_actor(ctx: Context, actor_path: str, ...) -> str:
    """Modify an existing actor's properties in the Unreal Engine level"""
    # Implementation...

4. Actor Manipulation

The server can create and modify actors in the scene through Remote Control API calls:

python
# Illustrative example of how actor creation works
spawn_payload = {
    "objectPath": "/Script/EditorScriptingUtilities.Default__EditorLevelLibrary",
    "functionName": "SpawnActorFromClass",
    "parameters": {
        "ActorClass": blueprint_path,
        "Location": {"X": location[0], "Y": location[1], "Z": location[2]},
        "Rotation": {"Pitch": rotation[0], "Yaw": rotation[1], "Roll": rotation[2]}
    },
    "generateTransaction": True
}

Each action is executed as an HTTP request to the Unreal Engine Remote Control API, which returns results in JSON format.

Featured Capabilities

1. Snowman Family Creation

One of the showcase features is the ability to create a family of snowmen with a single command. The server will:

  • Create an initial snowman actor
  • Duplicate it to create two more snowmen with different positions, rotations, and scales
  • Arrange them in a family formation

This demonstrates how complex scenes can be created with simple natural language commands.

2. Blueprint Actor Duplication

The server can duplicate existing actors in the scene using their native Blueprint functions:

python
async def duplicate_snowman(
    snowman_actor_path: str, 
    location: Tuple[float, float, float], 
    rotation: Tuple[float, float, float], 
    scale: Tuple[float, float, float], 
    name: Optional[str]
) -> Optional[str]:
    """Calls the Duplicate function in a Blueprint actor"""
    # Implementation...

3. Actor Modification

The server supports modifying any property of an existing actor:

  • Change position, rotation, and scale
  • Rename actors
  • Only update specific properties while preserving others

Troubleshooting

Connection Issues

  • Ensure Unreal Engine is running before starting Claude Desktop
  • Check that the Remote Control API plugin is enabled in Unreal Engine
  • Verify no firewall is blocking communication on port 30010 (default port)
  • Look for error messages in the Claude Desktop console

Command Execution Problems

  • Start with simple commands to verify basic functionality
  • Check the syntax of your requests
  • Look for error messages in the Unreal Engine output log
  • Ensure the referenced actors or assets exist in your project

Server Logs

The server generates detailed logs that can help diagnose issues:

2023-11-15 14:32:45,123 - Unreal-MCP-Server - INFO - Unreal Engine MCP server starting up...
2023-11-15 14:32:45,125 - Unreal-MCP-Server - INFO - Default unit system: CENTIMETERS (1 Unreal Unit = 1 cm)
2023-11-15 14:32:45,234 - Unreal-MCP-Server - INFO - Connected to Unreal Engine Remote Control API

Development and Customization

Adding New Functions

To add new functionality to the server:

  1. Create a new helper function that implements the desired behavior
  2. Expose it to Claude using the @mcp.tool() decorator
  3. Document the function clearly with docstrings

Example:

python
@mcp.tool()
async def your_new_function(ctx: Context, param1: str, param2: int) -> str:
    """
    Description of what your function does
    
    Parameters:
        param1: Description of param1
        param2: Description of param2
        
    Returns:
        JSON string with the result
    """
    # Implementation...

Customizing Blueprint Interactions

You can adapt the server to work with your custom Blueprint actors by modifying the existing functions or creating new ones specific to your actors.

Acknowledgements

This project was inspired by similar MCP integrations for Claude, particularly the original Unreal Engine MCP server by runeape-sats. Special thanks to the Anthropic team for creating Claude and enabling these kinds of integrations.

Instalação

TypingMind
Pré-requisitos:

Node.js 18+

{
  "mcpServers": {
    "edi3on-py-ue5-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Use o MCP de py-ue5-mcp-server com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar py-ue5-mcp-server, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, acesse Configurações > Configurações avançadas > Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Configurações.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione py-ue5-mcp-server como servidor

Quando o status do conector for Pronto, clique em Editar servidores e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar servidores.
  3. Cole a configuração do servidor MCP de py-ue5-mcp-server.
  4. Salve a lista de servidores.
  5. Se quiser confirmar que o conector ainda está pronto para uso, atualize a página.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar servidores
{
  "mcpServers": {
    "edi3on-py-ue5-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "py-ue5-mcp-server"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de py-ue5-mcp-server, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de py-ue5-mcp-server.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar py-ue5-mcp-server para me ajudar nesta tarefa?
py-ue5-mcp-server
Claro. Já li.
Veja o que encontrei usando py-ue5-mcp-server.

Perguntas frequentes

Para que serve o servidor MCP py-ue5-mcp-server?

py-ue5-mcp-server é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP py-ue5-mcp-server com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar py-ue5-mcp-server com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP py-ue5-mcp-server com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com py-ue5-mcp-server conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP py-ue5-mcp-server ao TypingMind?

py-ue5-mcp-server funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP py-ue5-mcp-server oferece no TypingMind?

py-ue5-mcp-server disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP py-ue5-mcp-server?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se py-ue5-mcp-server exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇