Skip to main content
Glama
installAgentMaster.ts•2.76 kB
import { spawn } from "node:child_process"; import { platform } from "node:os"; import { z } from "zod"; const installAgentMasterSchema = z.object({ method: z .enum(["go", "source", "auto"]) .optional() .describe("Installation method"), }); /** * Install the Agent Master CLI tool for managing MCP server configurations */ export async function installAgentMaster( args: z.infer<typeof installAgentMasterSchema>, ) { const method = args.method || "auto"; return new Promise((resolve, reject) => { let command: string; let commandArgs: string[] = []; if (method === "auto" || method === "go") { // Try go install first command = "go"; commandArgs = ["install", "github.com/b-open-io/agent-master-cli@latest"]; } else if (method === "source") { // Install from source reject( new Error( "Source installation requires manual steps. Please run:\ngit clone https://github.com/b-open-io/agent-master-cli.git\ncd agent-master-cli\nmake deps && make build && make install", ), ); return; } console.log(`đź”§ Installing Agent Master CLI using ${method} method...`); const install = spawn(command, commandArgs, { stdio: "inherit", shell: true, }); install.on("error", (error) => { if (method === "auto" && command === "go") { // If go install fails in auto mode, provide instructions reject( new Error( "Go installation failed. Please ensure Go is installed or try manual installation:\n\n1. Install Go from https://golang.org/dl/\n2. Run: go install github.com/b-open-io/agent-master-cli@latest\n\nOr install from source:\ngit clone https://github.com/b-open-io/agent-master-cli.git\ncd agent-master-cli\nmake deps && make build && make install", ), ); } else { reject(error); } }); install.on("close", (code) => { if (code !== 0) { reject(new Error(`Installation failed with code ${code}`)); } else { resolve({ success: true, message: "âś… Agent Master CLI installed successfully!\n\nGet started with:\n agent-master init --with-demo\n agent-master list\n agent-master sync --preset claude", nextSteps: [ "Initialize configuration: agent-master init --with-demo", "List servers: agent-master list", 'Add BSV MCP: agent-master add bsv-mcp --transport stdio --command "bunx" --args "bsv-mcp@latest"', "Sync to Claude: agent-master sync --preset claude", ], }); } }); }); } export const installAgentMasterTool = { name: "utils_installAgentMaster", description: "Install the Agent Master CLI tool for managing MCP server configurations across multiple platforms (Claude, VS Code, Cursor, etc.)", inputSchema: installAgentMasterSchema, handler: installAgentMaster, };

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/b-open-io/bsv-mcp'

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