interceptors

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockSecretsMiddleware added in v0.14.0

func BlockSecretsMiddleware() mcp.Middleware

func Callbacks

func Callbacks(logCalls, blockSecrets bool, oauthInterceptorEnabled bool, interceptors []Interceptor) []mcp.Middleware

func GitHubUnauthorizedMiddleware added in v0.20.0

func GitHubUnauthorizedMiddleware() mcp.Middleware

GitHubUnauthorizedMiddleware creates middleware that intercepts 401 unauthorized responses from the GitHub MCP server and returns the OAuth authorization link

func GitHubUnauthorizedMiddlewareWithOAuth added in v0.20.0

func GitHubUnauthorizedMiddlewareWithOAuth(oauthHandler OAuthHandler) mcp.Middleware

GitHubUnauthorizedMiddlewareWithOAuth creates middleware with a configurable OAuth handler for testing

func LogCallsMiddleware added in v0.14.0

func LogCallsMiddleware() mcp.Middleware

func TelemetryMiddleware added in v0.20.0

func TelemetryMiddleware() mcp.Middleware

TelemetryMiddleware tracks list operations and other gateway operations

Types

type Interceptor

type Interceptor struct {
	When     string
	Type     string
	Argument string
}

func Parse

func Parse(specs []string) ([]Interceptor, error)

--interceptor=before:exec:/bin/path --interceptor=after:docker:image --interceptor=around:http:localhost:8080/url

func (*Interceptor) ToMiddleware added in v0.14.0

func (i *Interceptor) ToMiddleware() mcp.Middleware

type OAuthHandler added in v0.20.0

type OAuthHandler func(ctx context.Context) (*mcp.CallToolResult, error)

OAuthHandler defines the interface for handling OAuth flows

Jump to

Keyboard shortcuts

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