Skip to content

Commit 1345519

Browse files
authored
Add public API for MCP server installation (#122)
Add a new public package `pkg/mcpinstall` that exposes MCP server installation functionality for use by external projects. Public API: - Install(opts Options) - Install MCP server config for a client - SupportedClients() - List available clients with names and IDs - Options struct - All configuration in one place - ClientInfo struct - Client display name and identifier Options fields: - ClientName (required) - Client identifier (e.g., "claude-code", "cursor") - ServerName (required) - Name to register the MCP server as - Command (required) - Path to the MCP server binary - Args (required) - Arguments to pass to the binary - CreateBackup (optional) - Create backup before modification - CustomConfigPath (optional) - Override default config location Example usage: err := mcpinstall.Install(mcpinstall.Options{ ClientName: "cursor", ServerName: "my-mcp-server", Command: "/usr/local/bin/my-server", Args: []string{"serve"}, }) Internal changes: - Refactor InstallMCPForClient to accept configurable options - Separate Tiger-specific defaults into installTigerMCPForClient - Fix VSCode buildInstallCommand to marshal entire JSON struct - Simplify tests to pass values directly
1 parent c0cae55 commit 1345519

File tree

4 files changed

+222
-119
lines changed

4 files changed

+222
-119
lines changed

internal/tiger/cmd/mcp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Examples:
107107
clientName = args[0]
108108
}
109109

110-
return installMCPForClient(clientName, !noBackup, configPath)
110+
return installTigerMCPForClient(clientName, !noBackup, configPath)
111111
},
112112
}
113113

0 commit comments

Comments
 (0)