Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MCPProxy ¶
type MCPProxy struct {
// contains filtered or unexported fields
}
MCPProxy serves /mcp endpoint.
This implements [extproc.ConfigReceiver] to gets the up-to-date configuration.
type ProxyConfig ¶
type ProxyConfig struct {
// contains filtered or unexported fields
}
ProxyConfig holds the main MCP proxy configuration.
func NewMCPProxy ¶
func NewMCPProxy(l *slog.Logger, mcpMetrics metrics.MCPMetrics, tracer tracing.MCPTracer, sessionCrypto SessionCrypto) (*ProxyConfig, *http.ServeMux, error)
NewMCPProxy creates a new MCPProxy instance.
func (*ProxyConfig) LoadConfig ¶
LoadConfig implements [extproc.ConfigReceiver.LoadConfig] which will be called when the configuration is updated on the file system.
type SessionCrypto ¶
type SessionCrypto interface {
// Encrypt encrypts the given plaintext string and returns ciphertext.
Encrypt(plaintext string) (string, error)
// Decrypt decrypts the given ciphertext string and returns plaintext bytes.
Decrypt(encrypted string) (string, error)
}
SessionCrypto provides methods to encrypt and decrypt session data.
func DefaultSessionCrypto ¶
func DefaultSessionCrypto(seed, fallbackSeed string) SessionCrypto
DefaultSessionCrypto returns a SessionCrypto implementation using PBKDF2 for key derivation and AES-GCM for encryption.
Click to show internal directories.
Click to hide internal directories.