Documentation
¶
Index ¶
- Constants
- func FilterStdioServers(servers []*mcp.Server) []*mcp.Server
- func Register(adapter Adapter)
- func SupportsWorkspace(a Adapter) bool
- type Adapter
- type ClaudeAdapter
- func (a *ClaudeAdapter) ConfigPath() string
- func (a *ClaudeAdapter) Detect() (bool, error)
- func (a *ClaudeAdapter) Name() string
- func (a *ClaudeAdapter) ReadCommands() ([]*command.Command, error)
- func (a *ClaudeAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *ClaudeAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *ClaudeAdapter) ReadSkills() ([]*skill.Skill, error)
- func (a *ClaudeAdapter) ReadWorkspaceServers(projectDir string) ([]*mcp.Server, error)
- func (a *ClaudeAdapter) SupportedResources() []ResourceType
- func (a *ClaudeAdapter) SupportsWorkspace() bool
- func (a *ClaudeAdapter) WorkspaceConfigPath(projectDir string) string
- func (a *ClaudeAdapter) WriteCommands(commands []*command.Command) error
- func (a *ClaudeAdapter) WriteRules(rules []*rule.Rule) error
- func (a *ClaudeAdapter) WriteServers(servers []*mcp.Server) error
- func (a *ClaudeAdapter) WriteWorkspaceServers(projectDir string, servers []*mcp.Server) error
- type ClaudeCodePlugin
- type ClaudeCodePluginsFile
- type ClaudeCodeSettings
- type ClaudeConfig
- type ClaudeDesktopAdapter
- func (a *ClaudeDesktopAdapter) ConfigPath() string
- func (a *ClaudeDesktopAdapter) Detect() (bool, error)
- func (a *ClaudeDesktopAdapter) Name() string
- func (a *ClaudeDesktopAdapter) ReadCommands() ([]*command.Command, error)
- func (a *ClaudeDesktopAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *ClaudeDesktopAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *ClaudeDesktopAdapter) SupportedResources() []ResourceType
- func (a *ClaudeDesktopAdapter) WriteCommands(commands []*command.Command) error
- func (a *ClaudeDesktopAdapter) WriteRules(rules []*rule.Rule) error
- func (a *ClaudeDesktopAdapter) WriteServers(servers []*mcp.Server) error
- type ClaudeServerConfig
- type ClineAdapter
- func (a *ClineAdapter) ConfigPath() string
- func (a *ClineAdapter) Detect() (bool, error)
- func (a *ClineAdapter) Name() string
- func (a *ClineAdapter) ReadCommands() ([]*command.Command, error)
- func (a *ClineAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *ClineAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *ClineAdapter) SupportedResources() []ResourceType
- func (a *ClineAdapter) WriteCommands(commands []*command.Command) error
- func (a *ClineAdapter) WriteRules(rules []*rule.Rule) error
- func (a *ClineAdapter) WriteServers(servers []*mcp.Server) error
- type ClineServerConfig
- type CodexAdapter
- func (a *CodexAdapter) ConfigPath() string
- func (a *CodexAdapter) Detect() (bool, error)
- func (a *CodexAdapter) Name() string
- func (a *CodexAdapter) ReadCommands() ([]*command.Command, error)
- func (a *CodexAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *CodexAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *CodexAdapter) SupportedResources() []ResourceType
- func (a *CodexAdapter) WriteCommands(commands []*command.Command) error
- func (a *CodexAdapter) WriteRules(rules []*rule.Rule) error
- func (a *CodexAdapter) WriteServers(servers []*mcp.Server) error
- type CodexConfig
- type CodexServerConfig
- type ContinueAdapter
- func (a *ContinueAdapter) ConfigPath() string
- func (a *ContinueAdapter) Detect() (bool, error)
- func (a *ContinueAdapter) Name() string
- func (a *ContinueAdapter) ReadCommands() ([]*command.Command, error)
- func (a *ContinueAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *ContinueAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *ContinueAdapter) SupportedResources() []ResourceType
- func (a *ContinueAdapter) WriteCommands(commands []*command.Command) error
- func (a *ContinueAdapter) WriteRules(rules []*rule.Rule) error
- func (a *ContinueAdapter) WriteServers(servers []*mcp.Server) error
- type ContinueServerConfig
- type CursorAdapter
- func (a *CursorAdapter) ConfigPath() string
- func (a *CursorAdapter) Detect() (bool, error)
- func (a *CursorAdapter) Name() string
- func (a *CursorAdapter) ReadCommands() ([]*command.Command, error)
- func (a *CursorAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *CursorAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *CursorAdapter) ReadWorkspaceServers(projectDir string) ([]*mcp.Server, error)
- func (a *CursorAdapter) SupportedResources() []ResourceType
- func (a *CursorAdapter) SupportsWorkspace() bool
- func (a *CursorAdapter) WorkspaceConfigPath(projectDir string) string
- func (a *CursorAdapter) WriteCommands(commands []*command.Command) error
- func (a *CursorAdapter) WriteRules(rules []*rule.Rule) error
- func (a *CursorAdapter) WriteServers(servers []*mcp.Server) error
- func (a *CursorAdapter) WriteWorkspaceServers(projectDir string, servers []*mcp.Server) error
- type CursorServerConfig
- type GeminiAdapter
- func (a *GeminiAdapter) ConfigPath() string
- func (a *GeminiAdapter) Detect() (bool, error)
- func (a *GeminiAdapter) Name() string
- func (a *GeminiAdapter) ReadCommands() ([]*command.Command, error)
- func (a *GeminiAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *GeminiAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *GeminiAdapter) SupportedResources() []ResourceType
- func (a *GeminiAdapter) WriteCommands(commands []*command.Command) error
- func (a *GeminiAdapter) WriteRules(rules []*rule.Rule) error
- func (a *GeminiAdapter) WriteServers(servers []*mcp.Server) error
- type GeminiConfig
- type GeminiServerConfig
- type OpenCodeAdapter
- func (a *OpenCodeAdapter) ConfigPath() string
- func (a *OpenCodeAdapter) Detect() (bool, error)
- func (a *OpenCodeAdapter) Name() string
- func (a *OpenCodeAdapter) ReadCommands() ([]*command.Command, error)
- func (a *OpenCodeAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *OpenCodeAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *OpenCodeAdapter) SupportedResources() []ResourceType
- func (a *OpenCodeAdapter) WriteCommands(commands []*command.Command) error
- func (a *OpenCodeAdapter) WriteRules(rules []*rule.Rule) error
- func (a *OpenCodeAdapter) WriteServers(servers []*mcp.Server) error
- type OpenCodeServerConfig
- type ResourceType
- type SyncResult
- type SyncState
- type WindsurfAdapter
- func (a *WindsurfAdapter) ConfigPath() string
- func (a *WindsurfAdapter) Detect() (bool, error)
- func (a *WindsurfAdapter) Name() string
- func (a *WindsurfAdapter) ReadCommands() ([]*command.Command, error)
- func (a *WindsurfAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *WindsurfAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *WindsurfAdapter) SupportedResources() []ResourceType
- func (a *WindsurfAdapter) WriteCommands(commands []*command.Command) error
- func (a *WindsurfAdapter) WriteRules(rules []*rule.Rule) error
- func (a *WindsurfAdapter) WriteServers(servers []*mcp.Server) error
- type WindsurfServerConfig
- type WorkspaceAdapter
- type ZedAdapter
- func (a *ZedAdapter) ConfigPath() string
- func (a *ZedAdapter) Detect() (bool, error)
- func (a *ZedAdapter) Name() string
- func (a *ZedAdapter) ReadCommands() ([]*command.Command, error)
- func (a *ZedAdapter) ReadRules() ([]*rule.Rule, error)
- func (a *ZedAdapter) ReadServers() ([]*mcp.Server, error)
- func (a *ZedAdapter) SupportedResources() []ResourceType
- func (a *ZedAdapter) WriteCommands(commands []*command.Command) error
- func (a *ZedAdapter) WriteRules(rules []*rule.Rule) error
- func (a *ZedAdapter) WriteServers(servers []*mcp.Server) error
- type ZedServerConfig
Constants ¶
const ManagedMarker = "_managedBy"
ManagedMarker is the key used to mark entries managed by agentctl
const ManagedValue = "agentctl"
ManagedValue is the value used to identify agentctl-managed entries
Variables ¶
This section is empty.
Functions ¶
func FilterStdioServers ¶
FilterStdioServers returns only servers that use stdio transport Use this for tools that don't support HTTP/SSE remote MCP servers
func SupportsWorkspace ¶
SupportsWorkspace checks if an adapter implements WorkspaceAdapter
Types ¶
type Adapter ¶
type Adapter interface {
// Name returns the adapter name (e.g., "claude", "cursor")
Name() string
// Detect checks if this tool is installed on the system
Detect() (bool, error)
// ConfigPath returns the path to the tool's config file
ConfigPath() string
// SupportedResources returns the resource types this adapter supports
SupportedResources() []ResourceType
// ReadServers reads MCP server configurations from the tool
ReadServers() ([]*mcp.Server, error)
// WriteServers writes MCP server configurations to the tool
WriteServers(servers []*mcp.Server) error
// ReadCommands reads command configurations from the tool (if supported)
ReadCommands() ([]*command.Command, error)
// WriteCommands writes command configurations to the tool (if supported)
WriteCommands(commands []*command.Command) error
// ReadRules reads rule configurations from the tool (if supported)
ReadRules() ([]*rule.Rule, error)
// WriteRules writes rule configurations to the tool (if supported)
WriteRules(rules []*rule.Rule) error
}
Adapter is the interface that tool-specific adapters must implement
type ClaudeAdapter ¶
type ClaudeAdapter struct{}
ClaudeAdapter syncs configuration to Claude Code CLI (~/.claude/) This is the default "claude" adapter as Claude Code is the primary developer tool
func (*ClaudeAdapter) ConfigPath ¶
func (a *ClaudeAdapter) ConfigPath() string
func (*ClaudeAdapter) Detect ¶
func (a *ClaudeAdapter) Detect() (bool, error)
func (*ClaudeAdapter) Name ¶
func (a *ClaudeAdapter) Name() string
func (*ClaudeAdapter) ReadCommands ¶
func (a *ClaudeAdapter) ReadCommands() ([]*command.Command, error)
func (*ClaudeAdapter) ReadServers ¶
func (a *ClaudeAdapter) ReadServers() ([]*mcp.Server, error)
func (*ClaudeAdapter) ReadSkills ¶
func (a *ClaudeAdapter) ReadSkills() ([]*skill.Skill, error)
ReadSkills reads installed plugins as skills
func (*ClaudeAdapter) ReadWorkspaceServers ¶
func (a *ClaudeAdapter) ReadWorkspaceServers(projectDir string) ([]*mcp.Server, error)
ReadWorkspaceServers reads MCP servers from the project's .mcp.json file
func (*ClaudeAdapter) SupportedResources ¶
func (a *ClaudeAdapter) SupportedResources() []ResourceType
func (*ClaudeAdapter) SupportsWorkspace ¶
func (a *ClaudeAdapter) SupportsWorkspace() bool
SupportsWorkspace returns true - Claude Code supports .mcp.json in project root
func (*ClaudeAdapter) WorkspaceConfigPath ¶
func (a *ClaudeAdapter) WorkspaceConfigPath(projectDir string) string
WorkspaceConfigPath returns the path to .mcp.json in the project directory
func (*ClaudeAdapter) WriteCommands ¶
func (a *ClaudeAdapter) WriteCommands(commands []*command.Command) error
func (*ClaudeAdapter) WriteRules ¶
func (a *ClaudeAdapter) WriteRules(rules []*rule.Rule) error
func (*ClaudeAdapter) WriteServers ¶
func (a *ClaudeAdapter) WriteServers(servers []*mcp.Server) error
func (*ClaudeAdapter) WriteWorkspaceServers ¶
func (a *ClaudeAdapter) WriteWorkspaceServers(projectDir string, servers []*mcp.Server) error
WriteWorkspaceServers writes MCP servers to the project's .mcp.json file
type ClaudeCodePlugin ¶
type ClaudeCodePlugin struct {
Scope string `json:"scope"`
InstallPath string `json:"installPath"`
Version string `json:"version"`
InstalledAt string `json:"installedAt"`
LastUpdated string `json:"lastUpdated"`
GitCommitSha string `json:"gitCommitSha,omitempty"`
IsLocal bool `json:"isLocal"`
}
ClaudeCodePlugin represents an installed plugin
type ClaudeCodePluginsFile ¶
type ClaudeCodePluginsFile struct {
Version int `json:"version"`
Plugins map[string][]ClaudeCodePlugin `json:"plugins"`
}
ClaudeCodePluginsFile represents the installed_plugins.json structure
type ClaudeCodeSettings ¶
type ClaudeCodeSettings struct {
MCPServers map[string]ClaudeServerConfig `json:"mcpServers,omitempty"`
EnabledPlugins map[string]bool `json:"enabledPlugins,omitempty"`
Hooks map[string]interface{} `json:"hooks,omitempty"`
// Preserve other fields
Other map[string]interface{} `json:"-"`
}
ClaudeCodeSettings represents Claude Code's settings.json structure
type ClaudeConfig ¶
type ClaudeConfig struct {
MCPServers map[string]ClaudeServerConfig `json:"mcpServers,omitempty"`
}
ClaudeConfig represents Claude's configuration file structure
type ClaudeDesktopAdapter ¶
type ClaudeDesktopAdapter struct{}
ClaudeDesktopAdapter syncs configuration to Claude Desktop (the Electron app)
func (*ClaudeDesktopAdapter) ConfigPath ¶
func (a *ClaudeDesktopAdapter) ConfigPath() string
func (*ClaudeDesktopAdapter) Detect ¶
func (a *ClaudeDesktopAdapter) Detect() (bool, error)
func (*ClaudeDesktopAdapter) Name ¶
func (a *ClaudeDesktopAdapter) Name() string
func (*ClaudeDesktopAdapter) ReadCommands ¶
func (a *ClaudeDesktopAdapter) ReadCommands() ([]*command.Command, error)
func (*ClaudeDesktopAdapter) ReadRules ¶
func (a *ClaudeDesktopAdapter) ReadRules() ([]*rule.Rule, error)
func (*ClaudeDesktopAdapter) ReadServers ¶
func (a *ClaudeDesktopAdapter) ReadServers() ([]*mcp.Server, error)
func (*ClaudeDesktopAdapter) SupportedResources ¶
func (a *ClaudeDesktopAdapter) SupportedResources() []ResourceType
func (*ClaudeDesktopAdapter) WriteCommands ¶
func (a *ClaudeDesktopAdapter) WriteCommands(commands []*command.Command) error
func (*ClaudeDesktopAdapter) WriteRules ¶
func (a *ClaudeDesktopAdapter) WriteRules(rules []*rule.Rule) error
func (*ClaudeDesktopAdapter) WriteServers ¶
func (a *ClaudeDesktopAdapter) WriteServers(servers []*mcp.Server) error
type ClaudeServerConfig ¶
type ClaudeServerConfig struct {
// For local (stdio) servers
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
// For remote (http/sse) servers
Transport string `json:"transport,omitempty"` // "http" or "sse"
URL string `json:"url,omitempty"` // Remote server URL
// Common fields
Env map[string]string `json:"env,omitempty"`
ManagedBy string `json:"_managedBy,omitempty"`
}
ClaudeServerConfig represents a server in Claude's config format
type ClineAdapter ¶
type ClineAdapter struct{}
ClineAdapter syncs configuration to Cline
func (*ClineAdapter) ConfigPath ¶
func (a *ClineAdapter) ConfigPath() string
func (*ClineAdapter) Detect ¶
func (a *ClineAdapter) Detect() (bool, error)
func (*ClineAdapter) Name ¶
func (a *ClineAdapter) Name() string
func (*ClineAdapter) ReadCommands ¶
func (a *ClineAdapter) ReadCommands() ([]*command.Command, error)
func (*ClineAdapter) ReadServers ¶
func (a *ClineAdapter) ReadServers() ([]*mcp.Server, error)
func (*ClineAdapter) SupportedResources ¶
func (a *ClineAdapter) SupportedResources() []ResourceType
func (*ClineAdapter) WriteCommands ¶
func (a *ClineAdapter) WriteCommands(commands []*command.Command) error
func (*ClineAdapter) WriteRules ¶
func (a *ClineAdapter) WriteRules(rules []*rule.Rule) error
func (*ClineAdapter) WriteServers ¶
func (a *ClineAdapter) WriteServers(servers []*mcp.Server) error
type ClineServerConfig ¶
type ClineServerConfig struct {
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
ManagedBy string `json:"_managedBy,omitempty"`
}
ClineServerConfig represents a server in Cline's config format
type CodexAdapter ¶
type CodexAdapter struct{}
CodexAdapter syncs configuration to OpenAI Codex CLI
func (*CodexAdapter) ConfigPath ¶
func (a *CodexAdapter) ConfigPath() string
func (*CodexAdapter) Detect ¶
func (a *CodexAdapter) Detect() (bool, error)
func (*CodexAdapter) Name ¶
func (a *CodexAdapter) Name() string
func (*CodexAdapter) ReadCommands ¶
func (a *CodexAdapter) ReadCommands() ([]*command.Command, error)
func (*CodexAdapter) ReadServers ¶
func (a *CodexAdapter) ReadServers() ([]*mcp.Server, error)
func (*CodexAdapter) SupportedResources ¶
func (a *CodexAdapter) SupportedResources() []ResourceType
func (*CodexAdapter) WriteCommands ¶
func (a *CodexAdapter) WriteCommands(commands []*command.Command) error
func (*CodexAdapter) WriteRules ¶
func (a *CodexAdapter) WriteRules(rules []*rule.Rule) error
func (*CodexAdapter) WriteServers ¶
func (a *CodexAdapter) WriteServers(servers []*mcp.Server) error
type CodexConfig ¶
type CodexConfig struct {
MCPServers map[string]CodexServerConfig `json:"mcpServers,omitempty"`
}
CodexConfig represents Codex's configuration
type CodexServerConfig ¶
type CodexServerConfig struct {
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
ManagedBy string `json:"_managedBy,omitempty"`
}
CodexServerConfig represents a server in Codex's config format
type ContinueAdapter ¶
type ContinueAdapter struct{}
ContinueAdapter syncs configuration to Continue.dev
func (*ContinueAdapter) ConfigPath ¶
func (a *ContinueAdapter) ConfigPath() string
func (*ContinueAdapter) Detect ¶
func (a *ContinueAdapter) Detect() (bool, error)
func (*ContinueAdapter) Name ¶
func (a *ContinueAdapter) Name() string
func (*ContinueAdapter) ReadCommands ¶
func (a *ContinueAdapter) ReadCommands() ([]*command.Command, error)
func (*ContinueAdapter) ReadServers ¶
func (a *ContinueAdapter) ReadServers() ([]*mcp.Server, error)
func (*ContinueAdapter) SupportedResources ¶
func (a *ContinueAdapter) SupportedResources() []ResourceType
func (*ContinueAdapter) WriteCommands ¶
func (a *ContinueAdapter) WriteCommands(commands []*command.Command) error
func (*ContinueAdapter) WriteRules ¶
func (a *ContinueAdapter) WriteRules(rules []*rule.Rule) error
func (*ContinueAdapter) WriteServers ¶
func (a *ContinueAdapter) WriteServers(servers []*mcp.Server) error
type ContinueServerConfig ¶
type ContinueServerConfig struct {
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
ManagedBy string `json:"_managedBy,omitempty"`
}
ContinueServerConfig represents a server in Continue's config format
type CursorAdapter ¶
type CursorAdapter struct{}
CursorAdapter syncs configuration to Cursor
func (*CursorAdapter) ConfigPath ¶
func (a *CursorAdapter) ConfigPath() string
func (*CursorAdapter) Detect ¶
func (a *CursorAdapter) Detect() (bool, error)
func (*CursorAdapter) Name ¶
func (a *CursorAdapter) Name() string
func (*CursorAdapter) ReadCommands ¶
func (a *CursorAdapter) ReadCommands() ([]*command.Command, error)
func (*CursorAdapter) ReadServers ¶
func (a *CursorAdapter) ReadServers() ([]*mcp.Server, error)
func (*CursorAdapter) ReadWorkspaceServers ¶
func (a *CursorAdapter) ReadWorkspaceServers(projectDir string) ([]*mcp.Server, error)
ReadWorkspaceServers reads MCP servers from the project's .cursor/mcp.json file
func (*CursorAdapter) SupportedResources ¶
func (a *CursorAdapter) SupportedResources() []ResourceType
func (*CursorAdapter) SupportsWorkspace ¶
func (a *CursorAdapter) SupportsWorkspace() bool
SupportsWorkspace returns true - Cursor supports .cursor/mcp.json in project root
func (*CursorAdapter) WorkspaceConfigPath ¶
func (a *CursorAdapter) WorkspaceConfigPath(projectDir string) string
WorkspaceConfigPath returns the path to .cursor/mcp.json in the project directory
func (*CursorAdapter) WriteCommands ¶
func (a *CursorAdapter) WriteCommands(commands []*command.Command) error
func (*CursorAdapter) WriteRules ¶
func (a *CursorAdapter) WriteRules(rules []*rule.Rule) error
func (*CursorAdapter) WriteServers ¶
func (a *CursorAdapter) WriteServers(servers []*mcp.Server) error
func (*CursorAdapter) WriteWorkspaceServers ¶
func (a *CursorAdapter) WriteWorkspaceServers(projectDir string, servers []*mcp.Server) error
WriteWorkspaceServers writes MCP servers to the project's .cursor/mcp.json file
type CursorServerConfig ¶
type CursorServerConfig struct {
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
ManagedBy string `json:"_managedBy,omitempty"`
}
CursorServerConfig represents a server in Cursor's config format
type GeminiAdapter ¶
type GeminiAdapter struct{}
GeminiAdapter syncs configuration to Google Gemini CLI
func (*GeminiAdapter) ConfigPath ¶
func (a *GeminiAdapter) ConfigPath() string
func (*GeminiAdapter) Detect ¶
func (a *GeminiAdapter) Detect() (bool, error)
func (*GeminiAdapter) Name ¶
func (a *GeminiAdapter) Name() string
func (*GeminiAdapter) ReadCommands ¶
func (a *GeminiAdapter) ReadCommands() ([]*command.Command, error)
func (*GeminiAdapter) ReadServers ¶
func (a *GeminiAdapter) ReadServers() ([]*mcp.Server, error)
func (*GeminiAdapter) SupportedResources ¶
func (a *GeminiAdapter) SupportedResources() []ResourceType
func (*GeminiAdapter) WriteCommands ¶
func (a *GeminiAdapter) WriteCommands(commands []*command.Command) error
func (*GeminiAdapter) WriteRules ¶
func (a *GeminiAdapter) WriteRules(rules []*rule.Rule) error
func (*GeminiAdapter) WriteServers ¶
func (a *GeminiAdapter) WriteServers(servers []*mcp.Server) error
type GeminiConfig ¶
type GeminiConfig struct {
MCPServers map[string]GeminiServerConfig `json:"mcpServers,omitempty"`
// Preserve other fields
Other map[string]interface{} `json:"-"`
}
GeminiConfig represents Gemini's configuration
type GeminiServerConfig ¶
type GeminiServerConfig struct {
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
URL string `json:"url,omitempty"`
Transport string `json:"transport,omitempty"`
ManagedBy string `json:"_managedBy,omitempty"`
}
GeminiServerConfig represents a server in Gemini's config format
type OpenCodeAdapter ¶
type OpenCodeAdapter struct{}
OpenCodeAdapter syncs configuration to OpenCode (opencode.ai)
func (*OpenCodeAdapter) ConfigPath ¶
func (a *OpenCodeAdapter) ConfigPath() string
func (*OpenCodeAdapter) Detect ¶
func (a *OpenCodeAdapter) Detect() (bool, error)
func (*OpenCodeAdapter) Name ¶
func (a *OpenCodeAdapter) Name() string
func (*OpenCodeAdapter) ReadCommands ¶
func (a *OpenCodeAdapter) ReadCommands() ([]*command.Command, error)
func (*OpenCodeAdapter) ReadServers ¶
func (a *OpenCodeAdapter) ReadServers() ([]*mcp.Server, error)
func (*OpenCodeAdapter) SupportedResources ¶
func (a *OpenCodeAdapter) SupportedResources() []ResourceType
func (*OpenCodeAdapter) WriteCommands ¶
func (a *OpenCodeAdapter) WriteCommands(commands []*command.Command) error
func (*OpenCodeAdapter) WriteRules ¶
func (a *OpenCodeAdapter) WriteRules(rules []*rule.Rule) error
func (*OpenCodeAdapter) WriteServers ¶
func (a *OpenCodeAdapter) WriteServers(servers []*mcp.Server) error
type OpenCodeServerConfig ¶
type OpenCodeServerConfig struct {
Type string `json:"type"`
Command []string `json:"command,omitempty"`
URL string `json:"url,omitempty"`
Env map[string]string `json:"env,omitempty"`
Enabled bool `json:"enabled"`
}
OpenCodeServerConfig represents a server in OpenCode's config format OpenCode uses a different format than Claude Desktop: - "type": "local" or "remote" - "command": array of strings (command + args combined) - "enabled": boolean - "url": for remote servers Note: OpenCode's schema is strict - no custom fields allowed
type ResourceType ¶
type ResourceType string
ResourceType represents the type of resource being synced
const ( ResourceMCP ResourceType = "mcp" ResourceCommands ResourceType = "commands" ResourceRules ResourceType = "rules" ResourcePrompts ResourceType = "prompts" ResourceSkills ResourceType = "skills" )
type SyncResult ¶
type SyncResult struct {
Tool string
Success bool
Error error
Changes int // Number of changes made
}
SyncResult represents the result of syncing to a tool
type SyncState ¶
type SyncState struct {
Version int `json:"version"`
// ManagedServers maps adapter name -> list of server names we manage
ManagedServers map[string][]string `json:"managedServers"`
}
SyncState tracks which servers are managed by agentctl per adapter This is stored in ~/.config/agentctl/sync-state.json
func (*SyncState) ClearManagedServers ¶
ClearManagedServers removes all managed servers for an adapter
func (*SyncState) GetManagedServers ¶
GetManagedServers returns the list of server names managed for an adapter
func (*SyncState) SetManagedServers ¶
SetManagedServers sets the list of server names managed for an adapter
type WindsurfAdapter ¶
type WindsurfAdapter struct{}
WindsurfAdapter syncs configuration to Windsurf (Codeium)
func (*WindsurfAdapter) ConfigPath ¶
func (a *WindsurfAdapter) ConfigPath() string
func (*WindsurfAdapter) Detect ¶
func (a *WindsurfAdapter) Detect() (bool, error)
func (*WindsurfAdapter) Name ¶
func (a *WindsurfAdapter) Name() string
func (*WindsurfAdapter) ReadCommands ¶
func (a *WindsurfAdapter) ReadCommands() ([]*command.Command, error)
func (*WindsurfAdapter) ReadServers ¶
func (a *WindsurfAdapter) ReadServers() ([]*mcp.Server, error)
func (*WindsurfAdapter) SupportedResources ¶
func (a *WindsurfAdapter) SupportedResources() []ResourceType
func (*WindsurfAdapter) WriteCommands ¶
func (a *WindsurfAdapter) WriteCommands(commands []*command.Command) error
func (*WindsurfAdapter) WriteRules ¶
func (a *WindsurfAdapter) WriteRules(rules []*rule.Rule) error
func (*WindsurfAdapter) WriteServers ¶
func (a *WindsurfAdapter) WriteServers(servers []*mcp.Server) error
type WindsurfServerConfig ¶
type WindsurfServerConfig struct {
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
ManagedBy string `json:"_managedBy,omitempty"`
}
WindsurfServerConfig represents a server in Windsurf's config format
type WorkspaceAdapter ¶
type WorkspaceAdapter interface {
Adapter
// SupportsWorkspace returns true if this tool has workspace-level config support
SupportsWorkspace() bool
// WorkspaceConfigPath returns the path to the workspace config file for a given project
WorkspaceConfigPath(projectDir string) string
// ReadWorkspaceServers reads MCP servers from the workspace config
ReadWorkspaceServers(projectDir string) ([]*mcp.Server, error)
// WriteWorkspaceServers writes MCP servers to the workspace config
WriteWorkspaceServers(projectDir string, servers []*mcp.Server) error
}
WorkspaceAdapter is an optional interface for adapters that support project-level (workspace) configurations in addition to global configs. Tools like Claude Code (.mcp.json) and Cursor (.cursor/mcp.json) support this.
func AsWorkspaceAdapter ¶
func AsWorkspaceAdapter(a Adapter) (WorkspaceAdapter, bool)
AsWorkspaceAdapter returns the adapter as a WorkspaceAdapter if supported
type ZedAdapter ¶
type ZedAdapter struct{}
ZedAdapter syncs configuration to Zed editor
func (*ZedAdapter) ConfigPath ¶
func (a *ZedAdapter) ConfigPath() string
func (*ZedAdapter) Detect ¶
func (a *ZedAdapter) Detect() (bool, error)
func (*ZedAdapter) Name ¶
func (a *ZedAdapter) Name() string
func (*ZedAdapter) ReadCommands ¶
func (a *ZedAdapter) ReadCommands() ([]*command.Command, error)
func (*ZedAdapter) ReadServers ¶
func (a *ZedAdapter) ReadServers() ([]*mcp.Server, error)
func (*ZedAdapter) SupportedResources ¶
func (a *ZedAdapter) SupportedResources() []ResourceType
func (*ZedAdapter) WriteCommands ¶
func (a *ZedAdapter) WriteCommands(commands []*command.Command) error
func (*ZedAdapter) WriteRules ¶
func (a *ZedAdapter) WriteRules(rules []*rule.Rule) error
func (*ZedAdapter) WriteServers ¶
func (a *ZedAdapter) WriteServers(servers []*mcp.Server) error