Documentation
¶
Index ¶
- func ExpandConfigPath(path string) string
- func GetConfigPath(client ClientConfig) (string, error)
- func GetServerArgs() []string
- func GetServerConfig() map[string]interface{}
- func IsPlatformSupported(p Platform) bool
- type ClientConfig
- type ClientStatus
- type ConfigFormat
- type InstallMethod
- type InstallationResult
- type Platform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandConfigPath ¶
ExpandConfigPath expands special variables in a config path. Supports: ~, $HOME, %APPDATA%, %USERPROFILE%
func GetConfigPath ¶
func GetConfigPath(client ClientConfig) (string, error)
GetConfigPath returns the expanded config file path for a client on the current platform. Returns empty string for CLI-based clients that don't use config files.
func GetServerArgs ¶
func GetServerArgs() []string
GetServerArgs returns the server command arguments.
func GetServerConfig ¶
func GetServerConfig() map[string]interface{}
GetServerConfig returns the MCP server configuration to add to client configs.
func IsPlatformSupported ¶
IsPlatformSupported returns true if the platform is supported.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
// Name is the human-readable client name (e.g., "Claude Code")
Name string
// ID is the CLI identifier (e.g., "claude-code")
ID string
// ConfigPaths maps platform to config file path (for file-based install)
ConfigPaths map[string]string
// ServerKey is the key used in the mcpServers object
ServerKey string
// ConfigFormat specifies the config file format
ConfigFormat ConfigFormat
// InstallMethod specifies how to install (file or CLI)
InstallMethod InstallMethod
// CLICommand is the command to use for CLI-based install (e.g., "claude")
CLICommand string
}
ClientConfig holds configuration for a supported MCP client.
func GetAllClients ¶
func GetAllClients() []ClientConfig
GetAllClients returns all supported MCP clients.
func GetClient ¶
func GetClient(id string) (ClientConfig, error)
GetClient returns the client configuration for the given ID. Client ID matching is case-insensitive. Also supports legacy "claude" alias for "claude-code".
type ClientStatus ¶
type ClientStatus struct {
// ClientName is the human-readable client name.
ClientName string
// ClientID is the CLI identifier.
ClientID string
// Installed indicates whether kusari-inspector is configured.
Installed bool
// ConfigPath is the path to the config file (empty for CLI-based).
ConfigPath string
// InstallMethod indicates how the client is configured.
InstallMethod InstallMethod
}
ClientStatus contains the installation status for a client.
func ListClients ¶
func ListClients(clients []ClientConfig) []ClientStatus
ListClients returns the installation status for all given clients.
type ConfigFormat ¶
type ConfigFormat int
ConfigFormat specifies the configuration file format for a client.
const ( // ConfigFormatStandard uses the mcpServers object format. ConfigFormatStandard ConfigFormat = iota // ConfigFormatContinue uses the experimental.modelContextProtocolServers array format. ConfigFormatContinue )
type InstallMethod ¶
type InstallMethod int
InstallMethod specifies how to install the MCP server for a client.
const ( // InstallMethodFile installs by writing to a config file. InstallMethodFile InstallMethod = iota // InstallMethodCLI installs using the client's CLI command. InstallMethodCLI )
type InstallationResult ¶
type InstallationResult struct {
// Success indicates whether the operation succeeded.
Success bool
// ClientName is the client that was configured.
ClientName string
// ConfigPath is the path to the config file modified (empty for CLI-based).
ConfigPath string
// Message contains success or error message.
Message string
// NeedsRestart indicates whether the client needs restart.
NeedsRestart bool
}
InstallationResult contains the result of an install/uninstall operation.
func Install ¶
func Install(client ClientConfig) (*InstallationResult, error)
Install installs the Kusari MCP server for the given client.
func Uninstall ¶
func Uninstall(client ClientConfig) (*InstallationResult, error)
Uninstall removes the Kusari MCP server from the given client.