Compare commits
11 Commits
de65ad64ee
...
a6ca7509d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6ca7509d1 | ||
|
|
a35a1e10a7 | ||
|
|
75787a81cb | ||
|
|
cc0be00c7c | ||
|
|
5a7765c2a8 | ||
|
|
e85ea6390f | ||
|
|
60b1b41e63 | ||
|
|
9b9a14f7c7 | ||
|
|
0bc765544e | ||
|
|
a2a28b949c | ||
|
|
7c294217ff |
22
README.md
22
README.md
@ -4,6 +4,8 @@
|
||||
|
||||
BlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
|
||||
|
||||
**We have no official website. Any website you see online is unofficial and has no affiliation with this project. Use them at your own risk.**
|
||||
|
||||
[Full tutorial](https://www.youtube.com/watch?v=lCyQ717DuzQ)
|
||||
|
||||
### Join the Community
|
||||
@ -30,6 +32,8 @@ Give feedback, get inspired, and build on top of the MCP: [Discord](https://disc
|
||||
|
||||
[CodeRabbit](https://www.coderabbit.ai/)
|
||||
|
||||
[Satish Goda](https://github.com/satishgoda)
|
||||
|
||||
**All supporters:**
|
||||
|
||||
[Support this project](https://github.com/sponsors/ahujasid)
|
||||
@ -87,6 +91,18 @@ Otherwise installation instructions are on their website: [Install uv](https://d
|
||||
|
||||
**⚠️ Do not proceed before installing UV**
|
||||
|
||||
### Environment Variables
|
||||
|
||||
The following environment variables can be used to configure the Blender connection:
|
||||
|
||||
- `BLENDER_HOST`: Host address for Blender socket server (default: "localhost")
|
||||
- `BLENDER_PORT`: Port number for Blender socket server (default: 9876)
|
||||
|
||||
Example:
|
||||
```bash
|
||||
export BLENDER_HOST='host.docker.internal'
|
||||
export BLENDER_PORT=9876
|
||||
```
|
||||
|
||||
### Claude for Desktop Integration
|
||||
|
||||
@ -151,6 +167,12 @@ For Windows users, go to Settings > MCP > Add Server, add a new server with the
|
||||
|
||||
**⚠️ Only run one instance of the MCP server (either on Cursor or Claude Desktop), not both**
|
||||
|
||||
### Visual Studio Code Integration
|
||||
|
||||
_Prerequisites_: Make sure you have [Visual Studio Code](https://code.visualstudio.com/) installed before proceeding.
|
||||
|
||||
[](vscode:mcp/install?%7B%22name%22%3A%22blender-mcp%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22blender-mcp%22%5D%7D)
|
||||
|
||||
### Installing the Blender Addon
|
||||
|
||||
1. Download the `addon.py` file from this repo
|
||||
|
||||
@ -18,6 +18,10 @@ logging.basicConfig(level=logging.INFO,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
logger = logging.getLogger("BlenderMCPServer")
|
||||
|
||||
# Default configuration
|
||||
DEFAULT_HOST = "localhost"
|
||||
DEFAULT_PORT = 9876
|
||||
|
||||
@dataclass
|
||||
class BlenderConnection:
|
||||
host: str
|
||||
@ -225,7 +229,9 @@ def get_blender_connection():
|
||||
|
||||
# Create a new connection if needed
|
||||
if _blender_connection is None:
|
||||
_blender_connection = BlenderConnection(host="localhost", port=9876)
|
||||
host = os.getenv("BLENDER_HOST", DEFAULT_HOST)
|
||||
port = int(os.getenv("BLENDER_PORT", DEFAULT_PORT))
|
||||
_blender_connection = BlenderConnection(host=host, port=port)
|
||||
if not _blender_connection.connect():
|
||||
logger.error("Failed to connect to Blender")
|
||||
_blender_connection = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user