api

package
v0.6.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package api provides client functionality for interacting with MCP Registry API endpoints

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetServer retrieves a single server by its reverse-DNS name
	GetServer(ctx context.Context, name string) (*v0.ServerJSON, error)

	// ListServers retrieves all servers with automatic pagination handling
	ListServers(ctx context.Context, opts *ListOptions) ([]*v0.ServerJSON, error)

	// SearchServers searches for servers matching the query string
	// Always returns the latest version of each server
	SearchServers(ctx context.Context, query string) ([]*v0.ServerJSON, error)

	// ValidateEndpoint validates that the endpoint implements the MCP Registry API
	ValidateEndpoint(ctx context.Context) error
}

Client represents an MCP Registry API client

func NewClient

func NewClient(baseURL string, allowPrivateIp bool) (Client, error)

NewClient creates a new MCP Registry API client

type ListOptions

type ListOptions struct {
	// Limit is the maximum number of servers to retrieve per page (default: 100)
	Limit int

	// UpdatedSince filters servers updated after this RFC3339 timestamp
	UpdatedSince string

	// Version filters servers by version (e.g., "latest")
	Version string
}

ListOptions contains options for listing servers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL