Documentation
¶
Index ¶
- Constants
- func EnvBoolValue(value string) bool
- func FirstNonEmpty(values ...string) string
- func IsLoopbackListenAddr(addr string) bool
- func JSONResult(value any) *mcp.CallToolResult
- func NewHTTPServer(addr string, handler http.Handler) *http.Server
- func ParseModes(raw string) map[string]bool
- func RequireMCPToken(token string, next http.Handler) http.Handler
- func ShellQuote(value string) string
- func SiblingStackkitBinary() (string, error)
- func StringMapValue(values map[string]any, key string) string
- func TextResult(text string) *mcp.CallToolResult
- type App
- type Options
Constants ¶
const DefaultLocalServerURL = "http://localhost:8082"
DefaultLocalServerURL is the loopback-only default for a local stackkit-server when STACKKITS_SERVER_URL and --server-url are unset. Standard Mode binds MCP and the API to the developer machine; it is not a hosted production origin.
Variables ¶
This section is empty.
Functions ¶
func EnvBoolValue ¶
EnvBoolValue parses common truthy environment values.
func FirstNonEmpty ¶
FirstNonEmpty returns the first non-empty value after trimming whitespace.
func IsLoopbackListenAddr ¶
IsLoopbackListenAddr reports whether an HTTP listen address is loopback-only.
func JSONResult ¶
func JSONResult(value any) *mcp.CallToolResult
func NewHTTPServer ¶
NewHTTPServer creates a hardened Streamable HTTP server. WriteTimeout stays disabled because MCP Streamable HTTP may keep responses open.
func ParseModes ¶
ParseModes parses a comma-separated MCP mode list.
func RequireMCPToken ¶
RequireMCPToken requires a bearer or X-StackKit-MCP-Token value.
func ShellQuote ¶
func SiblingStackkitBinary ¶
SiblingStackkitBinary returns the packaged CLI beside stackkit-server or stackkit-mcp, through the shared exact-build local process binding.
func TextResult ¶
func TextResult(text string) *mcp.CallToolResult
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App owns the StackKits MCP registration shared by stackkit-mcp and stackkit-server.
func (*App) OpenMCPJSON ¶
OpenMCPJSON returns pretty JSON discovery metadata.
func (*App) ProtectedStreamableHTTPHandler ¶
ProtectedStreamableHTTPHandler wraps the MCP handler with token auth when configured.
func (*App) StreamableHTTPHandler ¶
StreamableHTTPHandler returns a Streamable HTTP MCP handler.