Documentation
¶
Overview ¶
Package mcpserver offers mutti's use cases as tools of a Model Context Protocol server, for AI coding agents: start and inspect environments, run commands and tests in them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Done ¶
type Done struct {
Instance string `json:"instance"`
}
Done names the instance a tool acted on.
type ExecInput ¶
type ExecInput struct {
Dir string `json:"dir,omitempty" jsonschema:"worktree directory, absolute or relative to where mutti mcp runs; default: that directory"`
Service string `json:"service" jsonschema:"service to run the command in"`
Command []string `` /* 155-byte string literal not displayed */
Workdir string `json:"workdir,omitempty" jsonschema:"working directory inside the container"`
Env map[string]string `json:"env,omitempty" jsonschema:"extra environment variables"`
User string `json:"user,omitempty" jsonschema:"\"host\" (your user, the default), \"service\" (the image's user) or user[:group]"`
}
ExecInput is a command for a service.
type Exited ¶
type Exited struct {
ExitCode int `json:"exitCode"`
Output string `json:"output"`
Truncated bool `json:"truncated,omitempty"`
}
Exited is what a command printed and how it ended.
type LogsInput ¶
type LogsInput struct {
Dir string `json:"dir,omitempty" jsonschema:"worktree directory, absolute or relative to where mutti mcp runs; default: that directory"`
Services []string `json:"services,omitempty" jsonschema:"services to show; default: all"`
Tail int `json:"tail,omitempty" jsonschema:"lines per service, counted from the end; default 200"`
}
LogsInput selects logs.
type Output ¶
Output is what a command printed, stdout and stderr together. Truncated means only the end of it is there.
type Ran ¶
type Ran struct {
RunID string `json:"runId"`
ExitCode int `json:"exitCode"`
Logs string `json:"logs" jsonschema:"file with the logs of all services of the run"`
Output string `json:"output"`
Truncated bool `json:"truncated,omitempty"`
}
Ran is the result of a run.
type RunInput ¶
type RunInput struct {
Dir string `json:"dir,omitempty" jsonschema:"worktree directory, absolute or relative to where mutti mcp runs; default: that directory"`
Command []string `json:"command" jsonschema:"the command, run on the host with MUTTI_URL and the other MUTTI_* variables set, or in service"`
Service string `json:"service,omitempty" jsonschema:"run the command in a one-off container of this service instead of on the host"`
Start []string `json:"start,omitempty" jsonschema:"start only these services and what they depend on; default: all"`
Overlays []string `json:"overlays,omitempty" jsonschema:"x-mutti overlays to enable"`
Profiles []string `json:"profiles,omitempty" jsonschema:"Compose profiles to enable"`
}
RunInput is a command for a throwaway environment.
type Started ¶
type Started struct {
Instance string `json:"instance"`
Hostname string `json:"hostname"`
Path string `json:"path"`
URL string `json:"url,omitempty"`
Bootstrapped bool `json:"bootstrapped"` // the bootstrap hooks ran (first start)
Output string `json:"output"`
Truncated bool `json:"truncated,omitempty"`
}
Started describes a started environment.
type URLInput ¶
type URLInput struct {
Dir string `json:"dir,omitempty" jsonschema:"worktree directory, absolute or relative to where mutti mcp runs; default: that directory"`
Service string `json:"service,omitempty" jsonschema:"service whose URL to return; default: the environment's main URL"`
}
URLInput selects a service.
type UpInput ¶
type UpInput struct {
Dir string `json:"dir,omitempty" jsonschema:"worktree directory, absolute or relative to where mutti mcp runs; default: that directory"`
Services []string `json:"services,omitempty" jsonschema:"start only these services and what they depend on; default: all"`
Overlays []string `json:"overlays,omitempty" jsonschema:"x-mutti overlays to enable"`
Profiles []string `json:"profiles,omitempty" jsonschema:"Compose profiles to enable"`
Build bool `json:"build,omitempty" jsonschema:"rebuild images before starting"`
}
UpInput configures up.
type Where ¶
type Where struct {
Dir string `json:"dir,omitempty" jsonschema:"worktree directory, absolute or relative to where mutti mcp runs; default: that directory"`
}
Where is the worktree a tool works on.
type Worktree ¶
type Worktree struct {
Path string `json:"path" jsonschema:"pass it as dir to the other tools"`
Branch string `json:"branch"`
Started *Started `json:"started,omitempty"`
}
Worktree describes a created worktree.
type WorktreeInput ¶
type WorktreeInput struct {
Dir string `json:"dir,omitempty" jsonschema:"worktree directory, absolute or relative to where mutti mcp runs; default: that directory"`
Name string `json:"name" jsonschema:"name of the worktree, also of its new branch: lower case letters, digits and -"`
Branch string `json:"branch,omitempty" jsonschema:"check out this existing branch instead of creating one"`
From string `json:"from,omitempty" jsonschema:"base of the new branch; default: the current HEAD"`
DataFrom string `` /* 141-byte string literal not displayed */
NoUp bool `json:"noUp,omitempty" jsonschema:"only create the worktree, do not start its environment"`
}
WorktreeInput describes a new worktree.