Documentation
¶
Overview ¶
Package cursor provides an adapter for Cursor IDE MCP configuration.
Cursor uses the same format as Claude Desktop, with config files at:
- Global: ~/.cursor/mcp.json
- Project: .cursor/mcp.json
Index ¶
- Constants
- func GlobalConfigPath() (string, error)
- func ReadGlobalConfig() (*core.Config, error)
- func WriteGlobalConfig(cfg *core.Config) error
- type Adapter
- func (a *Adapter) DefaultPaths() []string
- 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) WriteFile(cfg *core.Config, path string) error
- type Config
- type ServerConfig
Constants ¶
View Source
const ( // AdapterName is the identifier for this adapter. AdapterName = "cursor" // GlobalConfigDir is the global config directory name. GlobalConfigDir = ".cursor" // ConfigFileName is the config file name. ConfigFileName = "mcp.json" )
Variables ¶
This section is empty.
Functions ¶
func GlobalConfigPath ¶
GlobalConfigPath returns the path to the global Cursor config.
func ReadGlobalConfig ¶
ReadGlobalConfig reads the global ~/.cursor/mcp.json file.
func WriteGlobalConfig ¶
WriteGlobalConfig writes to the global ~/.cursor/mcp.json file.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements core.Adapter for Cursor IDE.
func (*Adapter) DefaultPaths ¶
DefaultPaths returns the default config file paths for Cursor.
type ServerConfig ¶
type ServerConfig = claude.ServerConfig
ServerConfig is an alias for Claude's server config.
Click to show internal directories.
Click to hide internal directories.