Skip to main content
Glama

Umami MCP Server

MIT License
2
  • Apple
  • Linux
config.go1.08 kB
package main import ( "fmt" "os" "path/filepath" "gopkg.in/yaml.v3" ) type Config struct { UmamiURL string `yaml:"umami_url"` Username string `yaml:"username"` Password string `yaml:"password"` } func LoadConfig() (*Config, error) { config := &Config{} configPath := os.Getenv("UMAMI_MCP_CONFIG") if configPath == "" { exePath, _ := os.Executable() configPath = filepath.Join(filepath.Dir(exePath), "config.yaml") } if data, err := os.ReadFile(configPath); err == nil { if err := yaml.Unmarshal(data, config); err != nil { return nil, fmt.Errorf("invalid config file: %w", err) } } if url := os.Getenv("UMAMI_URL"); url != "" { config.UmamiURL = url } if username := os.Getenv("UMAMI_USERNAME"); username != "" { config.Username = username } if password := os.Getenv("UMAMI_PASSWORD"); password != "" { config.Password = password } if config.UmamiURL == "" || config.Username == "" || config.Password == "" { return nil, fmt.Errorf("missing required configuration: UMAMI_URL, UMAMI_USERNAME, UMAMI_PASSWORD") } return config, 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/Macawls/umami-mcp-server'

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