Documentation
¶
Overview ¶
Package mcpresolve turns a catalog MCPServer ref (name + tag) into a ResolvedMCP describing the URL and headers (if remote) the caller should wire into local-dev .env. Sits behind a Fetcher interface so init code can drive it from the root registry client while tests inject a fake.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher interface {
Fetch(ctx context.Context, name, tag string) (*v1alpha1.MCPServer, error)
}
Fetcher abstracts the one registry call this package needs: given a catalog ref, return the MCPServer record. The concrete implementation delegates to client.GetTyped with the root registry client.
type ResolvedMCP ¶
ResolvedMCP carries the fields a caller needs to decide whether (and what) to write into .env. For Source-mode records, RemoteURL is empty — callers MUST treat that as "skip the .env write." RemoteHeaders is pre-flattened to a plain map with empty-Value entries dropped, ready to embed in MCP_SERVERS_CONFIG as JSON.