mcp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Server *server.MCPServer
}

func NewServer

func NewServer(options ServerOptions) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(addr string) error

func (*Server) ServeStdio

func (s *Server) ServeStdio() error

type ServerOptions

type ServerOptions struct {
	ServerName    string
	ServerVersion string
	Verbose       bool
	tool.ASTReadToolsOptions
}

type Tool

type Tool struct {
	mcp.Tool
	Handler func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
}

func NewTool

func NewTool[R any, T any](name string, desc string, schema json.RawMessage, handler func(ctx context.Context, req R) (*T, error)) Tool

Jump to

Keyboard shortcuts

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