mcp

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const TokenScopesContextKey = ContextKey("TokenScopesContextKey")

Variables

View Source
var ToolsetNames []string
View Source
var Toolsets = []Toolset{
	&Full{},
}

Functions

func NewTextResult

func NewTextResult(content string, err error) *mcp.CallToolResult

Types

type Configuration

type Configuration struct {
	Toolset    Toolset
	ListOutput output.Output

	StaticConfig *config.StaticConfig
}

type ContextKey added in v0.0.48

type ContextKey string

type Full added in v0.0.50

type Full struct{}

func (*Full) GetDescription added in v0.0.50

func (p *Full) GetDescription() string

func (*Full) GetName added in v0.0.50

func (p *Full) GetName() string

func (*Full) GetTools added in v0.0.50

func (p *Full) GetTools(s *Server) []server.ServerTool

type Server

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

func NewServer

func NewServer(configuration Configuration) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) GetEnabledTools

func (s *Server) GetEnabledTools() []string

func (*Server) GetKubernetesAPIServerHost

func (s *Server) GetKubernetesAPIServerHost() string

GetKubernetesAPIServerHost returns the Kubernetes API server host from the configuration.

func (*Server) KubernetesApiVerifyToken added in v0.0.49

func (s *Server) KubernetesApiVerifyToken(ctx context.Context, token string, audience string) (*authenticationapiv1.UserInfo, []string, error)

KubernetesApiVerifyToken verifies the given token with the audience by sending an TokenReview request to API Server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(httpServer *http.Server) *server.StreamableHTTPServer

func (*Server) ServeSse

func (s *Server) ServeSse(baseUrl string, httpServer *http.Server) *server.SSEServer

func (*Server) ServeStdio

func (s *Server) ServeStdio() error

type Toolset added in v0.0.50

type Toolset interface {
	GetName() string
	GetDescription() string
	GetTools(s *Server) []server.ServerTool
}

func ToolsetFromString added in v0.0.50

func ToolsetFromString(name string) Toolset

Jump to

Keyboard shortcuts

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