Visitar URL original
Allow remote URLs to be shared across server names by rdimitrov · Pull Request #1806 · modelcontextprotocol/registry · GitHub
Skip to content

Allow remote URLs to be shared across server names - #1806

Merged
rdimitrov merged 4 commits into
mainfrom
codex/allow-shared-remote-urls
Nov 6, 2026
Merged

rdimitrov merged 4 commits into
mainfrom
codex/allow-shared-remote-urls

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

A publisher can currently block an endpoint's operator from listing it under their own namespace simply by registering the remote URL first. The registry authenticates namespaces but does not verify remote URL ownership, so registration order cannot establish the canonical publisher.

This change allows different server names to reference the same remote URL on both /v0 and /v0.1. It removes the conflict check from publication, admin metadata edits, single-version restores, and all-version restores. Namespace authorization, URL validation, name/version uniqueness, and per-name version history remain intact. Existing records, response schemas, and database indexes are unchanged; no data migration is needed. The existing remotes_ms log field is retained at zero.

The original uniqueness rule accompanied namespace/hostname matching in #180 and #306; #769 later removed hostname matching.

Downstream compatibility

This changes a previously documented behavioral guarantee, even though the API shape is unchanged. Consumers that use a remote URL as a unique key, or resolve it to a single canonical listing, must support multiple matching server names. Records should be keyed by name/version (and registry when combining sources), with each listing's metadata, headers, and template variables kept separate. A shared endpoint does not establish publisher ownership or endorsement.

The publishing guide and changelog explain this change. Review the compatibility implications and coordinate rollout with downstream consumers. Re-enabling uniqueness after shared URLs have been accepted could block those servers' subsequent publications, edits, and restores. Discovery grouping and endpoint ownership verification are outside this PR.

Validation

Updates the indirect github.com/klauspost/compress dependency from v1.20.1 to v1.20.2 to fix GO-2026-6865, which was reported by CI's vulnerability scan. Local govulncheck ./... and the CI vulnerability scan pass with the update.

  • Added database-backed regressions for independent metadata, version histories, latest-only pagination, encoded listings, admin edits, and single/all-version restores to active or deprecated.
  • Added HTTP publish coverage on both API versions proving shared URLs succeed while unauthorized namespaces, duplicate name/version pairs, and invalid remote URLs still fail.
  • Confirmed the new publication, edit, and active-restore regressions fail against the original service implementation and pass with this change.
  • Passed go test -race -coverprofile=coverage.out -covermode=atomic ./internal/... ./cmd/... using an isolated local PostgreSQL 17 instance.
  • Passed make lint with golangci-lint v2.14.0, make validate build, and git diff --check.
  • CI passed all checks, including make test-all (with Docker/ko integration tests), build/lint/validation, vulnerability scanning, and CodeQL. The Docker/ko integration harness was not run locally.

@rdimitrov
rdimitrov marked this pull request as ready for review November 5, 2026 23:33
@rdimitrov
rdimitrov requested a max review from Copilot November 5, 2026 23:44

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.

🟡 Changes recommended

Remaining findings call for clearer breaking-change labeling and a regression assertion that verifies persisted values rather than echoed request data.

2 open issues
What changed in this PR

Allows different server names to share remote URLs on /v0 and /v0.1, preventing registration order from blocking endpoint operators from publishing their own listings. Namespace authorization and name/version identity remain unchanged.

Changes:

  • Removes URL-conflict checks from publication, admin edits, and restores.
  • Adds regressions for independent listings, version histories, pagination, and retained validation.
  • Documents downstream compatibility and rollout considerations.
File Description
internal/​service/​shared_remote_urls_test.go Tests shared URLs, independent metadata, version histories, edits, and restores.
internal/​service/​registry_service.go Removes conflict checks and retains remotes_ms at zero.
internal/​service/​registry_service_test.go Removes obsolete uniqueness tests and retains basic restore coverage.
internal/​database/​postgres.go Updates a historical performance comment; query behavior is unchanged.
internal/​database/​database.go Clarifies that URL lookups may match multiple names.
internal/​api/​handlers/​v0/​shared_remote_urls_test.go Tests shared-URL publication and retained validation on both API versions.
docs/​reference/​api/​CHANGELOG.md Explains the changed guarantee and downstream compatibility risks.
docs/​modelcontextprotocol-io/​remote-servers.mdx Updates publishing guidance and consumer record-identity recommendations.

Review effort: Max

