A Model Context Protocol (MCP) server that provides tools for understanding and working with Three.js documentation.
This MCP server provides the following tools:
- search_threejs_docs - Search for Three.js classes, methods, or concepts
- get_threejs_class_info - Get detailed information about a specific Three.js class
- list_threejs_categories - List all major categories in Three.js documentation
- get_threejs_category - Get information about a specific category
- get_threejs_getting_started - Get getting started guide and basic setup
- explain_threejs_concept - Get explanations of Three.js concepts
npm install
npm run buildAdd this to your Claude Desktop configuration file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"threejs": {
"command": "node",
"args": ["c:\\Projects\\ThreeJSMCP\\dist\\index.js"]
}
}
}Then restart Claude Desktop.
To use this MCP server with the Claude Code VSCode extension:
- Open VSCode Settings (File > Preferences > Settings or
Ctrl+,) - Search for "Claude Code: MCP Servers"
- Click "Edit in settings.json"
- Add the following configuration:
{
"claude-code.mcpServers": {
"threejs": {
"command": "node",
"args": ["c:\\Projects\\ThreeJSMCP\\dist\\index.js"]
}
}
}Note: Adjust the path based on your project location. Use forward slashes on macOS/Linux:
"args": ["/Users/yourname/Projects/ThreeJSMCP/dist/index.js"]- Reload VSCode or restart the Claude Code extension
- The Three.js MCP tools will now be available when using Claude in VSCode
GitHub Copilot currently does not support MCP servers directly. However, you can:
- Use with Claude Code extension - The Claude Code extension in VSCode supports MCP and can work alongside Copilot
- Reference the documentation manually - Use the tools in Claude Desktop to get documentation, then paste relevant info into Copilot Chat
- Watch for updates - MCP support may be added to Copilot in the future
The recommended workflow is to:
- Configure the MCP server in Claude Desktop (as shown above)
- Keep Claude Desktop open while coding in VSCode
- Ask Three.js questions in Claude Desktop
- Copy code snippets and documentation back to VSCode
Search the Three.js documentation for classes, methods, or concepts.
Example queries:
- "PerspectiveCamera"
- "geometry"
- "materials"
- "lights"
Get detailed information about a specific Three.js class including constructor signature and key methods.
Supported classes include:
- Cameras:
PerspectiveCamera,OrthographicCamera - Geometries:
BoxGeometry,SphereGeometry - Materials:
MeshStandardMaterial,MeshPhongMaterial - Renderers:
WebGLRenderer - Math:
Vector3,Vector2,Quaternion,Matrix4 - Loaders:
GLTFLoader,TextureLoader - And more...
List all major categories in the Three.js API documentation:
- Animation
- Audio
- Cameras
- Geometries
- Lights
- Materials
- Math
- Renderers
- And more...
Get information about a specific category and common classes within it.
Categories: cameras, geometries, materials, lights, loaders, renderers, math, objects
Returns a complete getting started guide with:
- Installation instructions
- Basic scene setup code
- Links to official tutorials
- Essential resources
Get detailed explanations of core Three.js concepts:
scene graph- Understanding the scene hierarchymaterials- Different material types and when to use themlights- Lighting types and their purposescameras- Camera types and setuprendering- The rendering pipelinecoordinates- Three.js coordinate systemgeometry- How geometries work
Once configured in Claude Desktop, you can ask questions like:
- "How do I create a perspective camera in Three.js?"
- "Show me information about MeshStandardMaterial"
- "What are the different types of lights in Three.js?"
- "Explain the scene graph concept"
- "Search for raycasting"
The MCP server will provide relevant documentation links, code examples, and explanations.
# Build the project
npm run build
# Watch for changes
npm run watchAll information is based on the official Three.js documentation at https://threejs.org/docs/
MIT