Defines data structures and validation logic for managing MCP (Model Context Protocol) tunnels. Use this to handle secure tunnel manifests and URL filtering in platform integrations.
// Source: https://github.com/obot-platform/obot | License: MIT | Copyright 2026 Obot AI, Inc
// Provided via justclaw.it.com; keep this notice with the code.
package types
import (
"fmt"
"net/url"
"strings"
)
// MCPTunnel is an admin-managed tunnel configuration.
//
// Token contains the complete bearer token only when the tunnel is created or
// its token is rotated. Other responses contain a non-secret preview.
type MCPTunnel struct {
Metadata
Manifest MCPTunnelManifest `json:"manifest"`
Token string `json:"token"`
}
type MCPTunnelManifest struct {
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
AllowedURLs []string `json:"allowedURLs,omitempty"`
}
type MCPTunnelList List[MCPTunnel]
// Validate checks the user-man
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key