mcpregistry

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 2 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcpregistry stores MCP server definitions by ID.

It exposes small reader and writer interfaces plus an in-memory map-backed implementation via New. Applications typically inject a Reader into higher-level runtime components such as github.com/baldaworks/runtime/v2/agentfactory.Factory.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapRegistry

type MapRegistry struct {
	// contains filtered or unexported fields
}

MapRegistry is an in-memory MCP registry.

func New

New creates an in-memory MCP registry initialized from initial values.

Example
registry := New(map[string]agentconfig.MCPServerConfig{
	"state": {
		Type: agentconfig.MCPServerTypeHTTP,
		URL:  "http://127.0.0.1:9090/mcp",
	},
})

cfg, ok := registry.Get("state")
fmt.Println(ok)
fmt.Println(cfg.Type)
Output:
true
http

func (*MapRegistry) Delete

func (r *MapRegistry) Delete(id string)

Delete removes the MCP server config for id.

func (*MapRegistry) Get

Get returns the MCP server config for id.

func (*MapRegistry) Set

Set stores or replaces the MCP server config for id.

type Reader

type Reader interface {
	Get(id string) (agentconfig.MCPServerConfig, bool)
}

Reader looks up MCP server configuration by ID.

type Registry

type Registry interface {
	Reader
	Writer
}

Registry combines lookup and mutation of MCP server configs.

type Writer

type Writer interface {
	Set(id string, cfg agentconfig.MCPServerConfig)
	Delete(id string)
}

Writer stores MCP server configuration by ID.

Jump to

Keyboard shortcuts

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