Logo von Unreal Engine 代码分析器 MCP 服务器

Unreal Engine 代码分析器 MCP 服务器

Organisation
ayeletstudioindia

MCP server for Unreal Engine 5

Herausgeberayeletstudioindia
Repositoryunreal-analyzer-mcp
SpracheTypeScript
Forks
33
Sterne
159
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    Unreal Engine 代码分析器 MCP 服务器 stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    159 Sterne und 33 Forks im verlinkten Repository.

MseeP.ai Security Assessment Badge

Unreal Engine Code Analyzer MCP Server

A Model Context Protocol (MCP) server that provides powerful source code analysis capabilities for Unreal Engine codebases. This tool enables AI assistants like Claude and Cline to deeply understand and analyze Unreal Engine source code.

Features

  • Class Analysis: Get detailed information about C++ classes including methods, properties, and inheritance
  • Hierarchy Mapping: Visualize and understand class inheritance hierarchies
  • Code Search: Search through code with context-aware results
  • Reference Finding: Locate all references to classes, functions, or variables
  • Subsystem Analysis: Analyze major Unreal Engine subsystems like Rendering, Physics, etc.
  • Game Genre Knowledge: Built-in knowledge base of game genres, features, and implementation patterns
  • Pattern Detection & Learning: Identifies common Unreal Engine patterns and provides learning resources
  • Custom Codebase Support: Analyze your own Unreal Engine project codebase

Quick Start

Installation

  1. Clone this repository:
bash
git clone https://github.com/ayeletstudioindia/unreal-analyzer-mcp
cd unreal-analyzer-mcp
  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build

Configuration

For Claude Desktop App

Add the following to your Claude desktop configuration file (%APPDATA%\Claude\claude_desktop_config.json on Windows):

json
{
  "mcpServers": {
    "unreal-analyzer": {
      "command": "node",
      "args": ["path/to/unreal-analyzer/build/index.js"],
      "env": {}
    }
  }
}

For Cline

Add the following to your Cline MCP settings file (%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json on Windows):

json
{
  "mcpServers": {
    "unreal-analyzer": {
      "command": "node",
      "args": ["path/to/unreal-analyzer/build/index.js"],
      "env": {}
    }
  }
}

Technical Details

The analyzer is built using:

  • TypeScript for type-safe code
  • Tree-sitter for robust C++ parsing
  • Model Context Protocol SDK for AI assistant integration
  • Glob for file pattern matching

Key dependencies:

  • @modelcontextprotocol/create-server: ^0.1.0
  • tree-sitter: ^0.20.1
  • tree-sitter-cpp: ^0.20.0
  • glob: ^8.1.0

Usage

Before using any analysis tools, you must first set either the Unreal Engine source path or a custom codebase path:

Setting Up Analysis

For Unreal Engine Source Code

typescript
{
  "name": "set_unreal_path",
  "arguments": {
    "path": "/path/to/UnrealEngine/Source"
  }
}

For Custom C++ Codebases

typescript
{
  "name": "set_custom_codebase",
  "arguments": {
    "path": "/path/to/your/codebase"
  }
}

The custom codebase feature allows you to analyze any C++ project. For example:

  • Game engines (Unity, Godot, custom engines)
  • Graphics libraries (OpenGL, Vulkan, DirectX)
  • Frameworks (Qt, Boost, SFML)
  • Any C++ application or library

Example analyzing a custom game engine:

typescript
// Initialize with custom codebase
{
  "name": "set_custom_codebase",
  "arguments": {
    "path": "/path/to/game-engine"
  }
}

// Analyze engine's renderer class
{
  "name": "analyze_class",
  "arguments": {
    "className": "Renderer"
  }
}

// Find all shader-related code
{
  "name": "search_code",
  "arguments": {
    "query": "shader|glsl|hlsl",
    "filePattern": "*.{h,cpp,hpp}"
  }
}

