claude

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package claude provides configuration management for Claude Desktop MCP servers.

This package handles:

  • Claude Desktop configuration structure (claude_desktop_config.json)
  • Platform-specific configuration file paths (macOS, Linux, Windows)
  • MCP server entry management

Platform-specific path functions use build tags to locate the Claude Desktop configuration directory on different operating systems.

This is an internal package and should not be imported by users of the cobrax library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath() string

ConfigPath returns the default config path

Types

type Config

type Config struct {
	Servers map[string]Server `json:"mcpServers"`
}

Config represents the structure of Claude Desktop's configuration file.

func (*Config) AddServer

func (c *Config) AddServer(name string, server Server)

AddServer adds or updates a server in the configuration.

func (*Config) HasServer

func (c *Config) HasServer(name string) bool

HasServer returns true if a server with the given name exists in the configuration.

func (*Config) Print

func (c *Config) Print()

Print displays all configured MCP servers.

func (*Config) RemoveServer

func (c *Config) RemoveServer(name string)

RemoveServer removes a server from the configuration.

type Server

type Server struct {
	Command string            `json:"command"`
	Args    []string          `json:"args,omitempty"`
	Env     map[string]string `json:"env,omitempty"`
}

Server represents an MCP server configuration entry for Claude Desktop.

func (Server) Print

func (s Server) Print()

Print displays the server configuration details.

Jump to

Keyboard shortcuts

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