How `get_blender_connection()` Implements Connection Pooling in Blender MCP
get_blender_connection() implements connection pooling by maintaining a single global BlenderConnection instance that is validated via a lightweight ping and reused across all MCP tool requests, automatically recreating the socket if the connection is lost.
The Blender MCP server enables LLMs to control Blender through a persistent TCP socket, avoiding the overhead of spawning new processes per command. Instead of creating a fresh socket for every tool invocation, the get_blender_connection() function in src/blender_mcp/server.py manages a module-level connection that all
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →