Skip to main content
Glama
http.go722 B
package client import ( "fmt" "github.com/mark3labs/mcp-go/client/transport" ) // NewStreamableHttpClient is a convenience method that creates a new streamable-http-based MCP client // with the given base URL. Returns an error if the URL is invalid. func NewStreamableHttpClient(baseURL string, options ...transport.StreamableHTTPCOption) (*Client, error) { trans, err := transport.NewStreamableHTTP(baseURL, options...) if err != nil { return nil, fmt.Errorf("failed to create SSE transport: %w", err) } clientOptions := make([]ClientOption, 0) sessionID := trans.GetSessionId() if sessionID != "" { clientOptions = append(clientOptions, WithSession()) } return NewClient(trans, clientOptions...), 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/mozillazg/kube-audit-mcp'

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