Godot Scene Analyzer
Analyzes Godot game projects to enforce ECS architecture patterns, automatically detecting when scene scripts contain game logic that should be in the ECS layer and validating separation between presentation and logic code.
README
Custom Godot Scene Analyzer MCP Server
What It Is
An MCP (Model Context Protocol) server that gives Claude deep, semantic understanding of your Godot scenes—specifically designed to enforce and validate your ECS-driven architecture where Godot handles visuals and your custom ECS handles all game logic.
Not a generic scene reader. This server knows your architectural rules and actively helps you maintain separation between presentation and logic.
The Problem It Solves
Without This Server
You: "Check if any of my scenes have game logic in scripts"
Claude: "I'd need you to paste each .tscn file and script. Can you share them?"
You paste 30 files...
Claude: "In player.gd line 47, there's a velocity calculation. That might be game logic?"
Problems:
- ❌ Manual file dumping every time
- ❌ Claude guesses what's "game logic" vs "visual sync"
- ❌ No systematic validation across your project
- ❌ You maintain the rules in your head
With This Server
You: "Check if any of my scenes have game logic in scripts"
Claude: Automatically scans your Godot project, understands your ECS architecture rules, and provides:
- ✅ Instant analysis of all scenes
- ✅ Precise identification of architecture violations
- ✅ Clear distinction between valid visual sync code and improper game logic
- ✅ Systematic validation with your architectural rules built-in
- ✅ Actionable recommendations for fixes
Features
Architectural Enforcement
- ECS-Aware Analysis: Understands the separation between Godot (presentation) and your ECS (logic)
- Rule Validation: Automatically detects when scripts contain game logic that should be in ECS
- Pattern Recognition: Distinguishes between acceptable visual synchronization code and architectural violations
Deep Scene Understanding
- Scene Hierarchy Analysis: Maps node structures and relationships
- Script Inspection: Analyzes attached GDScript files for logic patterns
- Resource Tracking: Identifies dependencies and connections between scenes
Smart Reporting
- Violation Detection: Flags scripts that break the ECS architecture
- Context-Aware Suggestions: Provides specific guidance on moving logic to ECS
- Project-Wide Insights: Summarizes architectural health across all scenes
How It Works
The MCP server integrates with Claude to provide:
- Automatic Project Scanning: Reads your Godot project structure
- Rule-Based Analysis: Applies your ECS architectural patterns
- Semantic Understanding: Gives Claude context about what each scene does and how it fits your architecture
- Interactive Queries: Answer questions about scenes without manual file sharing
Use Cases
Architecture Validation
"Are there any scenes violating the ECS pattern?"
"Which scripts are doing game logic calculations?"
"Show me all scenes that directly modify game state"
Refactoring Support
"Help me move the logic from player.gd to the ECS"
"Which visual sync patterns am I using consistently?"
"Find duplicate logic across scenes"
Code Review
"Review the enemy scenes for architecture compliance"
"Check if the new UI scenes follow our patterns"
"Validate that no scenes are managing their own state"
Installation
Requirements: Python 3.14 or higher
# Clone the repository
git clone https://github.com/PurlieuStudios/godot-mcp.git
cd godot-mcp
# Verify Python version
python --version # Should show Python 3.14.x
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -e .
# Configure for your Godot project
python setup.py
Configuration
Create a .mcp-config.json in your Godot project root:
{
"projectPath": "/path/to/your/godot/project",
"ecsRules": {
"allowedVisualPatterns": [
"sync_position",
"update_animation",
"apply_visual_effect"
],
"forbiddenLogicPatterns": [
"calculate_damage",
"update_velocity",
"manage_state",
"ai_decision"
]
}
}
Usage with Claude
Once the MCP server is running, you can ask Claude:
"Analyze my Godot scenes for ECS compliance"
"Show me which scripts need refactoring"
"Help me understand the scene hierarchy for the combat system"
"Are there any scripts doing physics calculations?"
Claude will automatically use the MCP server to access your project structure and provide informed, accurate answers based on your actual code.
Architecture Principles
This server enforces the following separation:
Godot Should Handle:
- ✅ Visual representation and rendering
- ✅ Animation playback
- ✅ Audio playback
- ✅ Input event routing
- ✅ Syncing visual state from ECS data
ECS Should Handle:
- ✅ Game state management
- ✅ Game logic and rules
- ✅ Physics and collision logic
- ✅ AI decisions
- ✅ Combat calculations
The Boundary:
Scripts attached to Godot nodes should only read from ECS and update visuals. They should never contain game logic or state management.
Benefits
For You
- Maintain architectural consistency across your project
- Catch violations early in development
- Reduce cognitive load—let the server remember the rules
- Faster code reviews and refactoring
For Claude
- Deep understanding of your project structure
- Accurate analysis without manual file sharing
- Context-aware suggestions that respect your architecture
- Ability to help with large-scale refactoring
Requirements
- Python 3.14+
- Godot 4.x project
- Claude with MCP support
License
MIT
Contributing
Contributions welcome! Please read CONTRIBUTING.md for guidelines.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with ❤️ for developers who believe in clean architecture and the power of AI-assisted development.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。