From 97f3c4b2a02a7aae99f1b1d477fc3639bb5d3a39 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Tue, 7 Jul 2026 14:34:44 +0300 Subject: [PATCH] refactor(registry/types): swap mcp-go import for mcpcompat shim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stop registry/types from importing github.com/mark3labs/mcp-go/mcp directly. Switch both publisher_provided_types.go and registry_types.go to import the mcpcompat/mcp shim (aliased as `mcp`), whose Tool type is a type alias for mcpgo.Tool — identical type, wire-compatible, source-compatible. Zero call-site changes. This was the last non-shim import of mcp-go in the module; the only remaining reference is the intentional chokepoint in mcpcompat/mcp/alias.go. Unblocks stacklok/toolhive#5729 from carrying mcp-go as a transitive indirect dep. --- registry/types/publisher_provided_types.go | 3 +-- registry/types/registry_types.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/registry/types/publisher_provided_types.go b/registry/types/publisher_provided_types.go index 7c02ad3..c935689 100644 --- a/registry/types/publisher_provided_types.go +++ b/registry/types/publisher_provided_types.go @@ -4,8 +4,7 @@ package registry import ( - "github.com/mark3labs/mcp-go/mcp" - + mcp "github.com/stacklok/toolhive-core/mcpcompat/mcp" "github.com/stacklok/toolhive-core/permissions" ) diff --git a/registry/types/registry_types.go b/registry/types/registry_types.go index 2819104..5ca50ae 100644 --- a/registry/types/registry_types.go +++ b/registry/types/registry_types.go @@ -8,9 +8,9 @@ import ( "slices" "time" - "github.com/mark3labs/mcp-go/mcp" "gopkg.in/yaml.v3" + mcp "github.com/stacklok/toolhive-core/mcpcompat/mcp" "github.com/stacklok/toolhive-core/permissions" )