server

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

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

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 DataHub 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

	// Descriptions overrides tool descriptions at the toolkit level.
	Descriptions map[tools.ToolName]string

	// ExtensionsConfig configures optional middleware extensions.
	ExtensionsConfig extensions.Config
}

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