Build 3D Floor Plans with Codex and Blender MCP
I recently used Codex and Blender to turn a furnished 2D floor-plan PDF into an editable 3D cutaway. Codex read the plan, created the rooms and furniture, applied materials, and rendered the result while I reviewed the work inside Blender.
The connection between the two applications was MCP: a small local bridge that lets Codex inspect and control a Blender scene. This guide shows how to set it up, how I used it for architectural visualization, and the compact prompt pattern that produced the most reliable results.
What the Blender MCP connection does
MCP gives Codex structured tools for working with another application. In this workflow, Codex interprets the request, the MCP server translates it, and a Blender add-on changes the open scene.
The community project has two main components: a Blender add-on that opens a local socket and a Python MCP server that connects the AI client to that add-on. The default Blender-side port is 9876. Codex supports local STDIO MCP servers, and its desktop app, CLI, and IDE extension share MCP configuration on the same host.
Prerequisites
- Blender 3.0 or newer
- Codex desktop, CLI, or IDE extension
- Python 3.10 or newer
uvand theuvxcommand
Install uv
On macOS:
brew install uv
On Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
On Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Open a new terminal and verify the installation:
uvx --version
Connect Blender MCP to Codex
Register the server with Codex:
codex mcp add blender -- uvx blender-mcp
Install the Blender add-on:
uvx blender-mcp install-addon
Then open Blender and complete these steps:
- Open Edit → Preferences → Add-ons.
- Search for MCP for Blender and enable it.
- Return to the 3D viewport and press
N. - Open the MCP for Blender tab.
- Click Start MCP Server.
Restart Codex and verify the server:
codex mcp list
You can also configure it directly in ~/.codex/config.toml:
[mcp_servers.blender]
command = "uvx"
args = ["blender-mcp"]
startup_timeout_sec = 20
tool_timeout_sec = 120
If Codex cannot find uvx, run which uvx on macOS or Linux, or where uvx on Windows. Use the returned absolute path as the command. Desktop applications do not always inherit the same PATH as a terminal.
Optional safe mode
The integration can execute Python in Blender. The project provides a safe mode that validates scripts and blocks several risky operations while still permitting ordinary modeling, materials, rendering, saving, and import/export work:
[mcp_servers.blender]
command = "uvx"
args = ["blender-mcp"]
env = { BLENDER_MCP_SAFE_MODE = "1" }
startup_timeout_sec = 20
tool_timeout_sec = 120
Test the connection first
I recommend starting with a disposable object before asking Codex to build a complete scene:
Using Blender MCP, inspect the current scene. Add a 2 m cube named
Connection_Test, give it a blue material, and place a camera so it is visible.
Show the result in Blender. Do not delete existing objects.
The test passes when the named object appears in Blender and Codex can inspect it afterward.
How I converted a floor plan into 3D
My source PDF contained both ground- and first-floor furniture plans. I asked Codex to begin with the first floor and supplied an isometric interior render as the style reference.
The strongest workflow was staged:
- Read the complete plan and identify the requested floor.
- Extract room labels and printed dimensions.
- Establish the drawing scale and build slabs and walls.
- Add doors, windows, stairs, and balconies.
- Check entrances, door swings, and circulation from above.
- Place simple furniture and verify its orientation.
- Add kitchens, shelves, bathroom fixtures, and balcony details.
- Apply materials and lighting.
- Render an overhead validation view and an isometric presentation view.
- Save the editable Blender file after approved stages.
The overhead check was essential. A beauty render can look convincing while a bed faces the wrong direction, a window is missing, or a sofa blocks an entry door. During this project, review passes caught all three, as well as an entrance sit-out that had initially been mistaken for a balcony.
A small optimized prompt
This is the prompt pattern I would use for the next floor plan:
Use Blender MCP to model the FIRST FLOOR from the attached PDF.
Source of truth: printed dimensions and wall/opening symbols in the PDF.
Style: furnished isometric cutaway, warm ivory plaster, oak, neutral fabrics,
soft studio lighting. Keep Blender visible while working.
First inspect and list the rooms, dimensions, doors, windows, balconies, and
unclear details. Then build in stages: shell → openings → fixed furniture →
loose furniture → materials → lighting. After each stage, show an overhead
view and compare it with the PDF. Mark unclear details as assumptions. Keep
entrances and door swings unobstructed.
Deliver: editable .blend, overhead render, 1800×1800 isometric render, named
objects, metric units, and a short assumptions list.
The prompt is short, but it defines the source of truth, working order, review method, and deliverables. That gives Codex freedom to choose efficient Blender operations without leaving architectural decisions ambiguous.
Reusable Blender prompt samples
Model one room
Using Blender MCP, create a 3.6 m × 4.0 m living room from the attached plan.
Match every wall opening before adding furniture. Add a three-seat sofa, two
chairs, a coffee table, rug, and TV unit. Maintain a clear 900 mm route from
the entrance to every doorway. Show an overhead check, then render an isometric
cutaway.
Correct a layout mismatch
Compare the current Blender scene with the attached floor plan. Correct only:
1) both bed orientations, 2) the sit-out entrance position and width, and
3) furniture blocking the door swing. Highlight affected objects before
editing, keep the work visible, then save and rerender both views.
Add missing openings
Add the missing bedroom window shown on the lower exterior wall. Replace the
open bathroom gap with a frosted window and sill. Preserve surrounding wall
segments and name all new objects. Use the PDF scale for width and label any
undimensioned height as an assumption.
Add kitchen storage
Add the storage shown along the kitchen and work-area wall. Use open oak
shelves so the storage reads clearly in the cutaway. Keep the counters,
appliances, doors, and circulation unchanged.
Create a product model
Create a low-poly wooden stool: 450 mm high, 320 mm round seat, three tapered
legs, rounded edges, clean topology, and an oak material. Apply transforms,
name objects and materials, save the .blend, and render front, side, and
isometric views.
Five details every prompt should include
- Source of truth: state whether the dimensions, PDF, reference image, or current scene wins when references disagree.
- Geometry constraints: provide units, overall size, openings, circulation, and anything that must remain unchanged.
- Work stages: ask for structure before furniture and furniture before finishing.
- Visible checks: request overhead views, named objects, and comparison with the source after meaningful changes.
- Deliverables: specify the Blender file, render sizes, camera views, exports, and assumptions report.
Troubleshooting
Codex does not show Blender tools
Run codex mcp list. If Blender is missing or disabled, register it again and restart Codex.
uvx works in Terminal but not Codex
Use the absolute path returned by which uvx or where uvx in the Codex MCP configuration.
Commands time out
Confirm that the Blender-side server is running. Break the job into smaller stages and increase tool_timeout_sec for complex geometry or rendering.
The scene looks good but does not match the plan
Use an orthographic overhead camera. Compare walls, openings, door swings, furniture orientation, and circulation one zone at a time. Render quality is not proof of dimensional accuracy.
Nothing appears during a screen recording
Tell Codex to keep Blender visible, highlight affected objects before edits, and use viewport or visible render actions. Headless Blender is efficient for unattended output, but it is not useful for demonstrating the workflow.
What I would improve next
For construction-level output, I would add an explicit door and window schedule, floor-to-ceiling heights, sill and lintel dimensions, structural information, and verified furniture sizes. A furniture plan alone is enough for a concept visualization, but not enough for a measured building model.
Codex with Blender MCP works best as an iterative modeling partner. Give it a measured source, define the outcome, let it work in stages, and validate from above before approving the render. That makes natural-language 3D modeling faster while keeping the result visible, editable, and reviewable.