Documentation
¶
Overview ¶
Package cline provides an adapter for Cline VS Code extension MCP configuration.
Cline uses a format similar to Claude, with additional fields:
- alwaysAllow: tools that don't require user approval
- disabled: whether the server is disabled
File location: cline_mcp_settings.json (in VS Code settings)
Index ¶
- Constants
- 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(clineCfg *Config) *core.Config
- func (a *Adapter) WriteFile(cfg *core.Config, path string) error
- type Config
- type ServerConfig
Constants ¶
View Source
const ( // AdapterName is the identifier for this adapter. AdapterName = "cline" // ConfigFileName is the config file name. ConfigFileName = "cline_mcp_settings.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements core.Adapter for Cline.
func (*Adapter) DefaultPaths ¶
DefaultPaths returns the default config file paths for Cline.
type Config ¶
type Config struct {
MCPServers map[string]ServerConfig `json:"mcpServers"`
}
Config represents the Cline 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/SSE Server Fields ---
URL string `json:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
// AlwaysAllow lists tools that don't require user approval.
AlwaysAllow []string `json:"alwaysAllow,omitempty"`
// Disabled indicates whether the server is disabled.
Disabled bool `json:"disabled,omitempty"`
}
ServerConfig represents a Cline MCP server configuration.
Click to show internal directories.
Click to hide internal directories.