server

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package server provides the default MCP server setup for mcp-trino.

Index

Constants

View Source
const Version = "0.1.0"

Version is the MCP server version.

Variables

This section is empty.

Functions

func New

func New(opts Options) (*mcp.Server, *multiserver.Manager, error)

New creates a new MCP server with Trino tools. Returns the MCP server and the connection manager for cleanup. The server starts even if unconfigured - tools will return helpful errors.

Types

type Options

type Options struct {
	// MultiServerConfig is the multi-server configuration.
	// If nil, will be loaded from environment via multiserver.FromEnv().
	MultiServerConfig *multiserver.Config

	// ToolkitConfig is the toolkit configuration.
	ToolkitConfig tools.Config

	// ExtensionsConfig configures middleware, interceptors, and transformers.
	ExtensionsConfig extensions.Config

	// Descriptions provides custom tool descriptions that override defaults.
	// Keys are tool names (e.g., tools.ToolQuery), values are description strings.
	Descriptions map[tools.ToolName]string

	// SemanticProvider is an optional semantic metadata provider.
	// If nil and SEMANTIC_FILE env var is set, a static provider will be created.
	SemanticProvider semantic.Provider

	// SemanticCacheConfig configures caching for the semantic provider.
	// If nil, default caching (5 minute TTL) is applied when a provider is configured.
	SemanticCacheConfig *semantic.CacheConfig
}

Options configures the server.

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns default server options. Note: MultiServerConfig is loaded from environment when nil.

Jump to

Keyboard shortcuts

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