Add optional title field to server.json schema (#608)

## Summary

Introduces a new optional `title` field for MCP servers to provide a
clean, human-readable display name that clients and subregistries can
use for display purposes.

Fixes #606

## Changes

- Added `title` field to `ServerJSON` type (optional, max 100 chars)
- Added validation to reject titles ending with 'MCP Server', 'MCP
server', or 'MCP' suffixes
- Updated JSON schema and OpenAPI specification
- Added comprehensive test coverage for title validation
- Updated all documentation examples to demonstrate the new field

## Validation

The title field:
- Is optional (can be omitted)
- Must not be only whitespace if provided
- Must not end with MCP-related suffixes (case-insensitive)
- Can contain 'MCP' in the middle (e.g., "MCP Weather API" is valid)

Examples:
- ✅ Valid: "GitHub", "Weather API", "Slack Integration"
- ❌ Invalid: "GitHub MCP", "Weather MCP Server", "Slack-MCP"

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
adam jones 2025-10-06 11:57:01 +01:00 • committed by GitHub
commit 44e35020b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 230 additions and 27 deletions

View file

@ -156,6 +156,7 @@ paths:
value:
name: "io.modelcontextprotocol/filesystem"
description: "Node.js server implementing Model Context Protocol (MCP) for filesystem operations."
title: "Filesystem"
repository:
url: "https://github.com/modelcontextprotocol/servers"
source: "github"
@ -177,6 +178,7 @@ paths:
value:
name: "com.example/demo-server"
description: "Example MCP server demonstrating publisher extensions."
title: "Demo Server"
repository:
url: "https://github.com/example/mcp-demo"
source: "github"
@ -267,7 +269,6 @@ components:
description: "Optional relative path from repository root to the server location within a monorepo structure"
example: "src/everything"
ServerList:
type: object
required:
@ -502,6 +503,10 @@ components:
type: string
description: "Human-readable description of the server's functionality"
example: "Node.js server implementing Model Context Protocol (MCP) for filesystem operations."
title:
type: string
description: "Optional human-readable title or display name for the MCP server. MCP subregistries or clients MAY choose to use this for display purposes."
example: "Filesystem"
repository:
$ref: '#/components/schemas/Repository'
version:

View file

@ -25,6 +25,7 @@ The official registry has some more restrictions on top of this. See the [offici
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"name": "io.modelcontextprotocol.anonymous/brave-search",
"description": "MCP server for Brave Search API integration",
"title": "Brave Search",
"websiteUrl": "https://anonymous.modelcontextprotocol.io/examples",
"repository": {
"url": "https://github.com/modelcontextprotocol/servers",
@ -71,6 +72,7 @@ For MCP servers located within a subdirectory of a larger repository (monorepo s
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"name": "io.modelcontextprotocol/everything",
"description": "MCP server that exercises all the features of the MCP protocol",
"title": "Everything",
"repository": {
"url": "https://github.com/modelcontextprotocol/servers",
"source": "github",
@ -153,6 +155,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"name": "io.github.modelcontextprotocol/filesystem",
"description": "Node.js server implementing Model Context Protocol (MCP) for filesystem operations.",
"title": "Filesystem",
"repository": {
"url": "https://github.com/modelcontextprotocol/servers",
"source": "github",
@ -288,6 +291,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"name": "io.github.example/weather-mcp",
"description": "Python MCP server for weather data access",
"title": "Weather",
"repository": {
"url": "https://github.com/example/weather-mcp",
"source": "github",
@ -503,6 +507,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"name": "io.modelcontextprotocol.anonymous/hybrid-mcp",
"description": "MCP server available as both local package and remote service",
"title": "Hybrid",
"repository": {
"url": "https://github.com/example/hybrid-mcp",
"source": "github",
@ -588,6 +593,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"name": "io.modelcontextprotocol/text-editor",
"description": "MCP Bundle server for advanced text editing capabilities",
"title": "Text Editor",
"repository": {
"url": "https://github.com/modelcontextprotocol/text-editor-mcpb",
"source": "github"
@ -632,6 +638,7 @@ Some CLI tools bundle an MCP server, without a standalone MCP package or a publi
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
"name": "io.snyk/cli-mcp",
"description": "MCP server provided by the Snyk CLI",
"title": "Snyk",
"version": "1.1298.0",
"packages": [
{

View file

@ -396,6 +396,13 @@
"minLength": 1,
"maxLength": 100
},
"title": {
"type": "string",
"description": "Optional human-readable title or display name for the MCP server. MCP subregistries or clients MAY choose to use this for display purposes.",
"example": "Weather API",
"minLength": 1,
"maxLength": 100
},
"repository": {
"$ref": "#/definitions/Repository",
"description": "Optional repository metadata for the MCP server source code. Recommended for transparency and security inspection."