Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListPromptsResult ¶
type ListPromptsResult struct {
Prompts []protocol.Prompt `json:"prompts"`
NextCursor string `json:"nextCursor"`
}
ListPromptsResult is the response type for prompts/list method
type ListResourcesResult ¶
type ListResourcesResult struct {
Resources []protocol.Resource `json:"resources"`
NextCursor string `json:"nextCursor"`
}
ListResourcesResult is the response type for resources/list method
type ListToolsResult ¶
type ListToolsResult struct {
Tools []protocol.Tool `json:"tools"`
NextCursor string `json:"nextCursor"`
}
ListToolsResult is the response type for tools/list method
type RequestHandler ¶ added in v0.0.7
type RequestHandler struct {
// contains filtered or unexported fields
}
RequestHandler handles incoming MCP protocol requests
func NewRequestHandler ¶ added in v0.0.7
func NewRequestHandler(s *Server) *RequestHandler
func (*RequestHandler) HandleNotification ¶ added in v0.0.7
func (h *RequestHandler) HandleNotification(ctx context.Context, notif *protocol.Notification) error
HandleNotification processes a notification (no response expected)
func (*RequestHandler) HandleRequest ¶ added in v0.0.7
func (h *RequestHandler) HandleRequest(ctx context.Context, req *protocol.Request) (*protocol.Response, error)
HandleRequest processes a request and returns a response
type SSEBridgeServer ¶ added in v0.0.7
type SSEBridgeServer struct {
// contains filtered or unexported fields
}
SSEBridgeServer is a stdio server that forwards all requests to an SSE server
func NewSSEBridgeServer ¶ added in v0.0.7
func NewSSEBridgeServer(logger zerolog.Logger, sseURL string) *SSEBridgeServer
NewSSEBridgeServer creates a new stdio server instance that forwards to SSE
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an MCP server that can use different transports
type ServerOption ¶
type ServerOption func(*Server)
func WithPromptProvider ¶ added in v0.0.7
func WithPromptProvider(pp pkg.PromptProvider) ServerOption
func WithResourceProvider ¶ added in v0.0.7
func WithResourceProvider(rp pkg.ResourceProvider) ServerOption
func WithServerName ¶
func WithServerName(name string) ServerOption
func WithServerVersion ¶
func WithServerVersion(version string) ServerOption
func WithToolProvider ¶ added in v0.0.7
func WithToolProvider(tp pkg.ToolProvider) ServerOption
Click to show internal directories.
Click to hide internal directories.