// Get render system class hierarchy
{
  "name": "find_class_hierarchy",
  "arguments": {
    "className": "RenderSystem",
    "includeImplementedInterfaces": true
  }
}

Example analyzing a Qt application:

typescript
// Initialize with Qt project
{
  "name": "set_custom_codebase",
  "arguments": {
    "path": "/path/to/qt-app"
  }
}

// Find widget class definitions
{
  "name": "search_code",
  "arguments": {
    "query": "class.*:.*public.*QWidget",
    "filePattern": "*.h"
  }
}

// Analyze main window class
{
  "name": "analyze_class",
  "arguments": {
    "className": "MainWindow"
  }
}

// Find signal/slot connections
{
  "name": "find_references",
  "arguments": {
    "identifier": "connect",
    "type": "function"
  }
}

Available Tools

1. Class Analysis

typescript
// Get detailed information about the AActor class
{
  "name": "analyze_class",
  "arguments": {
    "className": "AActor"
  }
}

Example output:

json
{
  "name": "AActor",
  "properties": [
    {
      "name": "RootComponent",
      "type": "USceneComponent*",
      "access": "protected"
    }
    // ... other properties
  ],
  "methods": [
    {
      "name": "BeginPlay",
      "returnType": "void",
      "access": "protected",
      "virtual": true
    }
    // ... other methods
  ]
}

2. Class Hierarchy Analysis

typescript
// Get the inheritance hierarchy for ACharacter
{
  "name": "find_class_hierarchy",
  "arguments": {
    "className": "ACharacter",
    "includeImplementedInterfaces": true
  }
}

Example output:

json
{
  "class": "ACharacter",
  "inheritsFrom": "APawn",
  "interfaces": ["IMovementModeInterface"],
  "hierarchy": [
    "ACharacter",
    "APawn",
    "AActor",
    "UObject"
  ]
}

3. Reference Finding

typescript
// Find all references to the BeginPlay function
{
  "name": "find_references",
  "arguments": {
    "identifier": "BeginPlay",
    "type": "function"
  }
}

Example output:

json
{
  "references": [
    {
      "file": "Actor.cpp",
      "line": 245,
      "context": "void AActor::BeginPlay() { ... }"
    },
    {
      "file": "Character.cpp",
      "line": 178,
      "context": "Super::BeginPlay();"
    }
  ]
}

4. Code Search

typescript
// Search for physics-related code
{
  "name": "search_code",
  "arguments": {
    "query": "PhysicsHandle",
    "filePattern": "*.h",
    "includeComments": true
  }
}

Example output:

json
{
  "matches": [
    {
      "file": "PhysicsEngine/PhysicsHandleComponent.h",
      "line": 15,
      "context": "class UPhysicsHandleComponent : public UActorComponent",
      "snippet": "// Component used for grabbing and moving physics objects"
    }
  ]
}

5. Pattern Detection & Best Practices

The analyzer provides two powerful tools for understanding and following Unreal Engine best practices:

Pattern Detection
typescript
// Detect patterns in a file
{
  "name": "detect_patterns",
  "arguments": {
    "filePath": "Source/MyGame/MyActor.h"
  }
}

Example output:

json
{
  "patterns": [
    {
      "pattern": "UPROPERTY Macro",
      "description": "Property declaration for Unreal reflection system",
      "location": "Source/MyGame/MyActor.h:15",
      "context": "UPROPERTY(EditAnywhere, BlueprintReadWrite)\nfloat Health;",
      "improvements": "Consider adding a Category specifier for better organization\nConsider adding Meta tags for validation",
      "documentation": "https://docs.unrealengine.com/5.0/en-US/unreal-engine-uproperty-specifier-reference/",
      "bestPractices": "Use appropriate specifiers (EditAnywhere, BlueprintReadWrite)\nConsider replication needs (Replicated, ReplicatedUsing)\nGroup related properties with categories",
      "examples": "UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = \"Combat\")\nfloat Health;\nUPROPERTY(Replicated, Meta = (ClampMin = \"0.0\"))\nfloat Speed;"
    }
  ]
}
Best Practices Guide
typescript
// Get best practices for specific Unreal concepts
{
  "name": "get_best_practices",
  "arguments": {
    "concept": "UPROPERTY"  // or UFUNCTION, Components, Events, Replication, Blueprints
  }
}

