Documentation
¶
Overview ¶
Package install writes configured MCP servers into supported client config files.
Index ¶
- Constants
- Variables
- func DetectClients(basePath, homeDir, scope string) []string
- func ValidateScope(scope string) error
- type ConflictFunc
- type Installer
- type Option
- func WithAllClients(all bool) Option
- func WithBasePath(path string) Option
- func WithClients(clients []string) Option
- func WithDryRun(dryRun bool) Option
- func WithGitignore(gitignore bool) Option
- func WithHomeDir(path string) Option
- func WithOnConflict(fn ConflictFunc) Option
- func WithOverwrite(overwrite bool) Option
- func WithScope(scope string) Option
- type Options
- type Result
- type Target
Constants ¶
View Source
const ( ScopeProject = "project" ScopeUser = "user" ClientClaudeCode = "claude-code" ClientCursor = "cursor" ClientVSCode = "vscode" ClientCodex = "codex" ClientGemini = "gemini" ClientClaudeDesktop = "claude-desktop" ClientWindsurf = "windsurf" ClientCline = "cline" ClientClineCLI = "cline-cli" ClientZed = "zed" ClientOpenCode = "opencode" ClientGoose = "goose" // ClientCopilotCLI is the standalone `copilot` CLI product // (https://docs.github.com/en/copilot/how-tos/copilot-cli), distinct // from ClientVSCode's GitHub Copilot *extension*. Both historically // aliased the string "github-copilot-cli" onto ClientVSCode; see // normalizeClient for why that changed. ClientCopilotCLI = "copilot-cli" ClientAntigravity = "antigravity" ClientMCPorter = "mcporter" )
Variables ¶
View Source
var SupportedClients = []string{ ClientClaudeCode, ClientCursor, ClientVSCode, ClientCodex, ClientGemini, ClientClaudeDesktop, ClientWindsurf, ClientCline, ClientClineCLI, ClientZed, ClientOpenCode, ClientGoose, ClientCopilotCLI, ClientAntigravity, ClientMCPorter, }
Functions ¶
func DetectClients ¶
func ValidateScope ¶
Types ¶
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
func (*Installer) Uninstall ¶
Uninstall removes the named servers from each resolved client target. Callers are responsible for resolving the server-name list before calling (e.g. defaulting to "all currently declared" when no names are given) -- Uninstall itself just removes whatever names it's given, mirroring Install's contract of receiving an already-resolved server map.
type Option ¶
type Option func(*Options)
func WithAllClients ¶
func WithBasePath ¶
func WithClients ¶
func WithDryRun ¶
func WithGitignore ¶
func WithHomeDir ¶
func WithOnConflict ¶
func WithOnConflict(fn ConflictFunc) Option
func WithOverwrite ¶
type Result ¶
type Result struct {
CreatedFiles []string
UpdatedFiles []string
SkippedServers []string
GitignoredFiles []string
// AddedServers lists server entries that didn't previously exist in a
// given target and were newly written, formatted "<client>:<name>".
AddedServers []string
// UpdatedServers lists server entries that existed with different
// content and were overwritten (confirmed or --force), formatted
// "<client>:<name>".
UpdatedServers []string
// UnchangedServers lists server entries that already existed with
// identical content, so nothing was written and no overwrite
// confirmation was asked for, formatted "<client>:<name>".
UnchangedServers []string
// RemovedServers lists servers removed (or, in DryRun mode, that would be
// removed) by Uninstall, formatted "<client>:<name>".
RemovedServers []string
// NotFoundServers lists servers Uninstall was asked to remove that
// weren't present in a given target, formatted "<client>:<name>". This is
// distinct from SkippedServers, which means a declined overwrite
// confirmation during Install.
NotFoundServers []string
}
Click to show internal directories.
Click to hide internal directories.