mcpstdio

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package mcpstdio constructs trusted, unsandboxed MCP stdio transports with the Coding Agent's minimal child environment and owned private directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Workspace            workspace.Workspace
	Command              string
	Args                 []string
	TempRoot             string
	Environment          func(string) (string, bool)
	EnvironmentOverrides []execution.EnvVar
	WorkingDirectory     string
	PluginRoot           string
	PluginData           string
	TerminateDuration    time.Duration
}

Config defines one shell-free stdio server process. Native definitions use absolute commands; Agent Plugins may also use a bare platform command.

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

Resource owns a prepared SDK transport and its private environment root. Close it only after the MCP Client has closed its process connection.

func NewTransport

func NewTransport(config Config) (*Resource, error)

NewTransport validates and prepares one MCP stdio transport. It does not start the command.

func (*Resource) Close

func (r *Resource) Close() error

Close removes the owned private directory and is idempotent.

func (*Resource) Command

func (r *Resource) Command() *exec.Cmd

Command returns a snapshot of the prepared shell-free command for internal inspection. Agent Plugin paths are validated again immediately before start.

func (*Resource) PrivateDir

func (r *Resource) PrivateDir() string

PrivateDir returns the owned private directory for lifecycle diagnostics.

func (*Resource) Transport

func (r *Resource) Transport() SDK.Transport

Transport returns the official SDK transport prepared by NewTransport.

Jump to

Keyboard shortcuts

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