sandboxmcp

package
v1.35.1-2026040...-dc2c513 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package sandboxmcp implements the K8E Sandbox MCP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindActiveSession

func FindActiveSession(tenantID string) (string, error)

FindActiveSession returns the session ID of an existing Active session for the given tenantID, or "" if none found. Used for cross-process session reuse.

func InstallSkill

func InstallSkill(target string) error

InstallSkill installs MCP config and all skills from dataDir/skills/ into the given agent. target: "claude", "kiro", "gemini", or "all"

func StageSkills

func StageSkills(dataDir string) error

StageSkills writes all embedded sandbox skills to dataDir/skills/.

Types

type Client

type Client struct {
	SandboxServiceClient pb.SandboxServiceClient
	// contains filtered or unexported fields
}

Client wraps a gRPC SandboxServiceClient with its underlying connection.

func NewClient

func NewClient() (*Client, error)

NewClient auto-discovers the local K8E TLS cert and connects to the sandbox gRPC gateway. Override with K8E_SANDBOX_ENDPOINT, K8E_SANDBOX_CERT env vars.

func (*Client) Close

func (c *Client) Close() error

type SSEServer

type SSEServer struct {
	*Server
	// contains filtered or unexported fields
}

SSEServer is the HTTP/SSE MCP server. Create via NewSSEServer.

func NewSSEServer

func NewSSEServer(client *Client, tenantID string) *SSEServer

func (*SSEServer) RunSSE

func (s *SSEServer) RunSSE(ctx context.Context, addr string) error

RunSSE starts the HTTP server on addr (e.g. ":8811"). GET /mcp → SSE stream POST /mcp → JSON-RPC, response in HTTP body + optional SSE push

type Server

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

Server is the MCP stdio server.

func NewServer

func NewServer(client *Client) *Server

func NewServerWithTenant

func NewServerWithTenant(client *Client, tenantID string) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run reads JSON-RPC requests from stdin and writes responses to stdout until ctx is done or EOF. This is the legacy stdio transport — use RunSSE for long-lived connections.

type Tool

type Tool struct {
	Name        string
	Description string
	InputSchema map[string]any
	Handler     func(ctx context.Context, s *Server, args map[string]any) (string, error)
}

Tool defines a single MCP tool.

Jump to

Keyboard shortcuts

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