Skip to main content
Glama
abrinsmead

Mindpilot MCP

by abrinsmead

open_ui

Access the web-based UI in a locally hosted app to visualize Claude Code as Mermaid diagrams. Automatically opens the browser for quick interaction.

Instructions

Open the web-based user interface

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
autoOpenNoAutomatically open browser

Implementation Reference

  • The main handler function for the 'open_ui' MCP tool. Constructs the UI URL based on environment and optionally opens the browser using platform-specific commands.
    private async openUI(
      autoOpen: boolean = true,
    ): Promise<{ url: string; message: string }> {
      const isProduction = process.env.NODE_ENV !== "development";
      const url = isProduction
        ? `http://localhost:${this.httpPort}`
        : `http://localhost:5173`;
    
      const message = isProduction
        ? `Mindpilot UI is available at ${url}`
        : `Mindpilot UI is available at ${url} (development mode)`;
    
      if (autoOpen) {
        try {
          const platform = process.platform;
          let command: string;
          let args: string[];
    
          if (platform === "darwin") {
            command = "open";
            args = [url];
          } else if (platform === "win32") {
            command = "cmd";
            args = ["/c", "start", url];
          } else {
            command = "xdg-open";
            args = [url];
          }
    
          spawn(command, args, { detached: true, stdio: "ignore" }).unref();
        } catch (error) {
          logger.error("Failed to open browser", { error });
        }
      }
    
      return { url, message };
  • Input schema defining the optional 'autoOpen' boolean parameter for the 'open_ui' tool.
    inputSchema: {
      type: "object",
      properties: {
        autoOpen: {
          type: "boolean",
          description: "Automatically open browser",
          default: true,
        },
      },
    },
  • Tool registration in the ListToolsRequestHandler, specifying name, description, and input schema for 'open_ui'.
    {
      name: "open_ui",
      description: "Open the web-based user interface",
      inputSchema: {
        type: "object",
        properties: {
          autoOpen: {
            type: "boolean",
            description: "Automatically open browser",
            default: true,
          },
        },
      },
    },
  • Dispatch logic in CallToolRequestHandler that calls the openUI handler and formats the response.
    case "open_ui":
      const uiResult = await this.openUI(args?.autoOpen as boolean);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(uiResult, null, 2),
          },
        ],
      };

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related 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/abrinsmead/mindpilot-mcp'

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