mcpserverservice

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 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 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