Documentation
¶
Overview ¶
Package agents registers the git-stack MCP server with coding-agent CLIs. Each agent's own CLI is used (`claude mcp`, `codex mcp`); their config files are never edited directly.
Index ¶
Constants ¶
const ServerName = "git-stack"
ServerName is the MCP server name registered with every agent.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action int
Action is the outcome of Ensure.
type Agent ¶
type Agent interface {
// Name is the human-readable agent name.
Name() string
// Binary is the CLI executable looked up on PATH.
Binary() string
// Get reads the current registration.
Get(ctx context.Context) (Registration, error)
// Add registers `exe mcp` at user scope.
Add(ctx context.Context, exe string) error
// Remove unregisters the server. A missing server is not an error.
Remove(ctx context.Context) error
}
Agent is one coding-agent CLI.
type Claude ¶
type Claude struct {
// contains filtered or unexported fields
}
Claude registers with Claude Code (`claude mcp`, user scope, stored in ~/.claude.json by the CLI itself).
func (*Claude) Add ¶
Add runs `claude mcp add --scope user git-stack -- <exe> mcp`. Flags go before the "--"; everything after it is our command line.
type Codex ¶
type Codex struct {
// contains filtered or unexported fields
}
Codex registers with OpenAI Codex (`codex mcp`, which writes [mcp_servers.git-stack] to ~/.codex/config.toml).
type Registration ¶
type Registration struct {
// Present is true when a server named ServerName exists.
Present bool
// Command is the registered executable path, when it could be read.
Command string
}
Registration describes what an agent currently has for the server.