Documentation
¶
Overview ¶
Package guard provides functionality for filtering MCP tool requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChildProcess ¶
type ChildProcess struct {
Stdin io.WriteCloser
Stdout io.ReadCloser
Stderr io.ReadCloser
// contains filtered or unexported fields
}
ChildProcess represents a child process that handles MCP requests.
func NewChildProcess ¶
func NewChildProcess(cmdArgs []string) *ChildProcess
NewChildProcess creates a new child process.
type FilterServer ¶
type FilterServer struct {
// contains filtered or unexported fields
}
FilterServer handles proxying requests and filtering tools, prompts, and resources.
func NewFilterServer ¶
func NewFilterServer(allowPatterns, denyPatterns map[string][]string) (*FilterServer, error)
NewFilterServer creates a new filter server.
func (*FilterServer) IsAllowed ¶
func (s *FilterServer) IsAllowed(entityType, name string) bool
IsAllowed determines if a name is allowed based on the configured patterns.
func (*FilterServer) Start ¶
func (s *FilterServer) Start(cmdArgs []string) error
Start begins listening for JSON-RPC requests on stdin, proxying them to the child process, and responding on stdout with filtered responses.
Click to show internal directories.
Click to hide internal directories.