types

package
v0.59.5 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpstreamHash

func UpstreamHash(upstream *UpstreamConfig) string

UpstreamHash generates a unique hash for an upstream configuration. This is used to isolate OAuth sessions per upstream.

Types

type OAuthConfig

type OAuthConfig struct {
	ClientID     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
}

OAuthConfig holds OAuth-specific configuration.

type ProxyConfig

type ProxyConfig struct {
	Upstreams    []UpstreamConfig
	CallbackHost string
	CallbackPort int
	CacheDir     string
}

ProxyConfig holds the complete proxy tool configuration.

func (*ProxyConfig) Validate

func (c *ProxyConfig) Validate() error

Validate checks if the configuration is valid.

type UpstreamConfig

type UpstreamConfig struct {
	Name         string            `json:"name"`
	URL          string            `json:"url"`
	Transport    string            `json:"transport"` // http-first, sse-first, http-only, sse-only
	OAuth        *OAuthConfig      `json:"oauth,omitempty"`
	Headers      map[string]string `json:"headers,omitempty"`
	IgnoreTools  []string          `json:"ignore_tools,omitempty"`
	IncludeTools []string          `json:"include_tools,omitempty"`
}

UpstreamConfig represents configuration for a single upstream MCP server.

Jump to

Keyboard shortcuts

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