Skip to main content
Glama
protocol.rs1.12 kB
//! IPC protocol between Rust MCP server and Python bpy executor use serde::{Deserialize, Serialize}; /// Command from MCP server to Python #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Command { /// Unique request ID pub id: u64, /// Method name (e.g., "list_objects", "scene_info") pub method: String, /// JSON-encoded parameters pub params: String, } /// Response from Python back to MCP server #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Response { /// Request ID (must match Command.id) pub id: u64, /// JSON-encoded result (if success) pub result: Option<String>, /// Error message (if failed) pub error: Option<String>, } impl Response { pub fn success(id: u64, result: impl Serialize) -> Self { Self { id, result: Some(serde_json::to_string(&result).unwrap_or_default()), error: None, } } pub fn error(id: u64, message: impl Into<String>) -> Self { Self { id, result: None, error: Some(message.into()), } } }

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