mcp

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

func WithAdminProxyEndpointAllowlist

func WithAdminProxyEndpointAllowlist(entries []string) Option

func WithAuditWriter

func WithAuditWriter(w io.Writer) Option

func WithMutationsEnabled

func WithMutationsEnabled(enabled bool) Option

func WithPrincipal

func WithPrincipal(principal string) Option

func WithRole

func WithRole(role Role) Option

func WithRuntimeControlEnabled

func WithRuntimeControlEnabled(enabled bool) Option

func WithRuntimeControlPIDFile

func WithRuntimeControlPIDFile(path string) Option

func WithRuntimeControlRunBinary

func WithRuntimeControlRunBinary(path string) Option

func WithRuntimeControlRunDotenv

func WithRuntimeControlRunDotenv(path string) Option

func WithRuntimeControlRunLogLevel

func WithRuntimeControlRunLogLevel(level string) Option

func WithRuntimeControlRunWatch

func WithRuntimeControlRunWatch(enabled bool) Option

type Role

type Role string
const (
	RoleRead    Role = "read"
	RoleOperate Role = "operate"
	RoleAdmin   Role = "admin"
)

func ParseRole

func ParseRole(raw string) (Role, error)

type Server

type Server struct {
	ConfigPath                  string
	DBPath                      string
	PIDFilePath                 string
	RunBinaryPath               string
	RunWatch                    bool
	RunLogLevel                 string
	RunDotenvPath               string
	AdminProxyEndpointAllowlist []string
	In                          io.Reader
	Out                         io.Writer

	MutationsEnabled      bool
	RuntimeControlEnabled bool
	Role                  Role
	Principal             string
	AuditWriter           io.Writer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(in io.Reader, out io.Writer, configPath, dbPath string, opts ...Option) *Server

func (*Server) Serve

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

Jump to

Keyboard shortcuts

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