Skip to content

fix(go)!: migrate to the v2 module path - #3445

Merged
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums-fix-go-module-v2-path
Oct 7, 2026
Merged

SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums-fix-go-module-v2-path

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

Migrate the root Go module and all internal imports to github.com/github/github-mcp-server/v2, making v2 consumable under Go's semantic import versioning rules. No major-version subdirectory or v1 compatibility shim is needed.

Why

The existing v2.0.0 release at cb290407e20d9cc4a7c338179f4a30287f4e5040 declares module github.com/github/github-mcp-server. Go rejects the unsuffixed path at v2 and rejects the suffixed path because the declaration does not match. This blocks github/github-mcp-server-remote#1032 from pinning a usable v2 release.

No linked issue.

Release follow-up: merge this PR, then cut a new tag such as v2.0.1 from a commit containing this correction. The existing v2.0.0 tag remains invalid for Go consumers; do not move it. Downstream consumers must change imports and their module requirement to /v2, then pin the new release. No tags or releases were created by this PR.

What changed

  • Update go.mod, all internal Go imports (including tests, e2e, and generators), Docker and GoReleaser OAuth -X linker symbols.
  • Update module installation/build documentation and Go Report Card links; regenerate license attribution, including its /v2 directory.
  • Audit scripts, workflows, registry server.json, and repository links: relative build commands, OCI identifiers, and GitHub repository URLs correctly remain unchanged.
  • Organization search found old-path Go module declarations in the remote server and internal/advisory forks. No other repository was edited. Copilot API's match is a remote-server URL in a comment, not a Go import.

MCP impact

  • No tool or API changes
    MCP tool schemas and behavior are unchanged. Go consumers must migrate their import prefix to /v2.
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

  • N/A: no tool changes.

Security / limits

  • No security or limits impact
    Module-path migration only; auth behavior and limits are unchanged.
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint — passed, zero issues.
  • Tested locally with ./script/test — running after publication at the user's request; results will be updated here.

Validation evidence:

  • go mod tidy — passed using the default proxy; no dependency-version changes.
  • go build ./... — passed.
  • go vet ./... — passed.
  • go test ./cmd/github-mcp-server ./pkg/github -run 'Test(NewMCPServer|NewServer_NameAndTitle|ResolveEnabledToolsets|GitHubAppFlagsAreStdioOnly|AuthorizationServerConfigurationIsHTTPOnly)' — passed in both packages.
  • script/generate-docs — passed, no generated changes beyond the intentional README edits.
  • script/licenses — passed; regenerated reports and moved self-license attribution to /v2.
  • script/licenses-check — queued after the full race suite; results will be updated here.
  • External scratch module, without replace: go list -m -json github.com/github/github-mcp-server/v2@a738041490f5877c22e2a52b4dcb0425488b07c4 — default proxy returned 401; retry with GOPROXY=direct passed and resolved v2.0.1-0.20261007080633-a738041490f5.
  • External scratch module: GOPROXY=direct go get github.com/github/github-mcp-server/v2@a738041490f5877c22e2a52b4dcb0425488b07c4, go mod tidy, and go build ./... — passed, importing public packages pkg/github and pkg/http from the published branch commit.

Docs

  • Not needed
  • Updated (README / docs / examples)
    Documented /v2 imports and the required new release; corrected mcpcurl installation, OAuth linker examples, and e2e output.

Migrate internal imports, build linker symbols, installation docs, and generated license attribution to the /v2 module path.

BREAKING CHANGE: Go consumers must import github.com/github/github-mcp-server/v2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:08
@SamMorrowDrums
SamMorrowDrums requested a review from a team as a code owner October 7, 2026 08:08
@SamMorrowDrums
SamMorrowDrums merged commit 55edd58 into main Oct 7, 2026
21 checks passed
@SamMorrowDrums
SamMorrowDrums deleted the sammorrowdrums-fix-go-module-v2-path branch October 7, 2026 08:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The repository-wide breaking module migration spans over 200 files, the full race suite remains pending, and one release-status documentation issue remains.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Migrates the repository to Go’s required /v2 semantic import path while preserving runtime behavior.

Changes:

  • Updates the module declaration and repository-wide imports.
  • Updates linker symbols, build documentation, and examples.
  • Regenerates license attribution for the /v2 module.
