cline

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 5 Imported by: 0

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

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 NewAdapter

func NewAdapter() *Adapter

NewAdapter creates a new Cline adapter.

func (*Adapter) DefaultPaths

func (a *Adapter) DefaultPaths() []string

DefaultPaths returns the default config file paths for Cline.

func (*Adapter) FromCore

func (a *Adapter) FromCore(cfg *core.Config) *Config

FromCore converts canonical config to Cline format.

func (*Adapter) Marshal

func (a *Adapter) Marshal(cfg *core.Config) ([]byte, error)

Marshal converts canonical config to Cline format.

func (*Adapter) Name

func (a *Adapter) Name() string

Name returns the adapter name.

func (*Adapter) Parse

func (a *Adapter) Parse(data []byte) (*core.Config, error)

Parse parses Cline config data into the canonical format.

func (*Adapter) ReadFile

func (a *Adapter) ReadFile(path string) (*core.Config, error)

ReadFile reads a Cline config file.

func (*Adapter) ToCore

func (a *Adapter) ToCore(clineCfg *Config) *core.Config

ToCore converts Cline config to canonical format.

func (*Adapter) WriteFile

func (a *Adapter) WriteFile(cfg *core.Config, path string) error

WriteFile writes canonical config to a Cline format file.

type Config

type Config struct {
	MCPServers map[string]ServerConfig `json:"mcpServers"`
}

Config represents the Cline MCP configuration.

func NewConfig

func NewConfig() *Config

NewConfig creates a new Cline config.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL