Skip to main content
Glama
test_addon.py1.45 kB
""" Test script for Blender MCP addon. Run in Blender background mode to verify addon loads and server starts. """ import sys print("[Test] Starting addon test...", flush=True) import bpy # Enable addon print("[Test] Enabling blender_mcp addon...", flush=True) try: bpy.ops.preferences.addon_enable(module="blender_mcp") print("[Test] Addon enabled successfully", flush=True) except Exception as e: print(f"[Test] Addon enable failed: {e}", flush=True) # Try importing directly print("[Test] Trying direct import...", flush=True) # Check if addon module loaded try: import blender_mcp as addon_module print(f"[Test] Addon module available", flush=True) except ImportError as e: print(f"[Test] Addon module import failed: {e}", flush=True) # Try starting server print("[Test] Starting MCP server via operator...", flush=True) try: bpy.ops.mcp.start(port=8765) print("[Test] Server started!", flush=True) except Exception as e: print(f"[Test] Start failed: {e}", flush=True) # Check status print("[Test] Checking status...", flush=True) try: bpy.ops.mcp.status() except Exception as e: print(f"[Test] Status failed: {e}", flush=True) # Stop server print("[Test] Stopping server...", flush=True) try: bpy.ops.mcp.stop() print("[Test] Server stopped", flush=True) except Exception as e: print(f"[Test] Stop failed: {e}", flush=True) print("[Test] Addon test complete!", flush=True)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ssoj13/blender-mcp-rs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server