Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/reference/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,16 @@ components:
description: "SHA-256 hash of the package file for integrity verification. Required for MCPB packages and optional for other package types. Authors are responsible for generating correct SHA-256 hashes when creating server.json. If present, MCP clients must validate the downloaded file matches the hash before running packages to ensure file integrity."
example: "fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce"
pattern: "^[a-f0-9]{64}$"
architecture:
type: string
description: "Target OS and architecture for the package (e.g., 'linux-amd64', 'darwin-arm64'). Allows clients to select the appropriate package for their platform without parsing identifiers."
examples:
- "linux-amd64"
- "linux-arm64"
- "darwin-amd64"
- "darwin-arm64"
- "windows-amd64"
- "windows-arm64"
runtimeHint:
type: string
description: A hint to help clients determine the appropriate runtime for the package. This field should be provided when `runtimeArguments` are present.
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/server-json/server.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@
},
"Package": {
"properties": {
"architecture": {
"description": "Target OS and architecture for the package (e.g., 'linux-amd64', 'darwin-arm64'). Allows clients to select the appropriate package for their platform without parsing identifiers.",
"examples": [
"linux-amd64",
"linux-arm64",
"darwin-amd64",
"darwin-arm64",
"windows-amd64",
"windows-arm64"
],
"type": "string"
},
"environmentVariables": {
"description": "A mapping of environment variables to be set when running the package.",
"items": {
Expand Down
10 changes: 10 additions & 0 deletions pkg/model/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ const (
RuntimeHintDNX = "dnx"
)

// Architecture - OS and architecture combinations for packages
const (
ArchLinuxAMD64 = "linux-amd64"
ArchLinuxARM64 = "linux-arm64"
ArchDarwinAMD64 = "darwin-amd64"
ArchDarwinARM64 = "darwin-arm64"
ArchWindowsAMD64 = "windows-amd64"
ArchWindowsARM64 = "windows-arm64"
)

// Schema versions
const (
// CurrentSchemaVersion is the current supported schema version date
Expand Down
2 changes: 2 additions & 0 deletions pkg/model/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ type Package struct {
Version string `json:"version,omitempty" minLength:"1" doc:"Package version. Must be a specific version. Version ranges are rejected (e.g., '^1.2.3', '~1.2.3', '>=1.2.3', '1.x', '1.*')." example:"1.0.2"`
// FileSHA256 is the SHA-256 hash for integrity verification (required for mcpb, optional for others)
FileSHA256 string `json:"fileSha256,omitempty" pattern:"^[a-f0-9]{64}$" doc:"SHA-256 hash of the package file for integrity verification. Required for MCPB packages and optional for other package types. Authors are responsible for generating correct SHA-256 hashes when creating server.json. If present, MCP clients must validate the downloaded file matches the hash before running packages to ensure file integrity." example:"fe333e598595000ae021bd27117db32ec69af6987f507ba7a63c90638ff633ce"`
// Architecture specifies the target OS and architecture (e.g., "linux-amd64", "darwin-arm64")
Architecture string `json:"architecture,omitempty" doc:"Target OS and architecture for the package (e.g., 'linux-amd64', 'darwin-arm64'). Allows clients to select the appropriate package for their platform without parsing identifiers." example:"linux-amd64"`
// RunTimeHint suggests the appropriate runtime for the package
RunTimeHint string `json:"runtimeHint,omitempty" doc:"A hint to help clients determine the appropriate runtime for the package. This field should be provided when runtimeArguments are present." example:"npx"`
// Transport is required and specifies the transport protocol configuration
Expand Down
Loading