Skip to content

Support for Go modules (go install) as a package type #1307

Description

@P4ST4S

Is your feature request related to a problem? Please describe.
I'm trying to publish io.github.P4ST4S/mcp-audit, a Go MCP proxy server installable via go install github.com/P4ST4S/mcp-audit/cmd/mcp-audit@latest. The registry currently returns "unsupported registry type: go", making it impossible to publish Go-based MCP servers.

Describe the solution you'd like
Add support for "registryType": "go" in server.json, using the Go module proxy (proxy.golang.org) as the package source. Ownership verification could check that the module path matches the repository URL in server.json, since Go modules are naturally scoped to their VCS host.

Describe alternatives you've considered
Publishing as OCI/Docker adds unnecessary complexity for a CLI tool distributed via go install. Wrapping in an npm package is not idiomatic for Go projects.

Additional context
Reference server: https://github.com/P4ST4S/mcp-audit Go module: github.com/P4ST4S/mcp-audit
Installable today via: go install github.com/P4ST4S/mcp-audit/cmd/mcp-audit@latest

Go is increasingly used for MCP infrastructure tooling (proxies, gateways, audit layers) due to its performance characteristics. Native Go module support would meaningfully expand the registry's coverage of this category.

Activity

  1. koriyoshi2041 commented on May 29, 2026

    @koriyoshi2041

    I'd like to take this one — go would round out the package types nicely, given how many MCP servers ship as a single go install-able binary.

    Reading through how the existing types are wired: ValidatePackage in internal/validators/package.go switches on RegistryType and dispatches to the per-registry validators under internal/validators/registries/. Existence + ownership for npm/pypi/etc. works by fetching the published package metadata and checking it carries the server name (npm's mcpName matching serverName).

    Go is a bit different: modules don't carry an arbitrary metadata field we could stuff the server name into — there's no mcpName equivalent in go.mod — so the npm-style "package declares its MCP name" check doesn't map directly.

    What does map cleanly is that a Go module path is its source location. For a server published under the io.github.<owner>/... namespace with a module path of github.com/<owner>/<repo>/..., the publisher already authenticated for that GitHub namespace and the module is rooted at the same repo, so matching the owner segment proves ownership without needing anything extra inside the module. Existence/version can be confirmed against the module proxy (https://proxy.golang.org/<case-encoded-module>/@v/list and /@latest).

    Does that ownership model sound acceptable, or would you prefer an explicit marker (sentinel file / go.mod directive) so non-GitHub module paths can be supported too? Happy to implement once the approach is settled — looks like a new model.RegistryTypeGo, a case in the switch, and a registries/go.go validator + tests mirroring the existing ones.

  2. P4ST4S commented on May 29, 2026

    @P4ST4S
    Author
  3. koriyoshi2041 commented on May 30, 2026

    @koriyoshi2041

    Opened #1321 implementing this. It follows the v1 shape we discussed: GitHub-namespace ownership (io.github.<owner> ⇒ module rooted at github.com/<owner>/..., owner compared case-insensitively), existence verified via proxy.golang.org, non-GitHub paths left as a follow-up. identifier is the module path. Happy to iterate on edge cases — and if you want to be the first publisher once it lands, github.com/P4ST4S/mcp-audit should validate cleanly.

  4. added a commit that references this issue on May 30, 2026
    f6fa124
  5. lsequeiraa commented on Jun 2, 2026

    @lsequeiraa

    +1, hit the same wall publishing io.github.lsequeiraa/mcp-sidecar, a Go MCP server whose canonical install is go install github.com/lsequeiraa/mcp-sidecar@latest.

    Since "wrap it in npm" comes up as the suggested workaround, a concrete data point on what that actually costs:

    • Wrapper package (mcp-sidecar) with a bin.js that resolves the platform binary via require.resolve.
    • Five platform packages (@mcp-sidecar/{darwin-arm64,darwin-x64,linux-arm64,linux-x64,win32-x64}) listed as optionalDependencies so npm picks the right one per host.
    • GoReleaser for the Go binaries, plus a CI step that cross-compiles a second time for npm, version-bumps every sub-package, and npm publishes six packages per release.
    • "registryType": "npm" in server.json, even though the artifact is a Go binary.

    It works (same pattern esbuild/swc/biome use), but it's a lot of mechanism for a tool whose canonical install is one go install command. Native registryType: "go" would collapse that to publishing the module and writing the server.json.

    #1321 looks like the right shape: ownership anchored in the GitHub namespace the publisher already authenticates for, existence via proxy.golang.org. Would be great to see it land.

  6. added 2 commits that reference this issue on Jun 3, 2026
    13a0e7c
    b42b684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions