mcpserverservice

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package mcpserverservice stores MCP server configs. Add a database, Git host, or internal tool once — chains can call it from that point on.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthCallbackRequest

type OAuthCallbackRequest struct {
	State            string
	Code             string
	Error            string
	ErrorDescription string
}

type OAuthCallbackResult

type OAuthCallbackResult struct {
	RedirectBase string
	ServerName   string
}

type OAuthStartResult

type OAuthStartResult struct {
	AuthorizationURL string
}

type Option

type Option func(*service)

func WithUIBaseURL

func WithUIBaseURL(uiBaseURL string) Option

type Service

type Service interface {
	Create(ctx context.Context, srv *runtimetypes.MCPServer) error
	Get(ctx context.Context, id string) (*runtimetypes.MCPServer, error)
	GetByName(ctx context.Context, name string) (*runtimetypes.MCPServer, error)
	Update(ctx context.Context, srv *runtimetypes.MCPServer) error
	Delete(ctx context.Context, id string) error
	List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.MCPServer, error)
	AuthenticateOAuth(ctx context.Context, name string, oauthCfg *localtools.MCPOAuthConfig) error
	StartOAuth(ctx context.Context, id, redirectBase string) (*OAuthStartResult, error)
	CompleteOAuth(ctx context.Context, req OAuthCallbackRequest) (*OAuthCallbackResult, error)
}

Service exposes CRUD operations for persisted MCP server configurations.

func New

func New(db libdb.DBManager, opts ...Option) Service

New creates a new MCP server service backed by the given database manager.

func WithActivityTracker

func WithActivityTracker(service Service, tracker libtracker.ActivityTracker) Service

WithActivityTracker wraps a Service with activity tracking.

Jump to

Keyboard shortcuts

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