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:
parent
44950c23bb
commit
44e35020b0
1 changed files with 230 additions and 27 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue