mcpgateway

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGlobalTokenStore

func NewGlobalTokenStore(gatewayClient *gateway.Client) mcp.GlobalTokenStore

Types

type AuditLogHandler

type AuditLogHandler struct{}

func NewAuditLogHandler

func NewAuditLogHandler() *AuditLogHandler

func (*AuditLogHandler) GetUsageStats

func (h *AuditLogHandler) GetUsageStats(req api.Context) error

GetUsageStats handles GET /api/mcp-stats and /api/mcp-stats/{mcp_id}

func (*AuditLogHandler) ListAuditLogFilterOptions

func (h *AuditLogHandler) ListAuditLogFilterOptions(req api.Context) error

func (*AuditLogHandler) ListAuditLogs

func (h *AuditLogHandler) ListAuditLogs(req api.Context) error

ListAuditLogs handles GET /api/mcp-audit-logs and /api/mcp-audit-logs/{mcp_id}

type Handler

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

func NewHandler

func NewHandler(storageClient kclient.Client, mcpSessionManager *mcp.SessionManager, webhookHelper *mcp.WebhookHelper, globalTokenStore mcp.GlobalTokenStore, gatewayClient *gateway.Client, gptClient *gptscript.GPTScript, baseURL string) *Handler

func (*Handler) Acquire added in v0.11.0

func (h *Handler) Acquire(ctx context.Context, server nmcp.MessageHandler, sessionID string) (*nmcp.ServerSession, bool, error)

func (*Handler) ExtractID

func (*Handler) ExtractID(req *http.Request) string

func (*Handler) LoadAndDelete

func (h *Handler) LoadAndDelete(ctx context.Context, server nmcp.MessageHandler, sessionID string) (*nmcp.ServerSession, bool, error)

func (*Handler) OnMessage

func (h *Handler) OnMessage(ctx context.Context, msg nmcp.Message)

func (*Handler) Release added in v0.11.0

func (*Handler) Release(*nmcp.ServerSession)

func (*Handler) Store

func (h *Handler) Store(ctx context.Context, sessionID string, sess *nmcp.ServerSession) error

func (*Handler) StreamableHTTP

func (h *Handler) StreamableHTTP(req api.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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