Example output:

json
{
  "description": "Property declaration for Unreal reflection system",
  "bestPractices": [
    "Use appropriate specifiers (EditAnywhere, BlueprintReadWrite)",
    "Consider replication needs (Replicated, ReplicatedUsing)",
    "Group related properties with categories",
    "Use Meta tags for validation and UI customization"
  ],
  "examples": [
    "UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = \"Combat\")\nfloat Health;",
    "UPROPERTY(Replicated, Meta = (ClampMin = \"0.0\"))\nfloat Speed;"
  ],
  "documentation": "https://docs.unrealengine.com/5.0/en-US/unreal-engine-uproperty-specifier-reference/"
}

The best practices guide covers key Unreal Engine concepts:

  • UPROPERTY: Property reflection and exposure
  • UFUNCTION: Function reflection and Blueprint integration
  • Components: Component creation and management
  • Events: Event handling and delegation
  • Replication: Network replication setup
  • Blueprints: Blueprint/C++ interaction patterns

6. API Documentation Query

typescript
// Search the API documentation
{
  "name": "query_api",
  "arguments": {
    "query": "Actor",
    "category": "Object",
    "module": "Core",
    "includeExamples": true,
    "maxResults": 10
  }
}

Example output:

json
{
  "results": [
    {
      "class": "AActor",
      "description": "Base class for all actors in the game",
      "module": "Core",
      "category": "Object",
      "syntax": "class AActor : public UObject",
      "examples": [
        "// Create a new actor\nAActor* MyActor = GetWorld()->SpawnActor<AActor>();"
      ],
      "remarks": [
        "Actors are the base building blocks of the game",
        "Can be placed in levels or spawned dynamically"
      ],
      "documentation": "https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Core/AActor",
      "relevance": 100
    }
  ]
}

The API documentation query tool provides:

  • Full-text search across class documentation
  • Filtering by category and module
  • Code examples and usage patterns
  • Relevance-based sorting of results
  • Links to official documentation

7. Subsystem Analysis

typescript
// Analyze the Physics subsystem
{
  "name": "analyze_subsystem",
  "arguments": {
    "subsystem": "Physics"
  }
}

Example output:

json
{
  "name": "Physics",
  "coreClasses": [
    "UPhysicsEngine",
    "FPhysScene",
    "UBodySetup"
  ],
  "keyFeatures": [
    "PhysX integration",
    "Collision detection",
    "Physical materials"
  ],
  "commonUseCases": [
    "Character movement",
    "Vehicle simulation",
    "Destructible environments"
  ]
}

API Documentation

The analyzer now includes comprehensive API documentation capabilities:

  1. Automatic Documentation Generation

    • Extracts documentation from source code comments
    • Analyzes class structure and relationships
    • Categorizes classes by type and module
    • Generates syntax examples and usage patterns
  2. Smart Search

    • Full-text search across all documentation
    • Relevance-based ranking of results
    • Category and module filtering
    • Code example inclusion
  3. Documentation Categories

    • Object: Base object classes (UObject derivatives)
    • Actor: Actor classes (AActor derivatives)
    • Structure: Data structures and types
    • Component: Component classes
    • Miscellaneous: Other classes and utilities
  4. Module Organization

    • Core: Core engine functionality
    • RenderCore: Rendering system
    • PhysicsCore: Physics engine
    • And other engine modules
  5. Integration with Existing Tools

    • Links with class analysis for detailed information
    • Connects to pattern detection for best practices
    • References official Unreal Engine documentation
    • Provides learning resources and examples