File Description
.goreleaser.yaml Updates linker symbols.
Dockerfile Updates linker symbols.
README.md Documents /v2 usage and release migration.
go.mod Declares the /v2 module path.
third-party-licenses.darwin.md Updates module attribution.
third-party-licenses.linux.md Updates module attribution.
third-party-licenses.windows.md Updates module attribution.
third-party/​github.com/​github/​github-mcp-server/​v2/​LICENSE Adds relocated license attribution.
cmd/​github-mcp-server/​feature_flag_docs.go Updates internal imports.
cmd/​github-mcp-server/​generate_docs.go Updates internal imports.
cmd/​github-mcp-server/​list_scopes.go Updates internal imports.
cmd/​github-mcp-server/​main.go Updates internal imports.
cmd/​github-mcp-server/​main_test.go Updates test imports.
cmd/​mcpcurl/​README.md Updates installation path.
internal/​buildinfo/​buildinfo.go Updates linker example.
internal/​ghmcp/​oauth.go Updates internal imports.
internal/​ghmcp/​oauth_test.go Updates test imports.
internal/​ghmcp/​oauth_typed_test.go Updates test imports.
internal/​ghmcp/​server.go Updates internal imports.
internal/​ghmcp/​server_test.go Updates test imports.
e2e/​README.md Updates expected package output.
e2e/​e2e_test.go Updates test imports.
docs/​oauth-login.md Updates linker examples.
script/​print-mcp-diff-configs/​main.go Updates internal imports.
pkg/​context/​token.go Updates internal import.
pkg/​errors/​error.go Updates internal imports.
pkg/​github/​actions.go Updates internal imports.
pkg/​github/​actions_test.go Updates test imports.
pkg/​github/​actions_types.go Updates internal import.
pkg/​github/​code_quality.go Updates internal imports.
pkg/​github/​code_quality_test.go Updates test import.
pkg/​github/​code_scanning.go Updates internal imports.
pkg/​github/​code_scanning_test.go Updates test import.
pkg/​github/​comment_minimize.go Updates internal imports.
pkg/​github/​comment_minimize_test.go Updates test imports.
pkg/​github/​consolidated_pull_request_types.go Updates internal import.
pkg/​github/​context_tools.go Updates internal imports.
pkg/​github/​context_tools_test.go Updates test imports.
pkg/​github/​copilot.go Updates internal imports.
pkg/​github/​copilot_test.go Updates test imports.
pkg/​github/​csv_output.go Updates internal imports.
pkg/​github/​csv_output_test.go Updates test import.
pkg/​github/​custom_properties.go Updates internal imports.
pkg/​github/​custom_properties_test.go Updates test imports.
pkg/​github/​dependabot.go Updates internal imports.
pkg/​github/​dependabot_test.go Updates test import.
pkg/​github/​dependencies.go Updates internal imports.
pkg/​github/​dependencies_test.go Updates test imports.
pkg/​github/​discussion_notification_contracts_test.go Updates test imports.
pkg/​github/​discussion_notification_inputs.go Updates internal import.
pkg/​github/​discussions.go Updates internal imports.
pkg/​github/​discussions_test.go Updates test imports.
pkg/​github/​encoded_schemas_test.go Updates test imports.
pkg/​github/​feature_flags.go Updates internal import.
pkg/​github/​feature_flags_benchmark_test.go Updates test imports.
pkg/​github/​feature_flags_test.go Updates test imports.
pkg/​github/​fields_filtering_test.go Updates test imports.
pkg/​github/​fields_telemetry_test.go Updates test imports.
pkg/​github/​find_duplicate.go Updates internal imports.
pkg/​github/​find_duplicate_test.go Updates test imports.
pkg/​github/​gists.go Updates internal imports.
pkg/​github/​gists_test.go Updates test imports.
pkg/​github/​git.go Updates internal imports.
pkg/​github/​git_gist_types.go Updates internal import.
pkg/​github/​git_test.go Updates test imports.
pkg/​github/​granular_issue_types.go Updates internal imports.
pkg/​github/​granular_pull_request_types.go Updates internal import.
pkg/​github/​granular_tools_test.go Updates test imports.
pkg/​github/​header_params_test.go Updates test import.
pkg/​github/​ifc_labels.go Updates internal import.
pkg/​github/​inventory.go Updates internal imports.
pkg/​github/​issue_dependencies.go Updates internal imports.
pkg/​github/​issue_dependencies_test.go Updates test imports.
pkg/​github/​issue_fields.go Updates internal imports.
pkg/​github/​issue_fields_test.go Updates test imports.
pkg/​github/​issue_tool_types.go Updates internal import.
pkg/​github/​issues.go Updates internal imports.
pkg/​github/​issues_delete_test.go Updates test import.
pkg/​github/​issues_granular.go Updates internal imports.
pkg/​github/​issues_test.go Updates test imports.
pkg/​github/​labels.go Updates internal imports.
pkg/​github/​labels_test.go Updates test imports.
pkg/​github/​lockdown.go Updates internal imports.
pkg/​github/​minimal_types.go Updates internal import.
pkg/​github/​notification_output_fidelity_test.go Updates test imports.
pkg/​github/​notifications.go Updates internal imports.
pkg/​github/​notifications_test.go Updates test imports.
pkg/​github/​projects.go Updates internal imports.
pkg/​github/​projects_batch.go Updates internal imports.
pkg/​github/​projects_batch_test.go Updates test imports.
pkg/​github/​projects_resolver.go Updates internal imports.
pkg/​github/​projects_resolver_test.go Updates test imports.
pkg/​github/​projects_test.go Updates test imports.
pkg/​github/​projects_types.go Updates internal import.
pkg/​github/​projects_v2_test.go Updates test imports.
pkg/​github/​prompts.go Updates internal imports.
pkg/​github/​public_repo_scopes_test.go Updates test imports.
pkg/​github/​pullrequests.go Updates internal imports.
pkg/​github/​pullrequests_granular.go Updates internal imports.
pkg/​github/​pullrequests_sha_pinning_test.go Updates test import.
pkg/​github/​pullrequests_test.go Updates test imports.
pkg/​github/​repositories.go Updates internal imports.
pkg/​github/​repositories_helper.go Updates internal imports.
pkg/​github/​repositories_test.go Updates test imports.
pkg/​github/​repository_path.go Updates internal import.
pkg/​github/​repository_path_test.go Updates test imports.
pkg/​github/​repository_resource.go Updates internal imports.
pkg/​github/​repository_resource_test.go Updates test import.
pkg/​github/​repository_tool_types.go Updates internal import.
pkg/​github/​resources.go Updates internal imports.
pkg/​github/​rulesets.go Updates internal imports.
pkg/​github/​rulesets_test.go Updates test imports.
pkg/​github/​scope_filter.go Updates internal import.
pkg/​github/​scope_filter_test.go Updates test imports.
pkg/​github/​search.go Updates internal imports.
pkg/​github/​search_semantic_test.go Updates test imports.
pkg/​github/​search_test.go Updates test imports.
pkg/​github/​search_utils.go Updates internal imports.
pkg/​github/​secret_scanning.go Updates internal imports.
pkg/​github/​secret_scanning_test.go Updates test import.
pkg/​github/​security_advisories.go Updates internal imports.
pkg/​github/​security_advisories_test.go Updates test import.
pkg/​github/​security_outputs.go Updates internal import.
pkg/​github/​server.go Updates internal imports.
pkg/​github/​server_test.go Updates test imports.
pkg/​github/​tool_scopes.go Updates internal imports.
pkg/​github/​tool_scopes_test.go Updates test imports.
pkg/​github/​tools.go Updates internal imports.
pkg/​github/​tools_static_validation_test.go Updates test import.
pkg/​github/​tools_validation_test.go Updates test import.
pkg/​github/​toolset_icons_test.go Updates test import.
pkg/​github/​toolset_instructions.go Updates internal import.
pkg/​github/​typed_account_repository_search_test.go Updates test imports.
pkg/​github/​typed_actions_outputs_test.go Updates test imports.
pkg/​github/​typed_compatibility_test.go Updates test imports.
pkg/​github/​typed_consolidated_issue_enrichment_test.go Updates test imports.
pkg/​github/​typed_consolidated_issue_outputs_test.go Updates test imports.
pkg/​github/​typed_consolidated_pull_request_outputs_test.go Updates test imports.
pkg/​github/​typed_copilot_ui_outputs.go Updates internal import.
pkg/​github/​typed_copilot_ui_outputs_test.go Updates test imports.
pkg/​github/​typed_discussion_notification_outputs_test.go Updates test imports.
pkg/​github/​typed_git_gist_outputs_test.go Updates test imports.
pkg/​github/​typed_governance_outputs.go Updates internal import.
pkg/​github/​typed_governance_outputs_test.go Updates test imports.
pkg/​github/​typed_granular_issue_outputs_test.go Updates test imports.
pkg/​github/​typed_granular_pull_request_outputs_test.go Updates test imports.
pkg/​github/​typed_issue_outputs_test.go Updates test imports.
pkg/​github/​typed_projects_outputs_test.go Updates test imports.
pkg/​github/​typed_read_normalizers.go Updates internal import.
pkg/​github/​typed_repository_commit_outputs_test.go Updates test imports.
pkg/​github/​typed_repository_outputs_test.go Updates test imports.
pkg/​github/​typed_search_outputs_test.go Updates test imports.
pkg/​github/​typed_security_compatibility_test.go Updates test imports.
pkg/​github/​typed_security_outputs_test.go Updates test imports.
pkg/​github/​ui_capability.go Updates internal import.
pkg/​github/​ui_capability_test.go Updates test imports.
pkg/​github/​ui_resources_test.go Updates test import.
pkg/​github/​ui_tools.go Updates internal imports.
pkg/​github/​ui_tools_test.go Updates test imports.
pkg/​github/​workflow_prompts.go Updates internal imports.
pkg/​http/​handler.go Updates internal imports.
pkg/​http/​handler_test.go Updates test imports.
pkg/​http/​middleware/​cors.go Updates internal import.
pkg/​http/​middleware/​cors_test.go Updates test import.
pkg/​http/​middleware/​mcp_parse.go Updates internal imports.
pkg/​http/​middleware/​mcp_parse_test.go Updates test import.
pkg/​http/​middleware/​pat_scope.go Updates internal imports.
pkg/​http/​middleware/​pat_scope_test.go Updates test imports.
pkg/​http/​middleware/​request_config.go Updates internal imports.
pkg/​http/​middleware/​request_config_test.go Updates test imports.
pkg/​http/​middleware/​scope_challenge.go Updates internal imports.
pkg/​http/​middleware/​scope_challenge_test.go Updates test imports.
pkg/​http/​middleware/​token.go Updates internal imports.
pkg/​http/​middleware/​token_test.go Updates test imports.
pkg/​http/​oauth/​oauth.go Updates internal imports.
pkg/​http/​oauth/​oauth_test.go Updates test imports.
pkg/​http/​server.go Updates internal imports.
pkg/​http/​server_test.go Updates test imports.
pkg/​http/​servercard/​handler.go Updates internal import.
pkg/​http/​servercard/​handler_test.go Updates test import.
pkg/​http/​transport/​bearer.go Updates internal imports.
pkg/​http/​transport/​bearer_test.go Updates test imports.
pkg/​http/​transport/​etag.go Updates internal import.
pkg/​http/​transport/​etag_test.go Updates test import.
pkg/​http/​transport/​graphql_features.go Updates imports and usage example.
pkg/​http/​transport/​graphql_features_test.go Updates test imports.
pkg/​http/​transport/​user_agent.go Updates internal import.
pkg/​inventory/​registry.go Updates internal import.
pkg/​inventory/​registry_test.go Updates test import.
pkg/​inventory/​server_tool.go Updates internal import.
pkg/​inventory/​tool_availability.go Updates internal import.
pkg/​inventory/​tool_availability_test.go Updates test import.
pkg/​inventory/​typed_output.go Updates internal import.
pkg/​inventory/​typed_output_test.go Updates test import.
pkg/​lockdown/​lockdown_test.go Updates test import.
pkg/​observability/​observability.go Updates internal import.
pkg/​observability/​observability_test.go Updates test import.
pkg/​scopes/​fetcher.go Updates internal imports.
pkg/​scopes/​map.go Updates internal import.
pkg/​scopes/​map_test.go Updates test import.
pkg/​scopes/​scopes.go Updates internal import.
pkg/​toolvalidation/​readonlyhint_test.go Updates test import.
pkg/​utils/​token.go Updates internal imports.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md
Comment on lines +24 to +27
The existing `v2.0.0` tag predates this module-path correction and cannot be used
as a Go module. After this change is merged, a new release such as `v2.0.1` must
be tagged from a commit containing the corrected module path. Until then,
consumers can use a pseudo-version from a commit containing this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants