Documentation
¶
Overview ¶
Package mcpapp provides MCP server application modes for coder-k8s.
Index ¶
- Constants
- func NewServer(k8sClient client.Client, clientset kubernetes.Interface) *mcp.Server
- func ReadTokenFile(path string) ([]byte, error)
- func RunHTTP(ctx context.Context, tokenFile string) error
- func RunHTTPWithClients(ctx context.Context, k8sClient client.Client, clientset kubernetes.Interface, ...) error
Constants ¶
const ( // DefaultHTTPAddr is the listen address used by MCP HTTP mode. It is loopback-only on purpose: // the server acts with its ServiceAccount's authority, so it must never listen on the Pod network. DefaultHTTPAddr = "127.0.0.1:8090" // MinTokenLength is the minimum accepted length of the MCP bearer token, in bytes. MinTokenLength = 32 )
Variables ¶
This section is empty.
Functions ¶
func ReadTokenFile ¶ added in v0.1.1
ReadTokenFile reads and validates the MCP bearer token file.
func RunHTTPWithClients ¶
func RunHTTPWithClients(ctx context.Context, k8sClient client.Client, clientset kubernetes.Interface, token []byte) error
RunHTTPWithClients starts the MCP server using streamable HTTP transport and the provided Kubernetes clients.
Types ¶
This section is empty.