Documentation
¶
Overview ¶
Package mcpserver provides Chatto's optional public HTTP MCP integration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(chattoCore *core.ChattoCore, cfg config.ChattoConfig, version string, options ...Option) (http.Handler, error)
NewHandler constructs the protected MCP and metadata endpoints.
func WithClientAddress ¶
WithClientAddress returns r with the client IP address that the HTTP server resolved through its trusted-proxy configuration. Admission limits key unauthenticated and rejected requests by this address. Without it, they use the remote address of the connection.
Types ¶
type MessageSearch ¶
type MessageSearch interface {
SearchMessages(context.Context, *apiv1.SearchMessagesRequest) (*apiv1.SearchMessagesResponse, error)
}
MessageSearch runs the authorized public search operation with the verified runtime credential in the context, including validation and sealed cursors.
type Option ¶
type Option func(*handlerOptions)
Option supplies an optional MCP dependency.
func WithMessageSearch ¶
func WithMessageSearch(search MessageSearch) Option
WithMessageSearch supplies the shared public search operation.