Use Needle with AI
Needle Engine integrates with popular AI tools so you can get help, write components, and inspect live scenes — all without leaving your workflow.
Set up your AI assistant
Copy this prompt into your coding assistant to connect it to Needle MCP:
Connect this AI assistant to the Needle MCP Server.
Follow https://engine.needle.tools/docs/ai/needle-mcp-server
using the connection mode this assistant supports.
Check for an existing Needle MCP configuration first. Reuse or update it
rather than adding a duplicate.
Prefer stdio:
- Command: npx
- Arguments: -y needle-cloud mcp
This command reuses or starts the shared local server automatically.
If only HTTP is supported, run `npx needle-cloud start` and connect to
`http://localhost:8424/mcp`. Use this address only if the assistant can
reach the machine running the server. If it cannot, explain the connection
requirements from the guide.
After configuration, list the available Needle tools and run a documentation
search to verify the connection. If an assistant restart is required, say so
and explain how to verify after restarting.
Report configuration and verification separately: configured, restart required,
and verified (tools listed and documentation search succeeded), as applicable.
Do not report setup as complete until verification succeeds.
If permissions or another restriction prevent a step, explain what remains
and provide the exact manual command or configuration needed to continue.Code with AI
The Needle Engine skill gives your AI coding assistant deep knowledge of the entire engine — so it can write components, debug issues, and answer questions with full context.
Install
npx skills add needle-tools/aiWorks with Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, and many more.
Automatic Setup
If you're already using @needle-tools/engine, the skill installs automatically via the Vite plugin — no manual setup needed.
What the Skill Knows
The skill provides your AI assistant with comprehensive context about:
- Components & Lifecycle — creating components,
start(),update(),onEnable(), serialization, decorators - Physics — Rapier integration, rigidbodies, colliders, raycasting, triggers, character controllers
- Networking & Multiplayer — state sync, RPC calls, room management, custom server setup
- WebXR (VR & AR) — session management, controllers, hand tracking, spatial UI, Everywhere Actions
- Animation — Animator, PlayableDirector, timeline control, blending
- UI — canvas rendering, text, buttons, layout, responsive design
- Deployment — Vite configuration, optimization, compression, hosting platforms
- Editor Integration — Unity/Blender workflows, export pipeline, glTF extensions
How It Works
The skill bundles curated documentation and API references into a format that AI assistants understand natively. When you ask your AI to "add a physics-based interaction" or "set up multiplayer sync", it already has the full picture — no manual context needed.
The skill is open source. Contributions are welcome.
Connect AI to your live scenes
The Needle MCP Server lets AI tools talk directly to your running 3D projects via the Needle Inspector. Works with Claude Desktop, Cursor, VS Code Copilot, Windsurf, and more.
What it can do:
- Search all Needle documentation with semantic search
- Inspect scene hierarchies, materials, and properties in real time
- Edit objects and settings through natural language
- Debug and optimize live scenes
WebMCP: tools for the agent in your browser
WebMCP is an emerging web standard that lets a page hand tools to the AI agent built into the browser. Instead of scraping the page, the agent calls those tools directly — no install, no server, no API keys.
These docs use it: every page here registers a search tool covering all Needle documentation, API reference, forum posts, Discord threads, and source code. The Needle Inspector, Needle Mesh Baker and FastCut expose tools too.
Let AI read your Needle Engine logs
When the local dev server is running, the Needle Engine Vite plugin writes both client-side logs (from the browser) and server-side logs (from the dev server / build process) to files inside your web project's node_modules/.needle/logs directory:
node_modules/.needle/logsPointing your AI coding assistant at this folder lets it read what actually happened — browser errors, build warnings, and server output — so it can debug issues with real context instead of guessing. See Debugging Parameters & Options for more.
Copy this prompt into an AI coding assistant opened in your web project:
I'm debugging my Needle Engine project.
Please read the latest client and server logs in
node_modules/.needle/logs.
Explain what went wrong and help me fix it.Great for testing on device
This is especially helpful when testing on any device where you can't easily attach DevTools — Android, iOS/iPadOS, Meta Quest, visionOS (Apple Vision Pro), or any WebXR VR/AR headset. Because the logs are written to a file on your dev machine, the assistant can inspect the device's console output without you copying it into the chat.
Use Needle docs with your AI assistant
Every documentation page is available as plain markdown — just change .html to .md in the URL.
For local models (Ollama, etc.) or tools that accept a context file:
- llms.txt — compact, essential docs
- llms-full.txt — complete documentation
Search the Needle Knowledge Base API
The knowledge base behind the search box on this site, the MCP server and Needle Cloud AI is also a public HTTP endpoint — no API key needed. Useful for agents without MCP support, CI scripts, or your own tooling.
curl -s "https://search.needle.tools/api/semantic-search?q=how+to+add+a+rigidbody&limit=5"Returns embedding-ranked results with content — documentation, API reference, forum posts, Discord, and Needle source code. POST /api/ask runs the same search through an LLM if you want an answer instead of results.
Ask questions
Needle Forum AI — Ask publicly. Searches all Needle docs, forum posts, and community content. Answers are visible to the community.
Needle Cloud AI — Ask privately. Same knowledge base, private to your team.
Need more AI usage? AI credits and top-ups explains how to buy credits, when they expire, and how they work with your monthly allowance.
The Unity and Blender integrations automatically register your web project with the local Needle MCP Server, provided by the needle-cloud CLI. Needle Cloud AI can then find your project files and logs without you entering a project path or attaching files. Ask questions about your code or use your logs to debug an issue. You can enable or disable local project access in a chat.