Skip to content

Conversation

@KalleBylin
Copy link
Contributor

Adds optional website_url field to the server.json schema allowing publishers to provide a url to the server's homepage, documentation, or project website. This provides a central link for users to learn more about the server. Particularly useful when the server has custom installation instructions or setup requirements.

Issue: #183
PR: #130
Discussion: #274

Motivation and Context

This change addresses the need identified in #130, #183 and #274 for a standardized way to direct users to an official landing page similar to homepage used in NPM (example). It is also serves as a viable option for MCP Servers that don't follow typical package manager patterns (e.g., embedded in a Desktop app).

How Has This Been Tested?

  • Schema validation: All 13 example server.json files validate successfully against the updated schema
  • Go validator tests: Added additional test cases covering URL format validation and namespace matching
  • Run all checks: Updated example files to work with anonymous publishing and verified make check passes

Breaking Changes

None. The website_url field is optional and backward compatible with existing server.json files.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Security considerations:

  • Website URL validation enforces that the domain matches the publisher's reverse-DNS namespace
  • HTTP/HTTPS protocols are required (no file:// or other schemes)
  • Validation is consistent with existing remote URL validation patterns

@KalleBylin KalleBylin changed the title Add website_url field for MCP servers feat: Add website_url field for MCP servers Sep 10, 2025
@domdomegg
Copy link
Member

Small point of uncertainty is whether we should use snake_case or camelCase. Snake would fit better with the rest of sever.json, camelCase would fit better with MCP spec.

I think I probably lean towards snake case for fitting with server.json (possibly we should have used camelCase here instead generally...) but holding off merging this for a little bit until maybe some others weigh in (@tadasant @rdimitrov maybe?)

}

// Validate reverse-DNS namespace matching for website URL
if err := validateWebsiteURLNamespaceMatch(*serverJSON); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Think it's reasonable to start with this validation, and then we can consider removing it in future if people find it annoying 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, my thought exactly. Feels easier to relax this restriction rather than enforcing it afterwards 😅

@rdimitrov
Copy link
Member

Small point of uncertainty is whether we should use snake_case or camelCase. Snake would fit better with the rest of sever.json, camelCase would fit better with MCP spec.

I think I probably lean towards snake case for fitting with server.json (possibly we should have used camelCase here instead generally...) but holding off merging this for a little bit until maybe some others weigh in (@tadasant @rdimitrov maybe?)

If we want to consider doing it I think there's literally no better time than now to make the switch to camelCase 😃 If not, I agree that it should remain aligned with what the rest of the server.json follows 👍

@tadasant
Copy link
Member

Good thing we are in Preview 😅

I think this is fine to merge as website_url. We are already inconsistent in other places (see maxLength). Issue to track separately (and agree we should action ASAP 🙁 ): #428

@domdomegg domdomegg merged commit 17eb56d into modelcontextprotocol:main Sep 11, 2025
2 checks passed
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