Skip to content

mcp-trino-v1.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Apr 08:07
· 1 commit to main since this release
Immutable release. Only release title and notes can be modified.
d808841

mcp-trino v1.2.0 — Dynamic Connection Management

v1.2.0 adds runtime connection management to multiserver.Manager, enabling downstream projects to add and remove Trino connections without restarting the server. This release also removes the premature deprecation subsystem and resolves all outstanding lint issues.


New Features

Dynamic Connection Management

The multiserver.Manager now supports adding and removing Trino connections at runtime:

import "github.com/txn2/mcp-trino/pkg/multiserver"

mgr, _ := multiserver.NewManagerFromEnv()
toolkit := tools.NewToolkitWithManager(mgr, tools.DefaultConfig())

// Add a connection at runtime
mgr.AddConnection("analytics", multiserver.ConnectionConfig{
    Host:    "analytics.trino.example.com",
    Catalog: "iceberg",
})

// Remove a connection (closes any cached client)
mgr.RemoveConnection("analytics")

AddConnection(name string, conn ConnectionConfig) error

  • Adds or replaces a named connection configuration
  • Closes any cached client so a fresh connection is created on next access
  • Returns error if name is empty or matches the default connection

RemoveConnection(name string) error

  • Removes a connection and closes its cached client
  • Returns error if the connection doesn't exist or is the default

Both methods are fully thread-safe. All read-path methods (Connections, ConnectionInfos, ConnectionCount, HasConnection, Config) now also hold RLock for safe concurrent use with mutations.


Breaking Changes

Deprecation subsystem removed

The following types, fields, and functions have been removed:

Removed Package
Deprecation struct pkg/semantic
TableContext.Deprecation field pkg/semantic
SearchFilter.IncludeDeprecated field pkg/semantic
formatDeprecation() pkg/tools
matchesDeprecation() pkg/semantic/providers/static
mapDeprecation() pkg/semantic/providers/datahub
deprecationData struct pkg/semantic/providers/datahub
TableEntry.Deprecated, .DeprecationNote, .ReplacedBy fields pkg/semantic/providers/static

Migration: Remove any references to these types from your code. If you were setting IncludeDeprecated: true on SearchFilter, remove that field — all tables are now always included.

The deprecation field has also been removed from the DataHub GraphQL query and from static YAML file parsing. YAML files with deprecated, deprecation_note, or replaced_by fields will still parse without error (unknown fields are ignored), but the values will have no effect.


Fixes

  • Lint: Fixed gosec G706 false positives in server.go (operator-controlled env var in log format string)
  • Lint: Replaced WriteString(fmt.Sprintf(...)) with fmt.Fprintf(...) across schema.go (staticcheck QF1012)
  • CI: Bumped golangci-lint from v2.1.6 to v2.11.4 for Go 1.25 compatibility

Dependency Updates

  • github.com/modelcontextprotocol/go-sdk bumped (2 updates)
  • GitHub Actions group bumped (3 updates, 9 actions total)

Documentation

  • Added "Dynamic Connections" section to multi-server docs
  • Updated library quickstart with correct multiserver.Manager API
  • Removed all deprecation references from README, semantic docs, and tool docs

Full Changelog: v1.1.0...v1.2.0