Documentation
¶
Overview ¶
Package cmdutil provides shared command-line helpers for MCP binaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggingFlags ¶
LoggingFlags are common flags for configuring slog output.
func (*LoggingFlags) Register ¶
func (flags *LoggingFlags) Register(fs *flag.FlagSet)
Register registers common logging flags on fs.
type RunOptions ¶ added in v0.4.0
type RunOptions struct {
Name string
Server *mcp.Server
Handler func(*http.Request) *mcp.Server
Middleware func(http.Handler) http.Handler
Logger *slog.Logger
}
RunOptions configures TransportFlags.Run.
type TransportFlags ¶
type TransportFlags struct {
Transport string
Addr string
TLSCertFile string
TLSKeyFile string
TLSClientCAFile string
ExposeProvider string
ExposeType string
ExposeConfig string
ExposeName string
DisableLocalhostProtection bool
}
TransportFlags are common MCP server transport flags.
func (*TransportFlags) Register ¶
func (flags *TransportFlags) Register(fs *flag.FlagSet)
Register registers common MCP transport flags on fs.
func (TransportFlags) Run ¶
func (flags TransportFlags) Run(ctx context.Context, opts RunOptions) error
Run starts an MCP server using the selected transport. Middleware wraps MCP endpoints only; the /health endpoint is intentionally left unwrapped.
Click to show internal directories.
Click to hide internal directories.