Skip to main content
Glama
sanchorelaxo

OpenSimulator MCP Server

by sanchorelaxo

set

Execute management commands to configure and control OpenSimulator virtual world servers, including setting parameters, changing regions, restarting services, and saving data.

Instructions

Run a mutating/management command (set/change/restart/save/etc.).

Examples:

  • set log level debug

  • change region MyRegion

  • region restart notice "Restarting" 60

  • save oar region.oar

  • terrain load myterrain.r32

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
argsNo

Implementation Reference

  • The handler function for the 'set' tool. Decorated with @mcp.tool() for registration. Takes a base command and optional args, builds the full command, and sends it to the OpenSimulator console via the global console client.
    @mcp.tool() async def set(command: str, args: str = "") -> str: """ Run a mutating/management command (set/change/restart/save/etc.). Examples: - set log level debug - change region MyRegion - region restart notice \"Restarting\" 60 - save oar region.oar - terrain load myterrain.r32 """ return await console.send_command(_build_command(command, args))
  • Helper function used by 'set' (and 'get') tools to construct the full console command from base command and args.
    def _build_command(base: str, args: str = "") -> str: base = base.strip() args = args.strip() return f"{base} {args}".strip()
  • Core helper method in OpenSimConsole class that sends a command to the OpenSimulator REST console, manages session, and retrieves the response. Called by the 'set' tool.
    async def send_command(self, command: str) -> str: if not self.session_id: await self.start_session() async with await self._get_client() as client: response = await client.post( f"{self.base_url}/SessionCommand/", data={"ID": self.session_id, "COMMAND": command}, ) if response.status_code != 200: raise Exception( f"Command failed: {response.status_code} - {response.text}" ) # Wait for command to be processed before reading response await asyncio.sleep(0.3) read_response = await client.post( f"{self.base_url}/ReadResponses/{self.session_id}/" ) return read_response.text
  • The @mcp.tool() decorator registers the 'set' function as an MCP tool.
    @mcp.tool()
Install Server

Other Tools

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/sanchorelaxo/opensim-mcp'

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