Godot के अंदर Claude Code क्या कर सकता है
Claude Code बिना किसी सेटअप के आपके Godot प्रोजेक्ट की फ़ाइलें पढ़ और लिख सकता है — GDScript, .tscn scenes, .tres resources। लेकिन अपने दम पर वह editor नहीं देख सकता, गेम नहीं चला सकता, और यह नहीं जाँच सकता कि जो उसने अभी लिखा वह सच में काम करता है या नहीं। यही कमी एक MCP (Model Context Protocol) server पूरी करता है।
Godot MCP Pro Claude Code को सीधे चल रहे Godot 4 editor से जोड़ता है:
AI Assistant <--stdio/MCP--> Node.js Server <--WebSocket:6505--> Godot Editor Plugin
Plugin editor के अंदर चलता है; Node.js server Claude Code के tool calls को editor commands में बदलता है। इससे Claude Code को 26 कैटेगरी में 190 tools मिलते हैं। व्यवहार में इसका मतलब है कि Claude Code:
- Editor API के ज़रिए scenes और nodes बना सकता है, properties सेट कर सकता है, signals connect कर सकता है और scripts attach कर सकता है — पूरे Ctrl+Z undo के साथ, क्योंकि हर बदलाव Godot के UndoRedo सिस्टम से होकर जाता है।
- Scripts लिख सकता है, GDScript validate कर सकता है, और editor के errors व output log पढ़ सकता है।
- गेम चला सकता है, फिर उसके अंदर keys दबा सकता है, click कर सकता है, mouse घुमा सकता है और input actions फ़ायर कर सकता है।
- Editor और चल रहे गेम के screenshots ले सकता है, live scene tree की जाँच कर सकता है, और runtime पर node properties पढ़ या बदल सकता है।
- 3D, physics, animation, AnimationTree, tilemaps, shaders, particles, audio, navigation, themes, export presets और बहुत कुछ के साथ काम कर सकता है।
यही आख़िरी लूप — build, run, देखो, fix — असली फ़र्क़ पैदा करता है। आपको कोड थमाकर उम्मीद करने के बजाय, Claude Code अपने काम का ख़ुद playtest कर सकता है।
आपको क्या चाहिए
- Godot 4.4 या उसके बाद का वर्ज़न (4.4, 4.5, 4.6, 4.7 और 4.8 beta 5 पर टेस्ट किया गया)। Windows, macOS या Linux।
- MCP server को build करने और चलाने के लिए Node.js 18+।
- Claude Code।
- Godot MCP Pro package — $15 की एक बार की ख़रीद, lifetime updates के साथ, itch.io या Buy Me a Coffee पर उपलब्ध। Zip में addon,
server/डायरेक्टरी,INSTALL.mdऔर AI-client निर्देश शामिल हैं।
GDScript editor plugin (addons/godot_mcp/) GitHub पर open source है, इसलिए आप ठीक-ठीक पढ़ सकते हैं कि वह editor से कैसे बात करता है। जिस MCP server से Claude Code जुड़ता है, वह सिर्फ़ paid package में है। अगर आपने public repo clone किया है और उसमें server/ फ़ोल्डर नहीं दिखता, तो यह अपेक्षित है।
स्टेप 1: Godot plugin इंस्टॉल करें
डाउनलोड में से addons/godot_mcp/ फ़ोल्डर को अपने Godot प्रोजेक्ट की addons/ डायरेक्टरी में कॉपी करें। फिर उसे enable करें:
Project > Project Settings > Plugins > Godot MCP Pro > Enable
Enable होते ही plugin editor के अंदर अपने आप एक WebSocket server शुरू कर देता है।
स्टेप 2: MCP server build करें
Zip को extract करें, server/ डायरेक्टरी में terminal खोलें और यह चलाएँ:
cd server
npm install
npm run build
यह TypeScript MCP server को server/build/ में compile करता है। server/build/index.js का पूरा path नोट कर लें — अगले स्टेप में इसकी ज़रूरत पड़ेगी।
स्टेप 3: Claude Code कॉन्फ़िगर करें
Claude Code MCP servers को .mcp.json फ़ाइल से पढ़ता है। उसमें Godot MCP Pro जोड़ें:
{
"mcpServers": {
"godot-mcp-pro": {
"command": "node",
"args": ["/path/to/server/build/index.js"],
"env": {
"GODOT_MCP_PORT": "6505"
}
}
}
}
/path/to/ को उस असली path से बदलें जहाँ आपने फ़ाइलें extract की हैं।
Claude Code को कौन-सा mode इस्तेमाल करना चाहिए?
Godot MCP Pro में चार modes हैं ताकि यह अलग-अलग tool limits वाले clients में फ़िट हो सके: Full (190 tools, डिफ़ॉल्ट), 3D (--3d, 100 tools), Lite (--lite, 88 tools) और Minimal (--minimal, 35 tools)। Claude Code के लिए Full इस्तेमाल करें — Claude Code tools को ज़रूरत पड़ने पर ही लोड करता है (deferred tool loading), इसलिए सभी 190 tools की context लागत बहुत कम रहती है। ऊपर वाला config पहले से Full mode में चलता है; कोई flag जोड़ने की ज़रूरत नहीं है।
वैकल्पिक: CLI mode
चूँकि Claude Code के पास terminal है, वह MCP के बजाय bundled CLI के ज़रिए भी Godot को चला सकता है। CLI सीधे editor plugin से बात करता है और मॉडल को --help के ज़रिए धीरे-धीरे commands खोजने देता है:
node /path/to/server/build/cli.js --help
node /path/to/server/build/cli.js project info
node /path/to/server/build/cli.js scene play
node /path/to/server/build/cli.js node add --type CharacterBody3D --name Player
CLI के लिए ज़रूरी है कि Godot editor plugin enable करके चल रहा हो और 6510–6514 रेंज में कोई port ख़ाली हो। ज़्यादातर Claude Code यूज़र्स के लिए ऊपर वाला MCP सेटअप आसान रास्ता है।
स्टेप 4: कनेक्शन जाँचें
- Plugin enable करके अपना Godot प्रोजेक्ट खोलें। Editor dock का status panel कनेक्शन की स्थिति दिखाता है।
- जिस फ़ोल्डर में आपकी
.mcp.jsonहै, वहाँ Claude Code शुरू करें। - लिंक शुरू से आख़िर तक काम कर रहा है, यह पक्का करने के लिए कोई read-only काम माँगें:
Use the Godot MCP tools to get the project info and the scene tree of the
currently open scene, and summarize what this project contains.
(अर्थ: Godot MCP tools से project info और अभी खुले scene का scene tree लो, और बताओ कि इस प्रोजेक्ट में क्या है।) अगर Claude Code आपके प्रोजेक्ट का नाम, Godot वर्ज़न और आपके scene के nodes बताता है, तो वह get_project_info और get_scene_tree के ज़रिए editor से बात कर रहा है। अगर वह इसके बजाय सिर्फ़ डिस्क से फ़ाइलें पढ़ता है, तो MCP server कनेक्ट नहीं है — समस्या निवारण देखें।
आपके पहले prompts
छोटे से शुरू करें, फिर आगे बढ़ें। एक अच्छा दूसरा prompt कोई दिखने वाला बदलाव करता है और Claude Code से उसे चल रहे गेम में जाँचने को कहता है:
Add a Label to the main scene that says "Hello from Claude Code", centered on
screen. Then run the scene, take a game screenshot, and confirm the text is
visible and centered.
(अर्थ: main scene में स्क्रीन के बीच में "Hello from Claude Code" लिखा एक Label जोड़ो। फिर scene चलाओ, game screenshot लो, और पक्का करो कि टेक्स्ट दिख रहा है और बीच में है।) जब यह काम कर जाए, तो पूरा prototype आज़माएँ। showcase का हर one-prompt गेम इसी टेम्पलेट से शुरू हुआ था — यह Pop Match! के पीछे का हूबहू prompt है, जो लगभग चार मिनट में बना:
I want to make a match-3 puzzle game. Before thinking about originality, I'd
like to build the core basics first. Please make it with pop, catchy graphics.
(अर्थ: मैं एक match-3 पज़ल गेम बनाना चाहता हूँ। originality के बारे में सोचने से पहले, मैं पहले मूल बुनियादी चीज़ें बनाना चाहता हूँ। कृपया इसे pop, आकर्षक graphics के साथ बनाओ।) Genre बदलिए और आपको बाक़ी गेम मिल जाते हैं: एक tower defense (~5 मिनट), एक 2D platformer (~5 मिनट), एक bullet-hell shooter (~5 मिनट) और एक 3D ball roller (~3.5 मिनट)। "Core basics first" जानबूझकर लिखा गया है: यह feature list के बजाय एक playable नींव माँगता है, जिससे एजेंट को एक साफ़ finish line मिलती है।
एक असली वर्कफ़्लो: prompt, build, playtest, fix
पूरे लूप का सबसे अच्छा उदाहरण Pop Survivors और उसका follow-up, Pop Survivors PLUS है। दोनों को Claude Code ने Godot MCP Pro के ज़रिए बनाया, बिना काट-छाँट के रिकॉर्ड किया गया, और इंसान ने कोड में एक भी बदलाव नहीं किया।
1. Prompt: core
I want to make a Vampire Survivors-like game. Before thinking about originality,
I'd like to build the core basics first. Please make it with pop, catchy graphics.
2. Build
लगभग नौ मिनट में Claude Code ने player movement, अपने आप फ़ायर होने वाले star bolts, घूमते तारे और shockwaves, XP gems, तीन power-up cards में से चुनाव वाले level-ups, और enemy waves तैयार कर दिए — सब कुछ कोड से बनाया गया, बिना किसी image asset के।
3. Playtest
फिर उसने गेम चलाया और simulated input से उसे खेला। दो समस्याएँ सामने आईं जिनकी ओर किसी ने इशारा नहीं किया था:
- Input bindings simulated keys पर प्रतिक्रिया नहीं दे रहे थे।
- पहला playtest 14 सेकंड बाद game over पर ख़त्म हो गया।
4. Fix
Claude Code ने bindings ठीक किए और difficulty को दोबारा संतुलित किया, फिर से खेला। यही वह स्टेप है जो सिर्फ़ फ़ाइलों वाला सेटअप नहीं कर सकता: bug तभी दिखता है जब गेम सच में चल रहा हो।
5. Iterate, हर prompt में एक feature
PLUS ने उसी build से आगे चार और prompts के साथ काम जारी रखा (कुल पाँच, लगभग 33 मिनट का AI काम), हर एक ने एक नई परत जोड़ी:
- एक title screen और तीन heroes वाला character select, हर एक के अपने starting weapon और stats के साथ।
- Weapon evolution: elite enemies chests गिराते हैं, जो किसी maxed weapon को evolve कर देते हैं अगर आपके पास उसका matching passive item हो।
- हर दो मिनट में एक boss और आठ मिनट पर जीत।
- Shop के साथ meta progression, कोड से बनाए गए sound effects, और game-feel polish।
इस दौरान उसने screenshots और simulated input से अपने ही bugs पकड़े और ठीक किए: एक टूटा हुआ autoload जो editor में compile errors पैदा कर रहा था, character select पर कटा हुआ टेक्स्ट, पूरे गोले के रूप में बना chest का ढक्कन जो chest को छिपा रहा था, स्क्रीन से बाहर रहते हुए ही फ़ायर करता boss, जीत वाले frame पर ही फ़ायर होती swarm wave, और "WIN" अक्षरों को ढकती hero की टोपी। नतीजे में 21 code-synthesized sound effects हैं और यह browser में खेलने योग्य है।
एजेंट क्या कर सकता है और क्या नहीं
ईमानदार अपेक्षाएँ समय बचाती हैं:
- Prototypes में यह तेज़ है। एक prompt से कुछ ही मिनटों में किसी genre का playable core बनना यथार्थवादी है, जैसा कि showcase के builds दिखाते हैं।
- यह गेम चलाकर जाँच करता है। Screenshots, input simulation, runtime properties और error log की मदद से यह layout, timing और balance के bugs ख़ुद ढूँढ लेता है।
- Design अब भी आपके हाथ में है। Showcase का हर prompt एक इंसान ने लिखा था: genre, features का क्रम, "मज़ा" का मतलब क्या है। एजेंट अमल करता है और जाँचता है; वह यह तय नहीं करता कि आपका गेम कैसा होना चाहिए।
- Showcase का art कोड से बना है। उन गेम्स में imported art के बजाय कोड से बनी shapes इस्तेमाल हुई हैं। अपनी art pipeline की योजना अलग से बनाएँ।
- Showcase videos रफ़्तार के लिए edit किए गए हैं। Builds बिना काट-छाँट के रिकॉर्ड होते हैं, फिर छोटे किए जाते हैं; मिनटों की गिनती AI के काम का समय है।
Godot में Claude Code के साथ काम करने के टिप्स
- Editor खुला रखें। Tools WebSocket के ज़रिए live Godot editor पर काम करते हैं। Prompt देना शुरू करने से पहले plugin enable करके प्रोजेक्ट खोलें।
- Settings editor API से बदलें। जब editor ने
project.godotखोल रखा हो, तब उसे टेक्स्ट के रूप में edit करने के बजाय Claude Code सेset_project_setting(और input mappings के लिएset_input_action) इस्तेमाल करने को कहें। - याद रखें कि runtime tools के लिए गेम का चलना ज़रूरी है। Game tree की जाँच, input simulate करना और game screenshots — इन सबके लिए पहले
play_sceneसे scene शुरू करना होगा। - उससे playtest करवाएँ। Feature prompts के अंत में लिखें "run it, play it with simulated input, take screenshots, and fix anything that looks wrong." (इसे चलाओ, simulated input से खेलो, screenshots लो, और जो भी गलत दिखे उसे ठीक करो।)
- Undo आपका सुरक्षा कवच है। Node और property operations UndoRedo से होकर जाते हैं, इसलिए Ctrl+Z एजेंट के edits पर भी काम करता है।
- स्पष्ट रूप से save करें।
get_unsaved_stateबिना save किए बदलावों वाले खुले scenes और scripts की सूची देता है;save_allउन्हें save करता है और बताता है कि क्या save हुआ। - रुकावट डालने वाले dialogs को रास्ते से हटने दें।
set_auto_dismiss"Reload from disk?" जैसे editor dialogs को अपने आप बंद कर देता है, जो वरना session को अटका देते।
समस्या निवारण
server/ फ़ोल्डर नहीं है
आपके पास public GitHub repo है, जिसमें सिर्फ़ मुफ़्त plugin है। Server paid package में है।
Claude Code को कोई Godot tool नहीं दिखता
जाँचें कि npm run build पूरा हुआ, कि args में दिया path असली server/build/index.js की ओर इशारा करता है, और कि आपने Claude Code को उसी फ़ोल्डर से शुरू किया जिसमें आपकी .mcp.json है।
Tools connection error के साथ fail होते हैं
पक्का करें कि Godot editor plugin enable करके खुला है और editor dock में status panel देखें। कनेक्शन exponential backoff (1s, 2s, 4s … 60s तक) के साथ अपने आप reconnect होता है और 10s heartbeat इस्तेमाल करता है, और conflicts से बचने के लिए server अपने आप ports 6505–6509 स्कैन करता है। अगर plugin ख़ुद अटक गया हो, तो reload_plugin उसे reload करता है और अपने आप reconnect कर देता है।
Runtime tools errors लौटाते हैं
गेम नहीं चल रहा है। Claude Code से पहले play_scene कॉल करवाएँ, फिर runtime और input tools इस्तेमाल करें।
Editor "Reload from disk?" dialogs दिखाता है
ऐसा तब होता है जब editor में खुली फ़ाइलें डिस्क पर बदल जाती हैं। सीधे फ़ाइल लिखने के बजाय editor tools (edit_script, update_property) को प्राथमिकता दें, और dialogs के लिए set_auto_dismiss इस्तेमाल करें। अगर चीज़ें sync से बाहर हो जाएँ, तो reload_project filesystem को दोबारा स्कैन करता है और scripts reload करता है।
FAQ
क्या Claude Code बिना MCP server के Godot के साथ काम करता है?
वह प्रोजेक्ट फ़ाइलें edit कर सकता है, लेकिन editor नहीं देख सकता, गेम नहीं चला सकता और अपने बदलावों को टेस्ट नहीं कर सकता। Godot MCP Pro जैसा MCP server यही जोड़ता है: editor, चल रहे गेम, input simulation और screenshots को कवर करने वाले 190 tools।
क्या 190 tools Claude Code के context पर बोझ डालेंगे?
नहीं। Claude Code deferred tool loading इस्तेमाल करता है, इसलिए उसके लिए सुझाया गया mode Full है, जिसमें सभी 190 tools बहुत कम context लागत पर मिलते हैं। Lite और Minimal modes tool limits वाले clients के लिए हैं।
कौन-से Godot वर्ज़न सपोर्टेड हैं?
Godot 4.4 या उसके बाद का (4.4/4.5/4.6/4.7/4.8 beta 5 पर टेस्ट किया गया), Node.js 18+ के साथ, Windows, macOS और Linux पर।
क्या Claude Code Godot में 3D गेम बना सकता है?
हाँ। Meshes, lighting, materials, environment, cameras और GridMaps के लिए समर्पित tools हैं, साथ ही physics, navigation और particles भी। Pop Roller एक 3D ball-rolling गेम है जो एक prompt से लगभग साढ़े तीन मिनट में बना।
क्या यह subscription है?
नहीं। यह $15 की एक बार की ख़रीद है, जिसमें lifetime updates, असीमित प्रोजेक्ट्स, असीमित मशीनें और Discord सपोर्ट शामिल हैं।
Claude Code को Godot editor दें
Godot MCP Pro, 190 tools के साथ Claude Code को Godot 4 से जोड़ता है — scenes बनाएँ, scripts लिखें, गेम चलाएँ और उसका playtest करें। एक बार की ख़रीद, lifetime updates।
play_scene
simulate_key
get_game_screenshot
get_editor_errors
validate_script
कीमत की जानकारी देखें या इससे बने गेम्स ब्राउज़ करें।