We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/github/github-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
parse.go•451 B
package headers
import "strings"
// ParseCommaSeparated splits a header value by comma, trims whitespace,
// and filters out empty values
func ParseCommaSeparated(value string) []string {
if value == "" {
return []string{}
}
parts := strings.Split(value, ",")
result := make([]string, 0, len(parts))
for _, p := range parts {
trimmed := strings.TrimSpace(p)
if trimmed != "" {
result = append(result, trimmed)
}
}
return result
}