Best Practices

  1. Always set either the Unreal Engine path or custom codebase path before using analysis tools
  2. Use specific class names when analyzing (e.g., "MyClass" instead of just "Class")
  3. Leverage the file pattern parameter in search_code to narrow down results
  4. Include implemented interfaces when analyzing class hierarchies for complete understanding
  5. Use the subsystem analysis tool to get a high-level overview before diving into specific classes (Unreal Engine only)

Error Handling

The analyzer will throw clear error messages when:

  • No codebase path is set (Unreal Engine or custom)
  • Provided path does not exist or is inaccessible
  • Class or symbol cannot be found in the codebase
  • Invalid file patterns are provided
  • Syntax errors in search queries or C++ code
  • Access to source files is restricted
  • Tree-sitter parsing fails for C++ files

Performance Considerations

  • Large codebases may take longer to analyze
  • Complex class hierarchies might require more processing time
  • Broad search patterns could result in many matches
  • Consider using more specific queries for faster results

Testing

The project includes comprehensive test coverage for all major components:

Test Coverage

  • Analyzer Tests: Core functionality tests for the UnrealCodeAnalyzer class

    • Initialization and path validation
    • Class analysis and parsing
    • Reference finding
    • Code searching
    • Subsystem analysis
    • Cache management
  • Game Genres Tests: Validation of the game genres knowledge base

    • Data structure verification
    • Genre-specific feature validation
    • Component naming conventions
    • Data completeness checks
  • MCP Server Tests: Testing of the MCP server implementation

    • Server initialization
    • Tool registration and handling
    • Request/response validation
    • Error handling
    • Tool-specific functionality tests

Running Tests

Run all tests:

bash
npm test

Run tests in watch mode (useful during development):

bash
npm run test:watch

Writing Tests

When contributing new features, please ensure:

  1. All new functionality has corresponding test coverage
  2. Tests are organized in the src/__tests__ directory
  3. Mock external dependencies appropriately
  4. Follow the existing test patterns for consistency

Contributing

Contributions are welcome! Please feel free to submit pull requests with improvements to:

  • Source code parsing capabilities
  • New analysis features
  • Performance optimizations
  • Documentation improvements
  • Test coverage

Before submitting a PR:

  1. Ensure all tests pass (npm test)
  2. Add tests for new functionality
  3. Update documentation as needed

Installation

TypingMind
{
  "mcpServers": {
    "unreal-analyzer-mcp": {
      "command": "node",
      "args": [
        "path/to/unreal-analyzer/build/index.js"
      ]
    }
  }
}

Unreal Engine 代码分析器 MCP 服务器 MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald Unreal Engine 代码分析器 MCP 服务器 verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

Unreal Engine 代码分析器 MCP 服务器 als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für Unreal Engine 代码分析器 MCP 服务器 ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "unreal-analyzer-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "unreal-analyzer"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von Unreal Engine 代码分析器 MCP 服务器. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von Unreal Engine 代码分析器 MCP 服务器.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit Unreal Engine 代码分析器 MCP 服务器 bei dieser Aufgabe helfen?
Unreal Engine 代码分析器 MCP 服务器
Gerne. Ich habe es gelesen.
Das habe ich mit Unreal Engine 代码分析器 MCP 服务器 gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server Unreal Engine 代码分析器 MCP 服务器 verwendet?

Unreal Engine 代码分析器 MCP 服务器 ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich Unreal Engine 代码分析器 MCP 服务器 MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie Unreal Engine 代码分析器 MCP 服务器 mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum Unreal Engine 代码分析器 MCP 服务器 MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald Unreal Engine 代码分析器 MCP 服务器 verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich Unreal Engine 代码分析器 MCP 服务器 MCP mit TypingMind?

Unreal Engine 代码分析器 MCP 服务器 wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt Unreal Engine 代码分析器 MCP 服务器 MCP in TypingMind bereit?

Unreal Engine 代码分析器 MCP 服务器 stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um Unreal Engine 代码分析器 MCP 服务器 MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls Unreal Engine 代码分析器 MCP 服务器 eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