Skip to main content
Glama
test_connection.py1.11 kB
import socket import json import sys HOST = '127.0.0.1' PORT = 9876 def test_connection(): print(f"Testing connection to Blender at {HOST}:{PORT}...") try: with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.settimeout(2) s.connect((HOST, PORT)) # Send get_version command cmd = {"type": "get_version"} s.sendall(json.dumps(cmd).encode('utf-8')) data = s.recv(1024) response = json.loads(data.decode('utf-8')) print(f"✅ Success! Connected to Blender.") print(f"Response: {json.dumps(response, indent=2)}") return True except ConnectionRefusedError: print("❌ Connection Failed: Connection Refused.") print("Tip: Pastikan Blender sudah terbuka dan Addon 'MCP Connector' sudah di-enable.") return False except Exception as e: print(f"❌ Error: {e}") return False if __name__ == "__main__": success = test_connection() if not success: sys.exit(1)

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/mezallastudio/blender-mcp'

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