Documentation
¶
Overview ¶
Package desktopconfig reads, updates, and writes Claude Desktop's MCP server config file (claude_desktop_config.json) atomically and without clobbering unrelated entries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedOS = errors.New("Claude Desktop is not available on this OS; use --client print")
ErrUnsupportedOS indicates Claude Desktop is not available on the current OS.
Functions ¶
func DefaultClaudeDesktopPath ¶
DefaultClaudeDesktopPath returns the per-OS path to Claude Desktop's config.
func RemoveServer ¶
RemoveServer removes the named entry from "mcpServers". No-op if the file or entry is absent.
func UpsertServer ¶
func UpsertServer(path, name string, server RemoteServer) error
UpsertServer reads the JSON file at path (creating it if absent), inserts or updates the named MCP server entry under "mcpServers", and writes the result atomically (temp file + rename). All other top-level keys and sibling server entries are preserved.