Documentation
¶
Overview ¶
Package mcpinstall provides a public API for installing MCP server configurations for various AI coding assistants and editors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install installs an MCP server configuration for the specified client.
Required options:
- ClientName: The name of the client to configure (e.g., "claude-code", "cursor", "windsurf")
- ServerName: The name to register the MCP server as (e.g., "my-mcp-server")
- Command: Path to the MCP server binary (e.g., "/usr/local/bin/my-server")
- Args: Arguments to pass to the MCP server binary (e.g., []string{"serve", "--port", "8080"})
Optional fields:
- CreateBackup: If true, creates a backup of the existing config file before modification
- CustomConfigPath: Custom path to the config file (empty string uses default location)
Returns an error if the client is not supported, required options are missing, or installation fails.
Types ¶
type ClientInfo ¶
type ClientInfo = cmd.ClientInfo
ClientInfo contains information about a supported MCP client.
func SupportedClients ¶
func SupportedClients() []ClientInfo
SupportedClients returns information about all supported MCP clients. Use this to get valid values for Options.ClientName.
type Options ¶
type Options = cmd.InstallOptions
Options configures the MCP server installation behavior.
Click to show internal directories.
Click to hide internal directories.