Big docs tidy up in preparation for launch (#364)
## Motivation and Context Docs currently don't have very clear organisation, and don't explain core flows. This fixes #89 (although we still might want to push these to `https://modelcontextprotocol.io/docs/`), based on the plan there. One minor change from that plan is that I merged tutorials and guides, because they ended up basically being duplicates which I thought would be annoying for us to keep in sync. Additionally in the Diátaxis framework, tutorials and guides are separated by whether they are focused on acquisition of skills (e.g. in a learning environment) or application of skills (e.g. in a work environment). I expect the registry to be something that will be used occasionally in a work environment, rather than a fundamental 'learnable' skill so I think it's reasonable not to have tutorials and fold these into guides. ## How Has This Been Tested? - Read through all these updated docs - Unit and integration tests (that previously used examples.md and use the schema) working - Ran `npx markdown-link-check .` to check all the links work ## Breaking Changes Links to old docs will break, but I don't think there are any. All internal links have been checked and updated. ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] 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) - [x] Documentation update
This commit is contained in:
parent
e9884c1d7b
commit
2e7108d366
9 changed files with 1200 additions and 376 deletions
21
docs/reference/README.md
Normal file
21
docs/reference/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Reference Documentation
|
||||
|
||||
Technical specifications and quick lookups for the MCP Registry.
|
||||
|
||||
## API Reference
|
||||
|
||||
- [Generic Registry API](./api/generic-registry-api.md)
|
||||
- [Official Registry API](./api/official-registry-api.md)
|
||||
|
||||
## server.json Reference
|
||||
|
||||
- [Generic server.json Format](./server-json/generic-server-json.md)
|
||||
- [Official Registry Requirements](./server-json/official-registry-requirements.md)
|
||||
|
||||
## CLI Reference
|
||||
|
||||
- [Commands](./cli/commands.md)
|
||||
|
||||
## Quick Reference
|
||||
|
||||
- [FAQ](./faq.md)
|
||||
54
docs/reference/api/generic-registry-api.md
Normal file
54
docs/reference/api/generic-registry-api.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Generic Registry API Specification
|
||||
|
||||
A standardized RESTful HTTP API for MCP registries to provide consistent endpoints for discovering and retrieving MCP servers.
|
||||
|
||||
Also see:
|
||||
- For guidance consuming the API, see the [consuming guide](../../guides/consuming/use-rest-api.md).
|
||||
|
||||
## Browse the Complete API Specification
|
||||
|
||||
**📋 View the full API specification interactively**: Open [openapi.yaml](./openapi.yaml) in an OpenAPI viewer like [Stoplight Elements](https://elements-demo.stoplight.io/?spec=https://raw.githubusercontent.com/modelcontextprotocol/registry/refs/heads/main/docs/reference/api/openapi.yaml).
|
||||
|
||||
The official registry has some more endpoints and restrictions on top of this. See the [official registry API spec](./official-registry-api.md) for details.
|
||||
|
||||
## Quick Reference
|
||||
|
||||
### Core Endpoints
|
||||
- **`GET /v0/servers`** - List all servers with pagination
|
||||
- **`GET /v0/servers/{id}`** - Get detailed server information by ID
|
||||
- **`POST /v0/publish`** - Publish new server (optional, registry-specific authentication)
|
||||
|
||||
### Authentication
|
||||
- **Read operations**: No authentication required
|
||||
- **Write operations**: Registry-specific authentication (if supported)
|
||||
|
||||
### Content Type
|
||||
All requests and responses use `application/json`
|
||||
|
||||
### Basic Example: List Servers
|
||||
|
||||
```bash
|
||||
curl https://registry.example.com/v0/servers?limit=10
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"servers": [
|
||||
{
|
||||
"name": "io.modelcontextprotocol/filesystem",
|
||||
"description": "Filesystem operations server",
|
||||
"status": "active",
|
||||
"version_detail": {
|
||||
"version": "1.0.2",
|
||||
"is_latest": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"count": 10,
|
||||
"next_cursor": "eyJ..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For complete endpoint documentation, view the OpenAPI specification in a schema viewer.
|
||||
48
docs/reference/api/official-registry-api.md
Normal file
48
docs/reference/api/official-registry-api.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Official MCP Registry API
|
||||
|
||||
This document describes the API for the official MCP Registry hosted at `registry.modelcontextprotocol.io`.
|
||||
|
||||
This API is based on the [generic registry API](./generic-registry-api.md) with additional endpoints and authentication. For practical examples of consuming the API, see the [API usage guide](../../guides/consuming/use-rest-api.md). For publishing servers using the API, see the [publishing guide](../../guides/publishing/publish-server.md).
|
||||
|
||||
## Base URLs
|
||||
|
||||
- **Production**: `https://registry.modelcontextprotocol.io`
|
||||
- **Staging**: `https://staging.registry.modelcontextprotocol.io`
|
||||
|
||||
## Interactive Documentation
|
||||
|
||||
- **[Live API Docs](https://registry.modelcontextprotocol.io/docs)** - Stoplight elements with try-it-now functionality
|
||||
- **[OpenAPI Spec](https://registry.modelcontextprotocol.io/openapi.yaml)** - Complete machine-readable specification
|
||||
|
||||
## Extensions
|
||||
|
||||
The official registry implements the [Generic Registry API](./generic-registry-api.md) with the following specific configurations and extensions:
|
||||
|
||||
### Authentication
|
||||
|
||||
Publishing requires namespace-based authentication:
|
||||
|
||||
- **GitHub OAuth** - For `io.github.*` namespaces
|
||||
- **GitHub OIDC** - For publishing from GitHub Actions
|
||||
- **DNS verification** - For domain-based namespaces (`com.example.*`)
|
||||
- **HTTP verification** - For domain-based namespaces (`com.example.*`)
|
||||
|
||||
See [Publisher Commands](../cli/commands.md) for authentication setup.
|
||||
|
||||
### Package Validation
|
||||
|
||||
The official registry enforces additional [package validation requirements](../server-json/official-registry-requirements.md) when publishing.
|
||||
|
||||
### Additional endpoints
|
||||
|
||||
#### Auth endpoints
|
||||
- POST `/v0/auth/dns` - Exchange signed DNS challenge for auth token
|
||||
- POST `/v0/auth/http` - Exchange signed HTTP challenge for auth token
|
||||
- POST `/v0/auth/github-at` - Exchange GitHub access token for auth token
|
||||
- POST `/v0/auth/github-oidc` - Exchange GitHub OIDC token for auth token
|
||||
- POST `/v0/auth/oidc` - Exchange Google OIDC token for auth token (for admins)
|
||||
|
||||
#### Admin endpoints
|
||||
- GET `/metrics` - Prometheus metrics endpoint
|
||||
- GET `/v0/health` - Basic health check endpoint
|
||||
- PUT `/v0/servers/{id}` - Edit existing server
|
||||
544
docs/reference/api/openapi.yaml
Normal file
544
docs/reference/api/openapi.yaml
Normal file
|
|
@ -0,0 +1,544 @@
|
|||
openapi: 3.1.0
|
||||
jsonSchemaDialect: "https://json-schema.org/draft/2020-12/schema"
|
||||
$id: https://modelcontextprotocol.io/schemas/draft/2025-07-09/server-registry-openapi
|
||||
info:
|
||||
title: MCP Server Registry API
|
||||
version: "2025-07-09"
|
||||
summary: API for discovering and accessing MCP server metadata
|
||||
description: |
|
||||
Specification for a theoretical REST API that serves up metadata about MCP servers.
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
|
||||
paths:
|
||||
/v0/servers:
|
||||
get:
|
||||
summary: List MCP servers
|
||||
description: Returns a list of all registered MCP servers
|
||||
parameters:
|
||||
- name: cursor
|
||||
in: query
|
||||
description: Pagination cursor for retrieving next set of results
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: limit
|
||||
in: query
|
||||
description: Maximum number of items to return
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: A list of MCP servers
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ServerList'
|
||||
/v0/servers/{id}:
|
||||
get:
|
||||
summary: Get MCP server details
|
||||
description: Returns detailed information about a specific MCP server
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: Unique ID of the server
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
- name: version
|
||||
in: query
|
||||
description: Desired MCP server version
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Detailed server information
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ServerDetail'
|
||||
'404':
|
||||
description: Server not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
example: "Server not found"
|
||||
/v0/publish:
|
||||
post:
|
||||
summary: Publish MCP server (Optional)
|
||||
description: |
|
||||
Publish a new MCP server to the registry or update an existing one.
|
||||
|
||||
**Note**: This endpoint is optional for registry implementations. Read-only registries may not provide this functionality.
|
||||
|
||||
Authentication mechanism is registry-specific and may vary between implementations.
|
||||
security:
|
||||
- bearerAuth: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ServerDetail'
|
||||
examples:
|
||||
basic_server:
|
||||
summary: Basic server with NPM package
|
||||
value:
|
||||
name: "io.modelcontextprotocol/filesystem"
|
||||
description: "Node.js server implementing Model Context Protocol (MCP) for filesystem operations."
|
||||
status: "active"
|
||||
repository:
|
||||
url: "https://github.com/modelcontextprotocol/servers"
|
||||
source: "github"
|
||||
version_detail:
|
||||
version: "1.0.2"
|
||||
packages:
|
||||
- registry_type: "npm"
|
||||
registry_base_url: "https://registry.npmjs.org"
|
||||
identifier: "@modelcontextprotocol/server-filesystem"
|
||||
version: "1.0.2"
|
||||
_meta:
|
||||
publisher:
|
||||
tool: "publisher-cli"
|
||||
version: "1.2.3"
|
||||
build_info:
|
||||
commit: "abc123def456"
|
||||
timestamp: "2023-12-01T10:30:00Z"
|
||||
example_org_server:
|
||||
summary: Server with example.com organization extensions
|
||||
value:
|
||||
name: "com.example/demo-server"
|
||||
description: "Example MCP server demonstrating publisher extensions."
|
||||
status: "active"
|
||||
repository:
|
||||
url: "https://github.com/example/mcp-demo"
|
||||
source: "github"
|
||||
version_detail:
|
||||
version: "1.0.0"
|
||||
packages:
|
||||
- registry_type: "npm"
|
||||
registry_base_url: "https://registry.npmjs.org"
|
||||
identifier: "@example/mcp-demo-server"
|
||||
version: "1.0.0"
|
||||
_meta:
|
||||
publisher:
|
||||
contact_email: "maintainer@example.com"
|
||||
build_metadata:
|
||||
commit: "abc123"
|
||||
timestamp: "2024-01-15T10:30:00Z"
|
||||
com.example:
|
||||
marketplace_icon: "https://example.com/icon.png"
|
||||
category: ["software_development"]
|
||||
documentation_url: "https://docs.example.org"
|
||||
verified_publisher: true
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully published server
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ServerDetail'
|
||||
'401':
|
||||
description: Unauthorized - Invalid or missing authentication token
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
example: "Invalid or expired Registry JWT token"
|
||||
'403':
|
||||
description: Forbidden - Insufficient permissions
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
example: "You do not have permission to publish this server"
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
example: "Failed to publish server"
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
description: |
|
||||
Registry-specific authentication token. The authentication mechanism and token format may vary between registry implementations.
|
||||
|
||||
Some registries may use JWT tokens, others may use API keys or OAuth. Consult your specific registry's authentication documentation.
|
||||
schemas:
|
||||
Repository:
|
||||
type: object
|
||||
required:
|
||||
- url
|
||||
- source
|
||||
- id
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
example: "https://github.com/modelcontextprotocol/servers"
|
||||
source:
|
||||
type: string
|
||||
example: "github"
|
||||
id:
|
||||
type: string
|
||||
example: "b94b5f7e-c7c6-d760-2c78-a5e9b8a5b8c9"
|
||||
subfolder:
|
||||
type: string
|
||||
description: "Optional relative path from repository root to the server location within a monorepo structure"
|
||||
example: "src/everything"
|
||||
|
||||
Server:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
- version_detail
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: "Reverse DNS name of the MCP server"
|
||||
example: "io.github.modelcontextprotocol/filesystem"
|
||||
description:
|
||||
type: string
|
||||
description: "Human-readable description of the server's functionality"
|
||||
example: "Node.js server implementing Model Context Protocol (MCP) for filesystem operations."
|
||||
status:
|
||||
type: string
|
||||
enum: [active, deprecated]
|
||||
default: active
|
||||
description: "Server lifecycle status. 'deprecated' indicates the server is no longer recommended for new usage."
|
||||
example: "active"
|
||||
repository:
|
||||
$ref: '#/components/schemas/Repository'
|
||||
version_detail:
|
||||
$ref: '#/components/schemas/VersionDetail'
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
VersionDetail:
|
||||
type: object
|
||||
required:
|
||||
- version
|
||||
- release_date
|
||||
- is_latest
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
example: "1.0.2"
|
||||
description: Equivalent of Implementation.version in MCP specification.
|
||||
release_date:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2023-06-15T10:30:00Z"
|
||||
description: Datetime that the MCP server version was published to the registry.
|
||||
is_latest:
|
||||
type: boolean
|
||||
example: true
|
||||
description: Whether the MCP server version is the latest version available in the registry.
|
||||
|
||||
ServerList:
|
||||
type: object
|
||||
required:
|
||||
- servers
|
||||
properties:
|
||||
servers:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ServerDetail'
|
||||
metadata:
|
||||
type: object
|
||||
properties:
|
||||
next_cursor:
|
||||
type: string
|
||||
description: Cursor for next page of results
|
||||
count:
|
||||
type: integer
|
||||
description: Number of items in current page
|
||||
example: 30
|
||||
|
||||
Package:
|
||||
type: object
|
||||
properties:
|
||||
registry_type:
|
||||
type: string
|
||||
description: Registry type indicating how to download packages (e.g., 'npm', 'pypi', 'oci', 'nuget', 'mcpb')
|
||||
examples:
|
||||
- "npm"
|
||||
- "pypi"
|
||||
- "oci"
|
||||
- "nuget"
|
||||
- "mcpb"
|
||||
registry_base_url:
|
||||
type: string
|
||||
format: uri
|
||||
description: Base URL of the package registry
|
||||
examples:
|
||||
- "https://registry.npmjs.org"
|
||||
- "https://pypi.org"
|
||||
- "https://docker.io"
|
||||
- "https://api.nuget.org"
|
||||
- "https://github.com"
|
||||
- "https://gitlab.com"
|
||||
identifier:
|
||||
type: string
|
||||
description: Package identifier - either a package name (for registries) or URL (for direct downloads)
|
||||
examples:
|
||||
- "@modelcontextprotocol/server-brave-search"
|
||||
- "https://github.com/example/releases/download/v1.0.0/package.mcpb"
|
||||
version:
|
||||
type: string
|
||||
description: Package version
|
||||
example: "1.0.2"
|
||||
file_sha256:
|
||||
type: string
|
||||
description: SHA-256 hash of the package file for integrity verification.
|
||||
example: "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce"
|
||||
runtime_hint:
|
||||
type: string
|
||||
description: A hint to help clients determine the appropriate runtime for the package. This field should be provided when `runtime_arguments` are present.
|
||||
examples: [npx, uvx, dnx]
|
||||
runtime_arguments:
|
||||
type: array
|
||||
description: A list of arguments to be passed to the package's runtime command (such as docker or npx). The `runtime_hint` field should be provided when `runtime_arguments` are present.
|
||||
items:
|
||||
$ref: '#/components/schemas/Argument'
|
||||
package_arguments:
|
||||
type: array
|
||||
description: A list of arguments to be passed to the package's binary.
|
||||
items:
|
||||
$ref: '#/components/schemas/Argument'
|
||||
environment_variables:
|
||||
type: array
|
||||
description: A mapping of environment variables to be set when running the package.
|
||||
items:
|
||||
$ref: '#/components/schemas/KeyValueInput'
|
||||
|
||||
Input:
|
||||
type: object
|
||||
properties:
|
||||
description:
|
||||
description: A description of the input, which clients can use to provide context to the user.
|
||||
type: string
|
||||
is_required:
|
||||
type: boolean
|
||||
default: false
|
||||
format:
|
||||
type: string
|
||||
description: |
|
||||
Specifies the input format. Supported values include `filepath`, which should be interpreted as a file on the user's filesystem.
|
||||
|
||||
When the input is converted to a string, booleans should be represented by the strings "true" and "false", and numbers should be represented as decimal values.
|
||||
enum: [string, number, boolean, filepath]
|
||||
default: string
|
||||
value:
|
||||
type: string
|
||||
description: |
|
||||
The default value for the input. If this is not set, the user may be prompted to provide a value. If a value is set, it should not be configurable by end users.
|
||||
|
||||
Identifiers wrapped in `{curly_braces}` will be replaced with the corresponding properties from the input `variables` map. If an identifier in braces is not found in `variables`, or if `variables` is not provided, the `{curly_braces}` substring should remain unchanged.
|
||||
is_secret:
|
||||
type: boolean
|
||||
description: Indicates whether the input is a secret value (e.g., password, token). If true, clients should handle the value securely.
|
||||
default: false
|
||||
default:
|
||||
type: string
|
||||
description: The default value for the input.
|
||||
choices:
|
||||
type: array
|
||||
description: A list of possible values for the input. If provided, the user must select one of these values.
|
||||
items:
|
||||
type: string
|
||||
example: []
|
||||
|
||||
InputWithVariables:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Input'
|
||||
- type: object
|
||||
properties:
|
||||
variables:
|
||||
type: object
|
||||
description: A map of variable names to their values. Keys in the input `value` that are wrapped in `{curly_braces}` will be replaced with the corresponding variable values.
|
||||
additionalProperties:
|
||||
$ref: '#/components/schemas/Input'
|
||||
|
||||
PositionalArgument:
|
||||
description: A positional input is a value inserted verbatim into the command line.
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/InputWithVariables'
|
||||
- type: object
|
||||
required:
|
||||
- type
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [positional]
|
||||
example: "positional"
|
||||
value_hint:
|
||||
type: string
|
||||
description: An identifier-like hint for the value. This is not part of the command line, but can be used by client configuration and to provide hints to users.
|
||||
example: file_path
|
||||
is_repeated:
|
||||
type: boolean
|
||||
description: Whether the argument can be repeated multiple times in the command line.
|
||||
default: false
|
||||
anyOf:
|
||||
- required:
|
||||
- value
|
||||
- required:
|
||||
- value_hint
|
||||
|
||||
NamedArgument:
|
||||
description: A command-line `--flag={value}`.
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/InputWithVariables'
|
||||
- type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [named]
|
||||
example: "named"
|
||||
name:
|
||||
type: string
|
||||
description: The flag name, including any leading dashes.
|
||||
example: "--port"
|
||||
is_repeated:
|
||||
type: boolean
|
||||
description: Whether the argument can be repeated multiple times.
|
||||
default: false
|
||||
|
||||
KeyValueInput:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/InputWithVariables'
|
||||
- type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the header or environment variable.
|
||||
example: SOME_VARIABLE
|
||||
|
||||
Argument:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/PositionalArgument'
|
||||
- $ref: '#/components/schemas/NamedArgument'
|
||||
|
||||
Remote:
|
||||
type: object
|
||||
required:
|
||||
- transport_type
|
||||
- url
|
||||
properties:
|
||||
transport_type:
|
||||
type: string
|
||||
enum: [streamable, sse]
|
||||
description: Transport protocol type
|
||||
example: "sse"
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
description: Remote server URL
|
||||
example: "https://mcp-fs.example.com/sse"
|
||||
headers:
|
||||
type: array
|
||||
description: HTTP headers to include
|
||||
items:
|
||||
$ref: '#/components/schemas/KeyValueInput'
|
||||
|
||||
ServerDetail:
|
||||
description: Schema for a static representation of an MCP server. Used in various contexts related to discovery, installation, and configuration.
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Server'
|
||||
- type: object
|
||||
properties:
|
||||
$schema:
|
||||
type: string
|
||||
format: uri
|
||||
description: JSON Schema URI for this server.json format
|
||||
example: "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json"
|
||||
packages:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Package'
|
||||
remotes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Remote'
|
||||
_meta:
|
||||
type: object
|
||||
description: Extension metadata using reverse DNS namespacing
|
||||
properties:
|
||||
publisher:
|
||||
type: object
|
||||
description: Publisher-specific metadata and build information
|
||||
additionalProperties: true
|
||||
example:
|
||||
tool: "publisher-cli"
|
||||
version: "1.2.3"
|
||||
build_info:
|
||||
commit: "abc123def456"
|
||||
timestamp: "2023-12-01T10:30:00Z"
|
||||
pipeline_id: "build-789"
|
||||
io.modelcontextprotocol.registry:
|
||||
type: object
|
||||
description: Registry-specific metadata managed by the MCP registry system
|
||||
required:
|
||||
- id
|
||||
- published_at
|
||||
- updated_at
|
||||
- is_latest
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Unique registry identifier for this server entry
|
||||
example: "550e8400-e29b-41d4-a716-446655440000"
|
||||
published_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Timestamp when the server was first published to the registry
|
||||
example: "2023-12-01T10:30:00Z"
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Timestamp when the server entry was last updated
|
||||
example: "2023-12-01T11:00:00Z"
|
||||
is_latest:
|
||||
type: boolean
|
||||
description: Whether this is the latest version of the server
|
||||
example: true
|
||||
release_date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Release date of the server version
|
||||
example: "2023-12-01T10:30:00Z"
|
||||
additionalProperties: false
|
||||
additionalProperties: true
|
||||
187
docs/reference/cli/commands.md
Normal file
187
docs/reference/cli/commands.md
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
# Publisher CLI Commands Reference
|
||||
|
||||
Complete command reference for the `mcp-publisher` CLI tool.
|
||||
|
||||
See the [publishing guide](../../guides/publishing/publish-server.md) for a walkthrough of using the CLI to publish a server.
|
||||
|
||||
## Installation
|
||||
|
||||
<!-- TODO: update once #358 solved -->
|
||||
|
||||
```bash
|
||||
# Build from source (from repository root)
|
||||
make publisher
|
||||
# Binary created at ./cmd/publisher/bin/mcp-publisher
|
||||
|
||||
# Install globally (optional)
|
||||
cp ./cmd/publisher/bin/mcp-publisher /usr/local/bin/
|
||||
```
|
||||
|
||||
## Global Options
|
||||
|
||||
All commands support:
|
||||
- `--help`, `-h` - Show command help
|
||||
- `--registry` - Registry URL (default: `https://registry.modelcontextprotocol.io`)
|
||||
|
||||
## Commands
|
||||
|
||||
### `mcp-publisher init`
|
||||
|
||||
Generate a `server.json` template with automatic detection.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
mcp-publisher init [options]
|
||||
```
|
||||
|
||||
**Behavior:**
|
||||
- Creates `server.json` in current directory
|
||||
- Auto-detects package managers (`package.json`, `setup.py`, etc.)
|
||||
- Pre-fills fields where possible
|
||||
- Prompts for missing required fields
|
||||
|
||||
**Example output:**
|
||||
```json
|
||||
{
|
||||
"name": "io.github.username/server-name",
|
||||
"description": "TODO: Add server description",
|
||||
"version_detail": { "version": "1.0.0" },
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "npm",
|
||||
"identifier": "detected-package-name",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### `mcp-publisher login <method>`
|
||||
|
||||
Authenticate with the registry.
|
||||
|
||||
**Authentication Methods:**
|
||||
|
||||
#### GitHub Interactive
|
||||
```bash
|
||||
mcp-publisher login github [--registry=URL]
|
||||
```
|
||||
- Opens browser for GitHub OAuth flow
|
||||
- Grants access to `io.github.{username}/*` and `io.github.{org}/*` namespaces
|
||||
|
||||
#### GitHub OIDC (CI/CD)
|
||||
```bash
|
||||
mcp-publisher login github-oidc [--registry=URL]
|
||||
```
|
||||
- Uses GitHub Actions OIDC tokens automatically
|
||||
- Requires `id-token: write` permission in workflow
|
||||
- No browser interaction needed
|
||||
|
||||
Also see [the guide to publishing from GitHub Actions](../../guides/publishing/github-actions.md).
|
||||
|
||||
#### DNS Verification
|
||||
```bash
|
||||
mcp-publisher login dns --domain=example.com --private-key=HEX_KEY [--registry=URL]
|
||||
```
|
||||
- Verifies domain ownership via DNS TXT record
|
||||
- Grants access to `com.example.*` namespaces
|
||||
- Requires Ed25519 private key (64-character hex)
|
||||
|
||||
**Setup:**
|
||||
```bash
|
||||
# Generate keypair
|
||||
openssl genpkey -algorithm Ed25519 -out key.pem
|
||||
|
||||
# Get public key for DNS record
|
||||
openssl pkey -in key.pem -pubout -outform DER | tail -c 32 | base64
|
||||
|
||||
# Add DNS TXT record:
|
||||
# _mcp-registry.example.com. IN TXT "v=MCPv1; k=ed25519; p=PUBLIC_KEY"
|
||||
|
||||
# Extract private key for login
|
||||
openssl pkey -in key.pem -noout -text | grep -A3 "priv:" | tail -n +2 | tr -d ' :\n'
|
||||
```
|
||||
|
||||
#### HTTP Verification
|
||||
```bash
|
||||
mcp-publisher login http --domain=example.com --private-key=HEX_KEY [--registry=URL]
|
||||
```
|
||||
- Verifies domain ownership via HTTPS endpoint
|
||||
- Grants access to `com.example.*` namespaces
|
||||
- Requires Ed25519 private key (64-character hex)
|
||||
|
||||
**Setup:**
|
||||
```bash
|
||||
# Generate keypair (same as DNS)
|
||||
openssl genpkey -algorithm Ed25519 -out key.pem
|
||||
|
||||
# Host public key at:
|
||||
# https://example.com/.well-known/mcp-registry-auth
|
||||
# Content: v=MCPv1; k=ed25519; p=PUBLIC_KEY
|
||||
```
|
||||
|
||||
#### Anonymous (Testing)
|
||||
```bash
|
||||
mcp-publisher login none [--registry=URL]
|
||||
```
|
||||
- No authentication - for local testing only
|
||||
- Only works with local registry instances
|
||||
|
||||
### `mcp-publisher publish`
|
||||
|
||||
Publish server to the registry.
|
||||
|
||||
For detailed guidance on the publishing process, see the [publishing guide](../../guides/publishing/publish-server.md).
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
mcp-publisher publish [options]
|
||||
```
|
||||
|
||||
**Options:**
|
||||
- `--file=PATH` - Path to server.json (default: `./server.json`)
|
||||
- `--registry=URL` - Registry URL override
|
||||
- `--dry-run` - Validate without publishing
|
||||
|
||||
**Process:**
|
||||
1. Validates `server.json` against schema
|
||||
2. Verifies package ownership (see [Official Registry Requirements](../server-json/official-registry-requirements.md))
|
||||
3. Checks namespace authentication
|
||||
4. Publishes to registry
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# Basic publish
|
||||
mcp-publisher publish
|
||||
|
||||
# Dry run validation
|
||||
mcp-publisher publish --dry-run
|
||||
|
||||
# Custom file location
|
||||
mcp-publisher publish --file=./config/server.json
|
||||
```
|
||||
|
||||
### `mcp-publisher logout`
|
||||
|
||||
Clear stored authentication credentials.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
mcp-publisher logout
|
||||
```
|
||||
|
||||
**Behavior:**
|
||||
- Removes `~/.mcp_publisher_token`
|
||||
- Does not revoke tokens on server side
|
||||
|
||||
## Configuration
|
||||
|
||||
### Token Storage
|
||||
Authentication tokens stored in `~/.mcp_publisher_token` as JSON:
|
||||
```json
|
||||
{
|
||||
"token": "jwt-token-here",
|
||||
"registry_url": "https://registry.modelcontextprotocol.io",
|
||||
"expires_at": "2024-12-31T23:59:59Z"
|
||||
}
|
||||
```
|
||||
178
docs/reference/faq.md
Normal file
178
docs/reference/faq.md
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
# MCP Registry FAQ
|
||||
|
||||
These questions come up often in discussions about the MCP Registry. If you have a question that isn't answered here, please start a discussion on the [MCP Registry Discussions page](https://github.com/modelcontextprotocol/registry/discussions).
|
||||
|
||||
## General Questions
|
||||
|
||||
### What is the MCP Registry?
|
||||
|
||||
The MCP Registry is the official centralized metadata repository for publicly-accessible MCP servers. It provides:
|
||||
|
||||
- A single place for server creators to publish metadata about their servers
|
||||
- A REST API for MCP clients and aggregators to discover available servers
|
||||
- Standardized installation and configuration information
|
||||
- Namespace management through DNS verification
|
||||
|
||||
### What is the difference between "Official MCP Registry", "MCP Registry", "MCP registry", "MCP Registry API", etc?
|
||||
|
||||
There are four underlying concepts:
|
||||
- "MCP Server Registry API" (or "MCP Registry API"): The OpenAPI specification defined in [openapi.yaml](./api/openapi.yaml). This is a reusable API specification that anyone building any sort of "MCP server registry" should consider adopting / aligning with.
|
||||
- "Official MCP Registry" (or "MCP Registry"): The application that lives at `https://registry.modelcontextprotocol.io`. This registry currently only catalogs MCP servers, but may be extended in the future to also catalog MCP client/host apps and frameworks.
|
||||
- "Official MCP Registry API": The REST API served at `https://registry.modelcontextprotocol.io`, which is a superset of the MCP Registry API. Its OpenAPI specification can be downloaded from [https://registry.modelcontextprotocol.io/openapi.yaml](https://registry.modelcontextprotocol.io/openapi.yaml)
|
||||
- "MCP server registry" (or "MCP registry"): A third party, likely commercial, implementation of the MCP Server Registry API or derivative specification.
|
||||
|
||||
### Is the MCP Registry a package registry?
|
||||
|
||||
No. The MCP Registry stores metadata about MCP servers and references to where they're hosted (npm, PyPI, NuGet, Docker Hub, etc.), but does not host the actual source code or packages.
|
||||
|
||||
### Who should use the MCP Registry directly?
|
||||
|
||||
The registry is designed for programmatic consumption by:
|
||||
|
||||
- MCP client applications (Claude Desktop, Cline, etc.)
|
||||
- Server aggregators (Smithery, PulseMCP, etc.)
|
||||
- NOT individual end-users (they should use MCP clients or aggregator UIs)
|
||||
|
||||
### Will there be feature X?
|
||||
|
||||
See [roadmap.md](../explanations/roadmap.md).
|
||||
|
||||
## Publishing Servers
|
||||
|
||||
### How do I publish my MCP server?
|
||||
|
||||
See the [publisher README](../../cmd/publisher/README.md)
|
||||
|
||||
### What namespaces are available?
|
||||
|
||||
- **With GitHub verification**: `io.github.yourusername/server-name`, `io.github.yourorg/server-name`
|
||||
- **With DNS verification**: `com.yourcompany.*`, `com.yourcompany.*/*`
|
||||
- **With HTTP verification**: `com.yourcompany/*`
|
||||
|
||||
### Is open source required?
|
||||
|
||||
No. While open source code is encouraged, it is not required for either locally or remotely run servers.
|
||||
|
||||
### What package registries are supported?
|
||||
|
||||
- npm (Node.js packages)
|
||||
- PyPI (Python packages)
|
||||
- NuGet.org (.NET packages)
|
||||
- GitHub Container Registry (GHCR)
|
||||
|
||||
More can be added as the community desires; feel free to open an issue if you are interested in building support for another registry.
|
||||
|
||||
### Can I publish multiple versions?
|
||||
|
||||
Yes, versioning is supported:
|
||||
|
||||
- Each version gets its own immutable metadata
|
||||
- Version strings must be unique for each server
|
||||
- Old versions remain accessible for compatibility
|
||||
- The registry tracks which version is "latest" based on semantic version ordering when possible
|
||||
|
||||
### How do I update my server metadata?
|
||||
|
||||
Submit a new `server.json` with a unique version string. Once published, version metadata is immutable (similar to npm).
|
||||
|
||||
### What version format should I use?
|
||||
|
||||
The registry accepts any version string up to 255 characters, but we recommend:
|
||||
|
||||
- **SHOULD use semantic versioning** (e.g., "1.0.2", "2.1.0-alpha") for predictable ordering
|
||||
- **SHOULD align with package versions** to reduce confusion
|
||||
- **MAY use prerelease labels** (e.g., "1.0.0-1") for registry-specific versions
|
||||
|
||||
The registry attempts to parse versions as semantic versions for proper ordering. Non-semantic versions are allowed but will be ordered by publication timestamp. See the [versioning guide](../explanations/versioning.md) for detailed guidance.
|
||||
|
||||
### Can I add custom metadata when publishing?
|
||||
|
||||
Yes, extensions under the `x-publisher` property are preserved when publishing to the registry. This allows you to include custom metadata specific to your publishing process.
|
||||
|
||||
### Can I delete/unpublish my server?
|
||||
|
||||
At time of last update, this was open for discussion in [#104](https://github.com/modelcontextprotocol/registry/issues/104).
|
||||
|
||||
### Can I publish a private server?
|
||||
|
||||
Private servers are those that are only accessible to a narrow set of users. For example, servers published on a private network (like `mcp.acme-corp.internal`) or on private package registries (e.g. `npx -y @acme/mcp --registry https://artifactory.acme-corp.internal/npm`).
|
||||
|
||||
These are generally not supported on the official MCP registry, which is designed for publicly accessible MCP servers.
|
||||
|
||||
If you want to publish private servers we recommend you host your own MCP subregistry, and add them there.
|
||||
|
||||
## Security & Trust
|
||||
|
||||
### How do I know a server is from the claimed organization?
|
||||
|
||||
DNS verification ensures namespace ownership. For example:
|
||||
|
||||
- `com.microsoft/server` requires DNS verification of microsoft.com
|
||||
- `io.github.name/server` is tied to a GitHub account or GitHub organization `name`
|
||||
|
||||
### Is there security scanning?
|
||||
|
||||
The MVP delegates security scanning to:
|
||||
- underlying package registries; and
|
||||
- subregistries
|
||||
|
||||
### How is spam prevented?
|
||||
|
||||
- Namespace authentication requirements
|
||||
- Character limits and regex validation on free-form fields
|
||||
- Manual takedown of spam or malicious servers
|
||||
|
||||
In future we might explore:
|
||||
- Stricter rate limiting (e.g., 10 new servers per user per day)
|
||||
- Potential AI-based spam detection
|
||||
- Community reporting and admin blacklisting capabilities
|
||||
|
||||
## API & Integration
|
||||
|
||||
### How often should I poll the registry?
|
||||
|
||||
Recommended polling frequency:
|
||||
|
||||
- `/servers` endpoint: once per hour
|
||||
- `/servers/:id` endpoint: once per version (results are immutable)
|
||||
- Design assumes CDN caching between registry and consumers
|
||||
|
||||
Also see [#291](https://github.com/modelcontextprotocol/registry/issues/291), which might mean the above can be more regular.
|
||||
|
||||
### Will there be webhooks?
|
||||
|
||||
Not in the initial MVP, but the architecture supports adding webhooks for update notifications in the future.
|
||||
|
||||
### Can I run my own registry instance?
|
||||
|
||||
Yes! The API shapes and data formats are intentionally designed for reuse by subregistries. Organizations needing private registries should:
|
||||
|
||||
- Implement the same API shape
|
||||
- Use the same `server.json` format
|
||||
- Potentially mirror/filter the official registry data
|
||||
|
||||
### Can I extend the registry API?
|
||||
|
||||
Yes, we support `x-com.example` style extensions in a bunch of places - see the official MCP registry API spec. This can be used to add annotations to many objects, e.g. add security scanning details, enrich package metadata, etc.
|
||||
|
||||
If you have a use case that can't be addressed here, raise a GitHub issue!
|
||||
|
||||
### Can I use the code here to run my own registry instance?
|
||||
|
||||
The registry implementation here is not designed for self-hosting, but you're welcome to try to use it/fork it as necessary. Note that this is not an intended use, and the registry maintainers cannot provide any support for this at this time.
|
||||
|
||||
## Operations & Maintenance
|
||||
|
||||
### What's the expected reliability?
|
||||
|
||||
- This is a community maintained project without full time staffing. You should therefore expect downtime periods of up to 1 business day. No strict guarantees are provided. (Also see discussion in [#150](https://github.com/modelcontextprotocol/registry/issues/150))
|
||||
- Ideally clients should use subregistries with higher availability guarantees, to avoid direct end-user impact (as subregistries can cache data).
|
||||
|
||||
### What if I need to report a spam or malicious server?
|
||||
|
||||
1. Report it as abuse to the underlying package registry (e.g. NPM, PyPi, DockerHub, etc.); and
|
||||
2. Raise a GitHub issue on the registry repo with a title beginning `Abuse report: `
|
||||
|
||||
### What if I need to report a security vulnerability in the registry itself?
|
||||
|
||||
Follow [the MCP community SECURITY.md](https://github.com/modelcontextprotocol/.github/blob/main/SECURITY.md).
|
||||
726
docs/reference/server-json/generic-server-json.md
Normal file
726
docs/reference/server-json/generic-server-json.md
Normal file
|
|
@ -0,0 +1,726 @@
|
|||
# server.json Format Specification
|
||||
|
||||
A `server.json` file is a standardized way to describe MCP servers for registry publishing, client discovery, and package management.
|
||||
|
||||
Also see:
|
||||
- For step-by-step instructions on creating and using server.json files, see the [publishing guide](../../guides/publishing/publish-server.md).
|
||||
- For understanding the validation requirements when publishing to the official registry, see [official registry requirements](./official-registry-requirements.md).
|
||||
|
||||
## Browse the Complete Schema
|
||||
|
||||
**📋 View the full specification interactively**: Open [server.schema.json](./server.schema.json) in a schema viewer like [json-schema.app](https://json-schema.app/view/%23?url=https%3A%2F%2Fstatic.modelcontextprotocol.io%2Fschemas%2F2025-07-09%2Fserver.schema.json).
|
||||
|
||||
The schema contains all field definitions, validation rules, examples, and detailed descriptions.
|
||||
|
||||
The official registry has some more restrictions on top of this. See the [official registry requirements](./official-registry-requirements.md) for details.
|
||||
|
||||
## Examples
|
||||
|
||||
<!-- As a heads up, these are used as part of tests/integration/main.go -->
|
||||
|
||||
### Basic Server with NPM Package
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
||||
"name": "io.modelcontextprotocol/brave-search",
|
||||
"description": "MCP server for Brave Search API integration",
|
||||
"status": "active",
|
||||
"repository": {
|
||||
"url": "https://github.com/modelcontextprotocol/servers",
|
||||
"source": "github"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "1.0.2"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "npm",
|
||||
"registry_base_url": "https://registry.npmjs.org",
|
||||
"identifier": "@modelcontextprotocol/server-brave-search",
|
||||
"version": "1.0.2",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"environment_variables": [
|
||||
{
|
||||
"name": "BRAVE_API_KEY",
|
||||
"description": "Brave Search API Key",
|
||||
"is_required": true,
|
||||
"is_secret": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "npm-publisher",
|
||||
"version": "1.0.1",
|
||||
"build_info": {
|
||||
"timestamp": "2023-12-01T10:30:00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Server in a Monorepo with Subfolder
|
||||
|
||||
For MCP servers located within a subdirectory of a larger repository (monorepo structure), use the `subfolder` field to specify the relative path:
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
||||
"name": "io.modelcontextprotocol/everything",
|
||||
"description": "MCP server that exercises all the features of the MCP protocol",
|
||||
"status": "active",
|
||||
"repository": {
|
||||
"url": "https://github.com/modelcontextprotocol/servers",
|
||||
"source": "github",
|
||||
"subfolder": "src/everything"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "0.6.2"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "npm",
|
||||
"registry_base_url": "https://registry.npmjs.org",
|
||||
"identifier": "@modelcontextprotocol/everything",
|
||||
"version": "0.6.2",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
}
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "npm-publisher",
|
||||
"version": "1.0.1",
|
||||
"build_info": {
|
||||
"timestamp": "2023-12-01T10:30:00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Constant (fixed) arguments needed to start the MCP server
|
||||
|
||||
Suppose your MCP server application requires a `mcp start` CLI arguments to start in MCP server mode. Express these as positional arguments like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "io.github.joelverhagen/knapcode-samplemcpserver",
|
||||
"description": "Sample NuGet MCP server for a random number and random weather",
|
||||
"version_detail": {
|
||||
"version": "0.4.0-beta"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "nuget",
|
||||
"registry_base_url": "https://api.nuget.org",
|
||||
"identifier": "Knapcode.SampleMcpServer",
|
||||
"version": "0.4.0-beta",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"package_arguments": [
|
||||
{
|
||||
"type": "positional",
|
||||
"value": "mcp"
|
||||
},
|
||||
{
|
||||
"type": "positional",
|
||||
"value": "start"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "nuget-publisher",
|
||||
"version": "2.1.0",
|
||||
"build_info": {
|
||||
"timestamp": "2023-11-15T14:22:00Z",
|
||||
"pipeline_id": "nuget-build-456"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcpServer@0.4.0-beta -- mcp start` instead of the default `dnx Knapcode.SampleMcpServer@0.4.0-beta` (when no `package_arguments` are provided).
|
||||
|
||||
### Filesystem Server with Multiple Packages
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
||||
"name": "io.github.modelcontextprotocol/filesystem",
|
||||
"description": "Node.js server implementing Model Context Protocol (MCP) for filesystem operations.",
|
||||
"status": "active",
|
||||
"repository": {
|
||||
"url": "https://github.com/modelcontextprotocol/servers",
|
||||
"source": "github",
|
||||
"id": "b94b5f7e-c7c6-d760-2c78-a5e9b8a5b8c9"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "1.0.2"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "npm",
|
||||
"registry_base_url": "https://registry.npmjs.org",
|
||||
"identifier": "@modelcontextprotocol/server-filesystem",
|
||||
"version": "1.0.2",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"package_arguments": [
|
||||
{
|
||||
"type": "positional",
|
||||
"value_hint": "target_dir",
|
||||
"description": "Path to access",
|
||||
"default": "/Users/username/Desktop",
|
||||
"is_required": true,
|
||||
"is_repeated": true
|
||||
}
|
||||
],
|
||||
"environment_variables": [
|
||||
{
|
||||
"name": "LOG_LEVEL",
|
||||
"description": "Logging level (debug, info, warn, error)",
|
||||
"default": "info"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"registry_type": "oci",
|
||||
"registry_base_url": "https://docker.io",
|
||||
"identifier": "mcp/filesystem",
|
||||
"version": "1.0.2",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"runtime_arguments": [
|
||||
{
|
||||
"type": "named",
|
||||
"description": "Mount a volume into the container",
|
||||
"name": "--mount",
|
||||
"value": "type=bind,src={source_path},dst={target_path}",
|
||||
"is_required": true,
|
||||
"is_repeated": true,
|
||||
"variables": {
|
||||
"source_path": {
|
||||
"description": "Source path on host",
|
||||
"format": "filepath",
|
||||
"is_required": true
|
||||
},
|
||||
"target_path": {
|
||||
"description": "Path to mount in the container. It should be rooted in `/project` directory.",
|
||||
"is_required": true,
|
||||
"default": "/project"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"package_arguments": [
|
||||
{
|
||||
"type": "positional",
|
||||
"value_hint": "target_dir",
|
||||
"value": "/project"
|
||||
}
|
||||
],
|
||||
"environment_variables": [
|
||||
{
|
||||
"name": "LOG_LEVEL",
|
||||
"description": "Logging level (debug, info, warn, error)",
|
||||
"default": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "ci-publisher",
|
||||
"version": "3.2.1",
|
||||
"build_info": {
|
||||
"commit": "a1b2c3d4e5f6789",
|
||||
"timestamp": "2023-12-01T10:30:00Z",
|
||||
"pipeline_id": "filesystem-build-789",
|
||||
"environment": "production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Remote Server Example
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "io.modelcontextprotocol.anonymous/mcp-fs",
|
||||
"description": "Cloud-hosted MCP filesystem server",
|
||||
"repository": {
|
||||
"url": "https://github.com/example/remote-fs",
|
||||
"source": "github",
|
||||
"id": "xyz789ab-cdef-0123-4567-890ghijklmno"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "2.0.0"
|
||||
},
|
||||
"remotes": [
|
||||
{
|
||||
"type": "sse",
|
||||
"url": "http://mcp-fs.anonymous.modelcontextprotocol.io/sse"
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "cloud-deployer",
|
||||
"version": "2.4.0",
|
||||
"build_info": {
|
||||
"commit": "f7e8d9c2b1a0",
|
||||
"timestamp": "2023-12-05T08:45:00Z",
|
||||
"deployment_id": "remote-fs-deploy-456",
|
||||
"region": "us-west-2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Python Package Example
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "io.github.example/weather-mcp",
|
||||
"description": "Python MCP server for weather data access",
|
||||
"repository": {
|
||||
"url": "https://github.com/example/weather-mcp",
|
||||
"source": "github",
|
||||
"id": "def456gh-ijkl-7890-mnop-qrstuvwxyz12"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "0.5.0"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "pypi",
|
||||
"registry_base_url": "https://pypi.org",
|
||||
"identifier": "weather-mcp-server",
|
||||
"version": "0.5.0",
|
||||
"runtime_hint": "uvx",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"environment_variables": [
|
||||
{
|
||||
"name": "WEATHER_API_KEY",
|
||||
"description": "API key for weather service",
|
||||
"is_required": true,
|
||||
"is_secret": true
|
||||
},
|
||||
{
|
||||
"name": "WEATHER_UNITS",
|
||||
"description": "Temperature units (celsius, fahrenheit)",
|
||||
"default": "celsius"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "poetry-publisher",
|
||||
"version": "1.8.3",
|
||||
"build_info": {
|
||||
"python_version": "3.11.5",
|
||||
"timestamp": "2023-11-28T16:20:00Z",
|
||||
"build_id": "pypi-weather-123",
|
||||
"dependencies_hash": "sha256:a9b8c7d6e5f4"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### NuGet (.NET) Package Example
|
||||
|
||||
The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "io.github.joelverhagen/knapcode-samplemcpserver",
|
||||
"description": "Sample NuGet MCP server for a random number and random weather",
|
||||
"repository": {
|
||||
"url": "https://github.com/joelverhagen/Knapcode.SampleMcpServer",
|
||||
"source": "github",
|
||||
"id": "example-nuget-id-0000-1111-222222222222"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "0.5.0"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "nuget",
|
||||
"registry_base_url": "https://api.nuget.org",
|
||||
"identifier": "Knapcode.SampleMcpServer",
|
||||
"version": "0.5.0",
|
||||
"runtime_hint": "dnx",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"environment_variables": [
|
||||
{
|
||||
"name": "WEATHER_CHOICES",
|
||||
"description": "Comma separated list of weather descriptions to randomly select.",
|
||||
"is_required": true,
|
||||
"is_secret": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "dotnet-publisher",
|
||||
"version": "8.0.100",
|
||||
"build_info": {
|
||||
"dotnet_version": "8.0.0",
|
||||
"timestamp": "2023-12-10T12:15:00Z",
|
||||
"configuration": "Release",
|
||||
"target_framework": "net8.0",
|
||||
"build_number": "20231210.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Complex Docker Server with Multiple Arguments
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "io.github.example/database-manager",
|
||||
"description": "MCP server for database operations with support for multiple database types",
|
||||
"repository": {
|
||||
"url": "https://github.com/example/database-manager-mcp",
|
||||
"source": "github",
|
||||
"id": "ghi789jk-lmno-1234-pqrs-tuvwxyz56789"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "3.1.0"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "oci",
|
||||
"registry_base_url": "https://docker.io",
|
||||
"identifier": "example/database-manager-mcp",
|
||||
"version": "3.1.0",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"runtime_arguments": [
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--network",
|
||||
"value": "host",
|
||||
"description": "Use host network mode"
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "-e",
|
||||
"value": "DB_TYPE={db_type}",
|
||||
"description": "Database type to connect to",
|
||||
"is_repeated": true,
|
||||
"variables": {
|
||||
"db_type": {
|
||||
"description": "Type of database",
|
||||
"choices": [
|
||||
"postgres",
|
||||
"mysql",
|
||||
"mongodb",
|
||||
"redis"
|
||||
],
|
||||
"is_required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"package_arguments": [
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--host",
|
||||
"description": "Database host",
|
||||
"default": "localhost",
|
||||
"is_required": true
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--port",
|
||||
"description": "Database port",
|
||||
"format": "number"
|
||||
},
|
||||
{
|
||||
"type": "positional",
|
||||
"value_hint": "database_name",
|
||||
"description": "Name of the database to connect to",
|
||||
"is_required": true
|
||||
}
|
||||
],
|
||||
"environment_variables": [
|
||||
{
|
||||
"name": "DB_USERNAME",
|
||||
"description": "Database username",
|
||||
"is_required": true
|
||||
},
|
||||
{
|
||||
"name": "DB_PASSWORD",
|
||||
"description": "Database password",
|
||||
"is_required": true,
|
||||
"is_secret": true
|
||||
},
|
||||
{
|
||||
"name": "SSL_MODE",
|
||||
"description": "SSL connection mode",
|
||||
"default": "prefer",
|
||||
"choices": [
|
||||
"disable",
|
||||
"prefer",
|
||||
"require"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "docker-buildx",
|
||||
"version": "0.12.1",
|
||||
"build_info": {
|
||||
"docker_version": "24.0.7",
|
||||
"timestamp": "2023-12-08T14:30:00Z",
|
||||
"platform": "linux/amd64,linux/arm64",
|
||||
"registry": "docker.io",
|
||||
"image_digest": "sha256:1a2b3c4d5e6f7890"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Server with Remote and Package Options
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
||||
"name": "io.modelcontextprotocol.anonymous/hybrid-mcp",
|
||||
"description": "MCP server available as both local package and remote service",
|
||||
"repository": {
|
||||
"url": "https://github.com/example/hybrid-mcp",
|
||||
"source": "github",
|
||||
"id": "klm012no-pqrs-3456-tuvw-xyz789abcdef"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "1.5.0"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "npm",
|
||||
"registry_base_url": "https://registry.npmjs.org",
|
||||
"identifier": "@example/hybrid-mcp-server",
|
||||
"version": "1.5.0",
|
||||
"runtime_hint": "npx",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"package_arguments": [
|
||||
{
|
||||
"type": "named",
|
||||
"name": "--mode",
|
||||
"description": "Operation mode",
|
||||
"default": "local",
|
||||
"choices": [
|
||||
"local",
|
||||
"cached",
|
||||
"proxy"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"remotes": [
|
||||
{
|
||||
"type": "sse",
|
||||
"url": "https://mcp.anonymous.modelcontextprotocol.io/sse",
|
||||
"headers": [
|
||||
{
|
||||
"name": "X-API-Key",
|
||||
"description": "API key for authentication",
|
||||
"is_required": true,
|
||||
"is_secret": true
|
||||
},
|
||||
{
|
||||
"name": "X-Region",
|
||||
"description": "Service region",
|
||||
"default": "us-east-1",
|
||||
"choices": [
|
||||
"us-east-1",
|
||||
"eu-west-1",
|
||||
"ap-southeast-1"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "streamable-http",
|
||||
"url": "https://mcp.anonymous.modelcontextprotocol.io/http"
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "hybrid-deployer",
|
||||
"version": "1.7.2",
|
||||
"build_info": {
|
||||
"timestamp": "2023-12-03T11:00:00Z",
|
||||
"deployment_strategy": "blue-green",
|
||||
"npm_version": "10.2.4",
|
||||
"node_version": "20.10.0",
|
||||
"service_endpoints": {
|
||||
"sse": "deployed",
|
||||
"streamable": "deployed"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### MCP Bundle (MCPB) Package Example
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "io.modelcontextprotocol/text-editor",
|
||||
"description": "MCP Bundle server for advanced text editing capabilities",
|
||||
"repository": {
|
||||
"url": "https://github.com/modelcontextprotocol/text-editor-mcpb",
|
||||
"source": "github"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "1.0.2"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "mcpb",
|
||||
"registry_base_url": "https://github.com",
|
||||
"identifier": "https://github.com/modelcontextprotocol/text-editor-mcpb/releases/download/v1.0.2/text-editor.mcpb",
|
||||
"version": "1.0.2",
|
||||
"file_sha256": "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
}
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "mcpb-publisher",
|
||||
"version": "1.0.0",
|
||||
"build_info": {
|
||||
"timestamp": "2023-12-02T09:15:00Z",
|
||||
"bundle_format": "mcpb-v1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This example shows an MCPB (MCP Bundle) package that:
|
||||
- Is hosted on GitHub Releases (an allowlisted provider)
|
||||
- Includes a SHA-256 hash for integrity verification
|
||||
- Can be downloaded and executed directly by MCP clients that support MCPB
|
||||
|
||||
### Embedded MCP inside a CLI tool
|
||||
|
||||
Some CLI tools bundle an MCP server, without a standalone MCP package or a public repository. In these cases, reuse the existing `packages` shape by pointing at the host CLI package and supplying the `package_arguments` and `runtime_hint` if needed to start the MCP server.
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
||||
"name": "io.snyk/cli-mcp",
|
||||
"description": "MCP server provided by the Snyk CLI",
|
||||
"status": "active",
|
||||
"version_detail": {
|
||||
"version": "1.1298.0"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "npm",
|
||||
"registry_base_url": "https://registry.npmjs.org",
|
||||
"identifier": "snyk",
|
||||
"version": "1.1298.0",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"package_arguments": [
|
||||
{ "type": "positional", "value": "mcp" },
|
||||
{
|
||||
"type": "named",
|
||||
"name": "-t",
|
||||
"description": "Transport type for MCP server",
|
||||
"default": "stdio",
|
||||
"choices": ["stdio", "sse"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Deprecated Server Example
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "io.github.example/old-weather",
|
||||
"description": "Legacy weather server - DEPRECATED: Use weather-v2 instead for new projects",
|
||||
"status": "deprecated",
|
||||
"repository": {
|
||||
"url": "https://github.com/example/old-weather",
|
||||
"source": "github",
|
||||
"id": "legacy-abc123-def456-789012-345678-901234567890"
|
||||
},
|
||||
"version_detail": {
|
||||
"version": "0.9.5"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"registry_type": "npm",
|
||||
"registry_base_url": "https://registry.npmjs.org",
|
||||
"identifier": "@legacy/old-weather-server",
|
||||
"version": "0.9.5",
|
||||
"transport": {
|
||||
"type": "stdio"
|
||||
},
|
||||
"environment_variables": [
|
||||
{
|
||||
"name": "WEATHER_API_KEY",
|
||||
"description": "Weather API key",
|
||||
"is_required": true,
|
||||
"is_secret": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"_meta": {
|
||||
"publisher": {
|
||||
"tool": "legacy-publisher",
|
||||
"version": "0.8.1",
|
||||
"build_info": {
|
||||
"timestamp": "2023-06-15T09:30:00Z",
|
||||
"deprecation_notice": "This publisher is deprecated. Use npm-publisher v2.0+ for new projects.",
|
||||
"maintenance_mode": true,
|
||||
"final_version": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
48
docs/reference/server-json/official-registry-requirements.md
Normal file
48
docs/reference/server-json/official-registry-requirements.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Official Registry Server.json Requirements
|
||||
|
||||
This document describes the additional requirements and validation rules that apply when publishing to the official MCP Registry at `registry.modelcontextprotocol.io`.
|
||||
|
||||
For step-by-step publishing instructions, see the [publishing guide](../../guides/publishing/publish-server.md).
|
||||
|
||||
## Overview
|
||||
|
||||
While the [generic server.json format](./generic-server-json.md) defines the base specification, the official registry enforces additional validation to ensure:
|
||||
|
||||
- **Namespace authentication** - Servers are published under appropriate namespaces
|
||||
- **Package ownership verification** - Publishers actually control referenced packages
|
||||
- **Remote server URL match** - Remote server base urls match namespaces
|
||||
- **Restricted registry base urls** - Packages are from trusted public registries
|
||||
- **`_meta` namespace restrictions** - Restricted to `publisher` key only
|
||||
|
||||
## Namespace Authentication
|
||||
|
||||
Publishers must prove ownership of their namespace. For example to publish to `com.example/server`, the publisher must prove they own the `example.com` domain.
|
||||
|
||||
See the [publishing guide](../../guides/publishing/publish-server.md) for authentication details for GitHub and domain namespaces.
|
||||
|
||||
## Package Ownership Verification
|
||||
|
||||
All packages must include metadata proving the publisher owns them. This prevents impersonation and ensures authenticity (see more reasoning in [#96](https://github.com/modelcontextprotocol/registry/issues/96)).
|
||||
|
||||
For detailed verification requirements for each registry type, see the [publishing guide](../../guides/publishing/publish-server.md).
|
||||
|
||||
## Remote Server URL Match
|
||||
|
||||
Remote servers must use URLs that match the publisher's domain from their namespace. For example, `com.example/server` can only use remote URLs on `example.com` or its subdomains.
|
||||
|
||||
## Restricted Registry Base URLs
|
||||
|
||||
Only trusted public registries are supported. Private registries and alternative mirrors are not allowed.
|
||||
|
||||
**Supported registries:**
|
||||
- **NPM**: `https://registry.npmjs.org` only
|
||||
- **PyPI**: `https://pypi.org` only
|
||||
- **NuGet**: `https://api.nuget.org` only
|
||||
- **Docker/OCI**: `https://docker.io` only
|
||||
- **MCPB**: `https://github.com` releases and `https://gitlab.com` releases only
|
||||
|
||||
## `_meta` Namespace Restrictions
|
||||
|
||||
The `_meta` field is restricted to the `publisher` key only during publishing. This `_meta.publisher` extension is currently limited to 4KB.
|
||||
|
||||
Registry metadata is added automatically and cannot be overridden.
|
||||
472
docs/reference/server-json/server.schema.json
Normal file
472
docs/reference/server-json/server.schema.json
Normal file
|
|
@ -0,0 +1,472 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
||||
"title": "MCP Server Detail",
|
||||
"$ref": "#/$defs/ServerDetail",
|
||||
"$defs": {
|
||||
"Repository": {
|
||||
"type": "object",
|
||||
"description": "Repository metadata for the MCP server source code. Enables users and security experts to inspect the code, improving transparency.",
|
||||
"required": [
|
||||
"url",
|
||||
"source"
|
||||
],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Repository URL for browsing source code. Should support both web browsing and git clone operations.",
|
||||
"example": "https://github.com/modelcontextprotocol/servers"
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "Repository hosting service identifier. Used by registries to determine validation and API access methods.",
|
||||
"example": "github"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Repository identifier from the hosting service (e.g., GitHub repo ID). Owned and determined by the source forge. Should remain stable across repository renames and may be used to detect repository resurrection attacks - if a repository is deleted and recreated, the ID should change. For GitHub, use: gh api repos/<owner>/<repo> --jq '.id'",
|
||||
"example": "b94b5f7e-c7c6-d760-2c78-a5e9b8a5b8c9"
|
||||
},
|
||||
"subfolder": {
|
||||
"type": "string",
|
||||
"description": "Optional relative path from repository root to the server location within a monorepo or nested package structure. Must be a clean relative path.",
|
||||
"example": "src/everything"
|
||||
}
|
||||
}
|
||||
},
|
||||
"VersionDetail": {
|
||||
"type": "object",
|
||||
"description": "Version information for this server. Defined as an object to allow for downstream extensibility (e.g. release_date)",
|
||||
"required": [
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"maxLength": 255,
|
||||
"example": "1.0.2",
|
||||
"description": "Version string for this server. SHOULD follow semantic versioning (e.g., '1.0.2', '2.1.0-alpha'). Equivalent of Implementation.version in MCP specification. Non-semantic versions are allowed but may not sort predictably."
|
||||
}
|
||||
}
|
||||
},
|
||||
"Server": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"description",
|
||||
"version_detail"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Server name in reverse-DNS format. Must contain exactly one forward slash separating namespace from server name.",
|
||||
"example": "io.github.user/weather",
|
||||
"pattern": "^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$",
|
||||
"minLength": 3,
|
||||
"maxLength": 200
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Clear human-readable explanation of server functionality. Should focus on capabilities, not implementation details.",
|
||||
"example": "MCP server providing weather data and forecasts via OpenWeatherMap API",
|
||||
"minLength": 1,
|
||||
"maxLength": 100
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": ["active", "deprecated", "deleted"],
|
||||
"default": "active",
|
||||
"description": "Server lifecycle status. 'deprecated' indicates the server is no longer recommended for new usage. 'deleted' indicates the server should never be installed and existing installations should be uninstalled - this is rare, and usually indicates malware or a legal takedown."
|
||||
},
|
||||
"repository": {
|
||||
"$ref": "#/$defs/Repository",
|
||||
"description": "Optional repository metadata for the MCP server source code. Recommended for transparency and security inspection."
|
||||
},
|
||||
"version_detail": {
|
||||
"$ref": "#/$defs/VersionDetail"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Package": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"registry_type": {
|
||||
"type": "string",
|
||||
"description": "Registry type indicating how to download packages (e.g., 'npm', 'pypi', 'oci', 'nuget', 'mcpb')",
|
||||
"examples": ["npm", "pypi", "oci", "nuget", "mcpb"]
|
||||
},
|
||||
"registry_base_url": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Base URL of the package registry",
|
||||
"examples": ["https://registry.npmjs.org", "https://pypi.org", "https://docker.io", "https://api.nuget.org", "https://github.com", "https://gitlab.com"]
|
||||
},
|
||||
"identifier": {
|
||||
"type": "string",
|
||||
"description": "Package identifier - either a package name (for registries) or URL (for direct downloads)",
|
||||
"examples": ["@modelcontextprotocol/server-brave-search", "https://github.com/example/releases/download/v1.0.0/package.mcpb"]
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Package version",
|
||||
"example": "1.0.2",
|
||||
"minLength": 1
|
||||
},
|
||||
"file_sha256": {
|
||||
"type": "string",
|
||||
"description": "SHA-256 hash of the package file for integrity verification.",
|
||||
"example": "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce"
|
||||
},
|
||||
"runtime_hint": {
|
||||
"type": "string",
|
||||
"description": "A hint to help clients determine the appropriate runtime for the package. This field should be provided when `runtime_arguments` are present.",
|
||||
"examples": [
|
||||
"npx",
|
||||
"uvx",
|
||||
"docker",
|
||||
"dnx"
|
||||
]
|
||||
},
|
||||
"transport": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/StdioTransport"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/StreamableHttpTransport"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/SseTransport"
|
||||
}
|
||||
],
|
||||
"description": "Transport protocol configuration for the package"
|
||||
},
|
||||
"runtime_arguments": {
|
||||
"type": "array",
|
||||
"description": "A list of arguments to be passed to the package's runtime command (such as docker or npx). The `runtime_hint` field should be provided when `runtime_arguments` are present.",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Argument"
|
||||
}
|
||||
},
|
||||
"package_arguments": {
|
||||
"type": "array",
|
||||
"description": "A list of arguments to be passed to the package's binary.",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Argument"
|
||||
}
|
||||
},
|
||||
"environment_variables": {
|
||||
"type": "array",
|
||||
"description": "A mapping of environment variables to be set when running the package.",
|
||||
"items": {
|
||||
"$ref": "#/$defs/KeyValueInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "A description of the input, which clients can use to provide context to the user.",
|
||||
"type": "string"
|
||||
},
|
||||
"is_required": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"description": "Specifies the input format. Supported values include `filepath`, which should be interpreted as a file on the user's filesystem.\n\nWhen the input is converted to a string, booleans should be represented by the strings \"true\" and \"false\", and numbers should be represented as decimal values.",
|
||||
"enum": [
|
||||
"string",
|
||||
"number",
|
||||
"boolean",
|
||||
"filepath"
|
||||
],
|
||||
"default": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "The default value for the input. If this is not set, the user may be prompted to provide a value. If a value is set, it should not be configurable by end users.\n\nIdentifiers wrapped in `{curly_braces}` will be replaced with the corresponding properties from the input `variables` map. If an identifier in braces is not found in `variables`, or if `variables` is not provided, the `{curly_braces}` substring should remain unchanged.\n"
|
||||
},
|
||||
"is_secret": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates whether the input is a secret value (e.g., password, token). If true, clients should handle the value securely.",
|
||||
"default": false
|
||||
},
|
||||
"default": {
|
||||
"type": "string",
|
||||
"description": "The default value for the input."
|
||||
},
|
||||
"choices": {
|
||||
"type": "array",
|
||||
"description": "A list of possible values for the input. If provided, the user must select one of these values.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"InputWithVariables": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/Input"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"variables": {
|
||||
"type": "object",
|
||||
"description": "A map of variable names to their values. Keys in the input `value` that are wrapped in `{curly_braces}` will be replaced with the corresponding variable values.",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/Input"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"PositionalArgument": {
|
||||
"description": "A positional input is a value inserted verbatim into the command line.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/InputWithVariables"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"positional"
|
||||
],
|
||||
"example": "positional"
|
||||
},
|
||||
"value_hint": {
|
||||
"type": "string",
|
||||
"description": "An identifier-like hint for the value. This is not part of the command line, but can be used by client configuration and to provide hints to users.",
|
||||
"example": "file_path"
|
||||
},
|
||||
"is_repeated": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the argument can be repeated multiple times in the command line.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"anyOf": [
|
||||
{
|
||||
"required": [
|
||||
"value_hint"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"NamedArgument": {
|
||||
"description": "A command-line `--flag={value}`.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/InputWithVariables"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type",
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"named"
|
||||
],
|
||||
"example": "named"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The flag name, including any leading dashes.",
|
||||
"example": "--port"
|
||||
},
|
||||
"is_repeated": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the argument can be repeated multiple times.",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"KeyValueInput": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/InputWithVariables"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name of the header or environment variable.",
|
||||
"example": "SOME_VARIABLE"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Argument": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/PositionalArgument"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/NamedArgument"
|
||||
}
|
||||
]
|
||||
},
|
||||
"StdioTransport": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"stdio"
|
||||
],
|
||||
"description": "Transport type",
|
||||
"example": "stdio"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StreamableHttpTransport": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type",
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"streamable-http"
|
||||
],
|
||||
"description": "Transport type",
|
||||
"example": "streamable-http"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "URL template for the streamable-http transport. Variables in {curly_braces} reference argument value_hints, argument names, or environment variable names. After variable substitution, this should produce a valid URI.",
|
||||
"example": "https://api.example.com/mcp"
|
||||
},
|
||||
"headers": {
|
||||
"type": "array",
|
||||
"description": "HTTP headers to include",
|
||||
"items": {
|
||||
"$ref": "#/$defs/KeyValueInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"SseTransport": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type",
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"sse"
|
||||
],
|
||||
"description": "Transport type",
|
||||
"example": "sse"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Server-Sent Events endpoint URL",
|
||||
"example": "https://mcp-fs.example.com/sse"
|
||||
},
|
||||
"headers": {
|
||||
"type": "array",
|
||||
"description": "HTTP headers to include",
|
||||
"items": {
|
||||
"$ref": "#/$defs/KeyValueInput"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ServerDetail": {
|
||||
"description": "Schema for a static representation of an MCP server. Used in various contexts related to discovery, installation, and configuration.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/Server"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "JSON Schema URI for this server.json format",
|
||||
"example": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json"
|
||||
},
|
||||
"packages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Package"
|
||||
}
|
||||
},
|
||||
"remotes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/StreamableHttpTransport"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/SseTransport"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"_meta": {
|
||||
"type": "object",
|
||||
"description": "Extension metadata using reverse DNS namespacing for vendor-specific data",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"publisher": {
|
||||
"type": "object",
|
||||
"description": "Publisher-provided metadata for downstream registries",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"io.modelcontextprotocol.registry": {
|
||||
"type": "object",
|
||||
"description": "Official MCP registry metadata (read-only, added by registry)",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue