Flint
API server fro Blender MCP on macOS with visionOS connectivity. Needs a Claude API key.
Install / Use
/learn @create-with-swift/FlintQuality Score
Category
Development & EngineeringSupported Platforms
README
Flint 3D Model Generation Server
FastAPI + MCP stack that turns text prompts into Blender scenes and exports USDZ files via export_model.py.
Overview
- Runs a FastAPI server (
api_server.py) with/run,/run-high,/download, and/healthendpoints. - Uses MCP to drive Blender through the
blender-mcptoolchain and exports via the bundled Python script. - Keeps context usage in check with tool allowlists, step caps, and prompt truncation.
- Produces
.blendand.usdzartifacts inexports/for downstream consumption.
Highlights
- 🤖 Claude Sonnet 4.5 integration tuned for MCP workflows
- 🎨 Automated Blender pipeline that saves
.blendfiles and exports USDZ - 🔄 Context-safe MCP bridge (tool allowlists, token caps, step limits)
Prerequisites
- macOS with Blender available at
/Applications/Blender.app/Contents/MacOS/Blender - Python 3.10+
- uv toolchain (needed for
uvx blender-mcp):brew install uv - Valid Anthropic API key stored in
.env(ANTHROPIC_API_KEY=...) - Recommended: create and activate the project virtual environment (
python -m venv .venvthensource .venv/bin/activate)
Step-by-Step Setup
- Install Python 3.10+ and Blender – Blender must be callable at
/Applications/Blender.app/Contents/MacOS/Blenderor you need to updateBLENDER_PATHinapi_server.py. - Install uv (MCP helper) –
brew install uvso theuvx blender-mcpcommand inapi_server.pyworks. - Create a virtual environment –
python -m venv .venv && source .venv/bin/activate(recommended but optional). - Install dependencies –
pip install -r requirements.txt. - Create
.envin the project root with the secrets required by the scripts:
Set at minimum:cp config.env .env # optional helper if you track defaults thereANTHROPIC_API_KEY=sk-your-key BLENDER_PATH=/Applications/Blender.app/Contents/MacOS/Blender # override if needed EXPORT_FOLDER=exports # optional; defaults to project root - Start the server –
python start_server.py(hot reload enabled). - Check health –
curl http://localhost:8000/healthshould reporthealthyonce Blender, the export folder, and the Claude API are accessible.
API Endpoints
| Method | Path | Description |
|--------|---------------|-------------|
| GET | /health | Reports Blender, Claude, and export-folder status |
| GET | /docs | FastAPI interactive docs |
| POST | /run | Standard-quality MCP generation (token-safe) |
| POST | /run-high | High-quality MCP generation (more steps/detail) |
| GET | /download/{filename} | Fetch the latest USDZ export |
Example Requests
Standard profile (balanced, ≤5 tool calls):
curl -X POST http://localhost:8000/run \
-H "Content-Type: application/json" \
-d '{"prompt": "Create a sci-fi crate with glowing edges"}'
High-detail profile (≤8 tool calls, richer lighting/material cues):
curl -X POST http://localhost:8000/run-high \
-H "Content-Type: application/json" \
-d '{"prompt": "Build a stylized medieval watchtower with torches and banners"}'
Quality Profiles & Context Guards
| Profile | Steps | LLM Tokens | Notes |
|-----------|-------|------------|-------|
| standard | 5 | 1024 | Uses a minimal tool allowlist and aggressive prompt truncation for reliability |
| high | 8 | 2048 | Adds richer geometry/material hints and allows the set_texture tool |
Both modes enforce:
toolContextSize="small"to shrink tool schema payloads- Explicit tool allowlists so unused MCP connectors never enter the prompt
- Constraint blocks injected into the LLM prompt (max tool calls, snippet size, mandatory
save_file) - Automatic
.blendvalidation plus USDZ export viaexport_model.py
Switch to /run-high when you need more detail, then fall back to /run if you hit context limits.
Configuration Notes
.envis required; load order ensures anything defined there is available to both FastAPI and the export script.- Populate
ANTHROPIC_API_KEYplus any overrides (BLENDER_PATH,EXPORT_FOLDER, etc.). config.envcan store shared defaults, but sensitive keys must still land in.envbefore running.- Exports are written to
exports/scene.blendandexports/exported_model.usdzunless you overrideEXPORT_FOLDER.
Troubleshooting
| Symptom | Fix |
|---------|-----|
| prompt is too long errors | Use /run, shorten the prompt, or temporarily reduce the MCP allowlist |
| Blender path errors | Confirm the BLENDER_PATH constant matches your install or update it |
| Empty/invalid exports | Check server logs for Blender stderr, ensure exports/ is writable |
| Claude 40x/429 responses | Wait and retry; the service already throttles tokens, but Anthropic quotas may still apply |
Project Structure
Flint/
├── api_server.py # FastAPI app + MCP orchestration
├── export_model.py # Blender-side USDZ exporter
├── start_server.py # Entrypoint with env bootstrap + uvicorn
├── requirements.txt # Python dependencies
├── config.env # Optional defaults you can copy into .env
├── package.json # Node helpers (if any future tooling is added)
├── README.md # This guide
└── exports/ # Generated blend/usdz assets
Related Skills
node-connect
325.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
80.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Hook Development
80.2kThis skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
MCP Integration
80.2kThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.
