Labsco
ayeletstudioindia logo

Unreal Engine Code Analyzer

โ˜… 156

from ayeletstudioindia

Analyzes Unreal Engine source code to provide context for AI assistants.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

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.

Unreal Engine Code Analyzer Server MCP server

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

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

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:

npm test

Run tests in watch mode (useful during development):

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