inspector

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package inspector launches MCP Inspector as a subprocess. Thin wrapper around `npx -y @modelcontextprotocol/inspector`; no protocol handling. Callers own the returned *exec.Cmd and decide whether to Wait or Kill.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Launch

func Launch(ctx context.Context, serverURL string) (*exec.Cmd, error)

Launch starts MCP Inspector as a subprocess pointed at serverURL. stdout/stderr are wired to the current process. Errors only if Start fails (typically: npx not on PATH).

func LaunchStdio

func LaunchStdio(ctx context.Context, dir string, extraEnv []string, binCmd string, binArgs ...string) (*exec.Cmd, error)

LaunchStdio starts MCP Inspector as a subprocess that spawns binCmd + binArgs over stdio. dir is the working directory the binary runs in (pass projectDir for source-relative paths). extraEnv augments the inherited environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL