Your submission MUST include a demo_video.txt file containing a link to a video demo.
The video should show:
- Your MCP server in action with an AI agent
- Creating something interesting/creative in Blender using your tools
- Brief walkthrough of your implementation
This demonstrates that your tools actually work and can be used to build real 3D scenes.
Build an MCP (Model Context Protocol) server that exposes Blender operations to AI agents. This assignment evaluates your ability to:
- Design a practical API for AI agent interactions
- Learn and integrate with unfamiliar APIs (Blender's
bpymodule) - Write clean, typed, validated Python code
- Work efficiently with AI coding tools
Time Limit: 1-2 days
MCP (Model Context Protocol) is a protocol for connecting AI models to external tools and data sources. An MCP server exposes "tools" that AI agents can invoke to perform actions. In this case, you'll expose Blender operations.
- Python: 3.13+
- FastMCP: 2.12.4+ (MCP server framework)
- Pydantic: v2+ (input validation)
- Blender:
bpymodule for Blender operations - Type Hints: Required throughout
Install dependencies:
pip install fastmcp pydantic bpyHere's a minimal example of how to set up an MCP server:
from fastmcp import FastMCP
# Initialize the MCP server
mcp = FastMCP("blender-server")
# Register a tool (function that the AI agent can call)
@mcp.tool()
async def my_tool(input: MyInputModel) -> str:
"""Tool description that the AI agent will see."""
# Your implementation here
return "Result message"
# Run the server
if __name__ == "__main__":
mcp.run()Key Points:
- Tools are async functions
- Use Pydantic models for input validation
- Return string responses describing the result
- The
@mcp.tool()decorator registers the function
Design and implement an MCP server with many rich tools that would be useful for an AI agent working with Blender.
-
What operations would an AI need?
- Creating and manipulating 3D objects
- Querying the scene state
- Rendering outputs
- Working with materials, cameras, lighting
-
What's the minimal viable toolset?
- Start with core operations
- Avoid over-engineering
-
How should inputs be validated?
- What parameters are required vs. optional?
- What are valid ranges/values?
- How do you handle errors?
You should cover multiple categories (not exhaustive):
- Object Operations: Create, modify, delete, transform objects
- Scene Queries: List objects, get object info, query properties
- Rendering: Render scenes, configure render settings
- Materials & Textures: Apply materials, set colors, texture mapping
- Camera & Lighting: Position cameras, add lights, set lighting properties
We've provided example_create_cube.py as a complete reference implementation. Study it to understand:
- How to structure a tool
- How to use Pydantic for validation
- How to interact with Blender's
bpyAPI - Error handling patterns
- Documentation style
Your submission will be evaluated on:
- Are the tools practical and useful for an AI agent?
- Do they cover a good range of Blender capabilities?
- Is the API intuitive and well-documented?
- Clean, readable code
- Proper type hints throughout
- Consistent style and naming
- Well-organized project structure
- Good separation of concerns
- Reusable abstractions where appropriate
- Comprehensive Pydantic models
- Appropriate validation rules
- Clear error messages
- Graceful handling of invalid inputs
- Blender operation failures handled properly
- Informative error messages returned
- Clear docstrings for all tools
- Explanation of parameters
- Usage examples where helpful
At minimum, submit:
- Your implementation files (organize as you see fit)
- A
README.mdexplaining:- How to install dependencies
- How to run your server
- List of tools implemented
- Any design decisions or trade-offs
demo_video.txtcontaining a link to your video demo (see top of assignment)
If time permits, consider:
- Additional tool categories (animation, modifiers, etc.)
- Comprehensive error handling
- Unit tests
- Configuration management
- Middleware (logging, error handling, etc.)
Create a git repository with your implementation and share the link.
Look at example_create_cube.py to understand the pattern.
The bpy module is Blender's Python API. Key resources:
- Blender Python API Docs
bpy.ops- Operations (like creating objects)bpy.data- Scene data (objects, materials, etc.)bpy.context- Current context (active scene, etc.)
Plan out 5-7 tools that would be useful. Consider:
- What inputs do they need?
- What do they return?
- How do they handle errors?
Build one tool at a time, test it, then move to the next.
This assignment is designed to be completed with AI assistance. Use tools like Claude, Cursor, or GitHub Copilot to:
- Learn the
bpyAPI quickly - Generate boilerplate code
- Debug issues
- Refactor and improve code quality
- Start Simple: Get one tool working end-to-end before expanding
- Validate Early: Use Pydantic's validation to catch errors early
- Handle Errors: Blender operations can fail - handle gracefully
- Document Well: Clear docstrings help both humans and AI agents
- Test Thoroughly: Try invalid inputs, edge cases, etc.
- Think Like an Agent: What would an AI actually need to build 3D scenes?
If you have questions about:
- MCP/FastMCP: Check the FastMCP docs
- Blender API: Use the official Blender Python API documentation
- Assignment Requirements: Email us with clarification questions
We're excited to see your implementation. Focus on demonstrating:
- Strong system design skills
- Ability to learn new APIs quickly
- Clean, professional code quality
- Effective use of AI tools
Remember: This is about showing how you approach problems, not about being a Blender expert.