mcp

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeStdio

func ServeStdio(ctx context.Context, r io.Reader, w io.Writer, logger *slog.Logger)

ServeStdio runs the MCP server on the given reader/writer (typically stdin/stdout). It reads newline-delimited JSON-RPC requests and writes responses.

Types

type Server

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

Server handles MCP protocol messages by delegating to existing JSON-RPC handlers.

func NewServer

func NewServer(logger *slog.Logger) *Server

NewServer creates an MCP server backed by the given JSON-RPC handler context.

func (*Server) HandleRequest

func (s *Server) HandleRequest(ctx context.Context, req *jsonrpc.Request) *jsonrpc.Response

HandleRequest processes a single MCP JSON-RPC request and returns a response.

type Tool

type Tool struct {
	Name        string          `json:"name"`
	Description string          `json:"description"`
	InputSchema json.RawMessage `json:"inputSchema"`
}

Tool describes an MCP tool with its input schema.

func ToolsDef

func ToolsDef() []Tool

ToolsDef returns the list of MCP tools exposed by waza.

Jump to

Keyboard shortcuts

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