Comment thread docs/reference/api/CHANGELOG.md Resolved
tadasant
tadasant previously approved these changes Nov 6, 2026
Document breaking changes regarding remote URLs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Update test to verify server edit through GetServerByNameAndVersion.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rdimitrov
rdimitrov merged commit e2397a6 into main Nov 6, 2026
8 checks passed
@rdimitrov
rdimitrov deleted the codex/allow-shared-remote-urls branch November 6, 2026 10:23
dsp-ant added a commit to modelcontextprotocol/modelcontextprotocol that referenced this pull request Nov 12, 2026
<!-- claude-slack-attribution -->
_Requested by **Den Delimarsky, David Soria Parra** · [Slack
thread](https://ant-mcp-oss.slack.com/archives/C0BDGKP4PC6/p1793430342149349)_

Squash-merge with this description as the commit message. The two
trailers on the last lines must stay in it, so that the next subtree
pull starts from this one.

**Before:** `docs/registry/` reflects the registry docs as of 2026-01-22
(registry commit 817e1216), plus six local edits made since. The FAQ
says servers cannot be deleted, the P-384 login command lacks the
`--algorithm` flag, the organization namespace rules are missing, and
the remote servers page says a remote URL can be used by only one server
name.

**After:** `docs/registry/` is byte-identical to
`docs/modelcontextprotocol-io` in modelcontextprotocol/registry at tag
`v1.8.9` (commit ba94f657). Seven pages change (+308/-25):
authentication, faq, github-actions, package-types, quickstart,
registry-aggregators and remote-servers.

## How

`scripts/pull-registry-docs.sh` was run against a clone of the registry,
first at `v1.8.7` and then at `v1.8.9`. The script splits
`docs/modelcontextprotocol-io` and squash-pulls the result into
`docs/registry/`. `npm run prep` passes, link check included.

The `v1.8.9` pull adds two upstream changes. Since `v1.8.8` several
server names can share one remote URL
(modelcontextprotocol/registry#1806), which replaces the sentence at
remote-servers.mdx L41. The aggregators page gains an "Efficient
synchronization" section (modelcontextprotocol/registry#1798).

A later run of the script was tested against a single squash commit that
carries these trailers. It merged cleanly and changed only
`docs/registry/`.

## Conflict resolutions

Three files conflicted in the `v1.8.7` pull. In each case upstream had
added content next to a line that a local commit had also touched, and
upstream already carried the local change, so upstream's side was taken.
The `v1.8.9` pull had no conflicts.

- `github-actions.mdx`: new troubleshooting row for the `"invalid
audience"` error.
- `package-types.mdx`: new paragraph on the `mcp-name:` token boundary,
placed before the Cargo section that both sides carry identically.
- `quickstart.mdx`: the npm account prerequisite reworded to apply to
package-based servers only.

## Local commits since January

All six are carried by upstream, so nothing needs to go upstream.

- 5abdf44 removed `.mdx` suffixes from internal links. Upstream did the
same in modelcontextprotocol/registry#1052, and no suffixed links remain
there.
- 31dae91 pointed the server.json schema link at
`draft/server.schema.json`. Upstream has it from
modelcontextprotocol/registry#884.
- 91dcd51 added the SSE deprecation note to remote-servers. It was
superseded locally by 85bbf0e.
- 85bbf0e set the final SSE deprecation wording. Upstream has the
identical sentence from modelcontextprotocol/registry#1590.
- 0d17c43 changed `PyPi` to `PyPI` in the FAQ. Upstream has it at
faq.mdx L55.
- c0b3579 added the Cargo (Rust) package type section. Upstream has the
identical section from modelcontextprotocol/registry#1207 and
modelcontextprotocol/registry#1331.

## Upstream follow-ups for the registry repo (not fixed here)

1. `authentication.mdx` contradicts itself on stale DNS records. L81
says a stale TXT record left behind "will be tried first and cause
verification to fail". L404 says the registry tries all published keys
and a different key in another record does not take precedence. The code
agrees with L404: `VerifySignatureWithKeys` in
`internal/api/handlers/v0/auth/common.go` accepts the first matching key
and fails only when none match.
2. `quickstart.mdx` L130 and L134 install `mcp-publisher` from
`releases/latest`, while `github-actions.mdx` L14-17 tells readers not
to use that URL. The three workflow examples in `github-actions.mdx`
(L35, L115, L191) pin `MCP_PUBLISHER_VERSION: v1.8.1`, behind the
`v1.8.9` tag.
3. `registry-aggregators.mdx` L78 still says a `"deleted"` status
typically indicates a moderation takedown. Since publisher-managed
deletion (modelcontextprotocol/registry#893) publishers set that status
themselves. `moderation-policy.mdx` also needs attention. Neither
passage has changed upstream.

This PR was drafted with AI assistance (Claude Code).

git-subtree-dir: docs/registry
git-subtree-split: 5d7060497a1d4535dc448dd56ec699ea03c89efd

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Soria Parra <167242713+dsp-ant@users.noreply.github.com>
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.

4 participants