Skip to main content
Glama

tailscale-mcp-server

by pnocera
config.go•833 B
package config import ( "fmt" "os" ) type Config struct { TailscaleAPIKey string TailscaleTailnet string TailscaleClientID string TailscaleClientSecret string UseOAuth bool } func LoadConfig() (*Config, error) { cfg := &Config{ TailscaleAPIKey: os.Getenv("TAILSCALE_API_KEY"), TailscaleTailnet: os.Getenv("TAILSCALE_TAILNET"), TailscaleClientID: os.Getenv("TAILSCALE_CLIENT_ID"), TailscaleClientSecret: os.Getenv("TAILSCALE_CLIENT_SECRET"), } if cfg.TailscaleTailnet == "" { cfg.TailscaleTailnet = "-" } cfg.UseOAuth = cfg.TailscaleClientID != "" && cfg.TailscaleClientSecret != "" if !cfg.UseOAuth && cfg.TailscaleAPIKey == "" { return nil, fmt.Errorf("either TAILSCALE_API_KEY or both TAILSCALE_CLIENT_ID and TAILSCALE_CLIENT_SECRET must be set") } return cfg, nil }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pnocera/tailscale-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server