Documentation
¶
Overview ¶
Package windsurf provides an adapter for Windsurf (Codeium) MCP configuration.
Windsurf uses a format similar to Claude, but with one key difference: HTTP servers use "serverUrl" instead of "url".
File location: ~/.codeium/windsurf/mcp_config.json
Index ¶
- Constants
- func ConfigPath() (string, error)
- func ReadConfig() (*core.Config, error)
- func WriteConfig(cfg *core.Config) error
- type Adapter
- func (a *Adapter) DefaultPaths() []string
- func (a *Adapter) FromCore(cfg *core.Config) *Config
- func (a *Adapter) Marshal(cfg *core.Config) ([]byte, error)
- func (a *Adapter) Name() string
- func (a *Adapter) Parse(data []byte) (*core.Config, error)
- func (a *Adapter) ReadFile(path string) (*core.Config, error)
- func (a *Adapter) ToCore(windsurfCfg *Config) *core.Config
- func (a *Adapter) WriteFile(cfg *core.Config, path string) error
- type Config
- type ServerConfig
Constants ¶
const ( // AdapterName is the identifier for this adapter. AdapterName = "windsurf" // ConfigDir is the config directory relative to home. ConfigDir = ".codeium/windsurf" // ConfigFileName is the config file name. ConfigFileName = "mcp_config.json" )
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the default Windsurf config path.
func ReadConfig ¶
ReadConfig reads the Windsurf config file.
func WriteConfig ¶
WriteConfig writes to the Windsurf config file.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements core.Adapter for Windsurf.
func (*Adapter) DefaultPaths ¶
DefaultPaths returns the default config file paths for Windsurf.
type Config ¶
type Config struct {
MCPServers map[string]ServerConfig `json:"mcpServers"`
}
Config represents the Windsurf MCP configuration.
type ServerConfig ¶
type ServerConfig struct {
// Type specifies the transport type.
Type string `json:"type,omitempty"`
// --- STDIO Server Fields ---
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
// --- HTTP Server Fields ---
// Note: Windsurf uses "serverUrl" instead of "url"
ServerURL string `json:"serverUrl,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
// --- Tool Control ---
DisabledTools []string `json:"disabledTools,omitempty"`
}
ServerConfig represents a Windsurf MCP server configuration. Note: Windsurf uses "serverUrl" for HTTP servers instead of "url".