mcpserverinfo

package
v0.0.14 Latest Latest
Warning

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

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

Documentation

Overview

Package mcpserverinfo serializes the bounded MCP channel metadata that tunnel-client advertises to the tunnel control plane.

Index

Constants

View Source
const (
	// HeaderName is the protected control-plane header carrying MCP channel
	// capability and process-affinity metadata.
	HeaderName = "X-Tunnel-MCP-Server-Info"

	// MaxChannels bounds the number of channel declarations in one header.
	MaxChannels = 32
	// MaxHeaderBytes bounds the serialized HTTP header value.
	MaxHeaderBytes = 4096
)

Variables

This section is empty.

Functions

func Build added in v0.0.13

func Build(declarations []Declaration) (string, error)

Build serializes the narrowest header version that can represent the declarations. Headers remain v1 unless at least one channel advertises the v2-only stateless capability.

func BuildV1

func BuildV1(declarations []Declaration) (string, error)

BuildV1 serializes the exact v1 header shape after validating that every declaration is canonical, unique, and within the protocol bounds.

Types

type Declaration

type Declaration struct {
	Name            string
	Stateless       bool
	ProcessAffinity bool
}

Declaration is one canonical MCP channel name and its advertised capabilities. Stateless and ProcessAffinity are independent: a channel may accept self-contained requests while still requiring one tunnel-client process for application-local state.

Jump to

Keyboard shortcuts

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