Documentation
¶
Overview ¶
Package mcpserver exposes the local Stubborn CLI through the official MCP Go SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
func Install(options InstallOptions) (string, error)
Install writes a local stdio MCP entry into one of the supported, fixture- tested JSON client configuration formats. Existing valid configuration is backed up before an atomic replacement; malformed configuration is untouched.
func IsNormalClose ¶
IsNormalClose reports the standard EOF-shaped result of closing an stdio transport after the MCP client disconnects.
Types ¶
type InstallOptions ¶
type InstallOptions struct {
Client string
Root string
Command string
Home string
Now func() time.Time
}
InstallOptions configures an installation into a tested local MCP client configuration format. Command must be the absolute Stubborn executable path.
type Options ¶
type Options struct {
Root string
AuthorizationURL string
ManagementAPI string
ServerURL string
Version string
// CommandRunner is an optional test seam. Production callers leave it nil,
// so each handler executes the corresponding cliapp operation.
CommandRunner func(context.Context, string, []string) (cliapp.CommandResult, error)
}
Options configures a local, stdio-only MCP server. Root is the only repository that tools can inspect or change.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a root-confined MCP adapter over cliapp operations.
func New ¶
New constructs the server and verifies its configured root before it can serve an untrusted MCP client.