MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / serverStartCommand

Function serverStartCommand

internal/cli/server.go:85–94  ·  view source on GitHub ↗

serverStartCommand is the auto-started server's command. Its env is this process's, minus config.InternalNoDataDirWarningEnv: an MCP tool-call child carries that variable so its own warning stays out of an agent-facing error, and it is often the process that auto-starts the server, which is long-liv

(exePath string)

Source from the content-addressed store, hash-verified

83// and it is often the process that auto-starts the server, which is
84// long-lived and must still log the warning (BUG-4066).
85func serverStartCommand(exePath string) *exec.Cmd {
86 cmd := exec.Command(exePath, "server", "start")
87 prefix := config.InternalNoDataDirWarningEnv + "="
88 for _, kv := range os.Environ() {
89 if !strings.HasPrefix(kv, prefix) {
90 cmd.Env = append(cmd.Env, kv)
91 }
92 }
93 return cmd
94}
95
96func startBackgroundServer(cfg *config.Config) error {
97 // Start server as background process

Calls 1

appendFunction · 0.85