docs: update server requirements (#10)

* docs: update server requirements

* Update SERVER_REQUIREMENTS.md

---------

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>
This commit is contained in:
Paolo Ricciuti 2025-11-09 15:35:41 +01:00 • committed by GitHub
commit 78d6bec42a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,12 +31,12 @@ This document specifies requirements based on the MCP specification. All feature
### Server Identity ### Server Identity
Your server MUST provide: Your server MUST provide (can substitute your SDK name as the server name):
```typescript ```json
{ {
name: "mcp-conformance-test-server", // Or your SDK-specific name "name": "mcp-conformance-test-server",
version: "1.0.0" "version": "1.0.0"
} }
``` ```
@ -44,21 +44,21 @@ Your server MUST provide:
Your server MUST declare these capabilities during initialization: Your server MUST declare these capabilities during initialization:
```typescript ```json
{ {
capabilities: { "capabilities": {
tools: { "tools": {
listChanged: true "listChanged": true
}, },
resources: { "resources": {
subscribe: true, "subscribe": true,
listChanged: true "listChanged": true
}, },
prompts: { "prompts": {
listChanged: true "listChanged": true
}, },
logging: {}, "logging": {},
completions: {} "completions": {}
} }
} }
``` ```
@ -141,9 +141,14 @@ Implement these tools with exact names:
**Returns**: Text content **Returns**: Text content
```typescript ```json
{ {
content: [{ type: 'text', text: 'This is a simple text response for testing.' }]; "content": [
{
"type": "text",
"text": "This is a simple text response for testing."
}
]
} }
``` ```
@ -153,15 +158,15 @@ Implement these tools with exact names:
**Returns**: Image content with base64 data **Returns**: Image content with base64 data
```typescript ```json
{ {
content: [ "content": [
{ {
type: 'image', "type": "image",
data: '<base64-encoded-png>', "data": "<base64-encoded-png>",
mimeType: 'image/png' "mimeType": "image/png"
} }
]; ]
} }
``` ```
@ -173,15 +178,15 @@ Implement these tools with exact names:
**Returns**: Audio content with base64 data **Returns**: Audio content with base64 data
```typescript ```json
{ {
content: [ "content": [
{ {
type: 'audio', "type": "audio",
data: '<base64-encoded-wav>', "data": "<base64-encoded-wav>",
mimeType: 'audio/wav' "mimeType": "audio/wav"
} }
]; ]
} }
``` ```
@ -193,18 +198,18 @@ Implement these tools with exact names:
**Returns**: Embedded resource content **Returns**: Embedded resource content
```typescript ```json
{ {
content: [ "content": [
{ {
type: 'resource', "type": "resource",
resource: { "resource": {
uri: 'test://embedded-resource', "uri": "test://embedded-resource",
mimeType: 'text/plain', "mimeType": "text/plain",
text: 'This is an embedded resource content.' "text": "This is an embedded resource content."
} }
} }
]; ]
} }
``` ```
@ -214,20 +219,27 @@ Implement these tools with exact names:
**Returns**: Multiple content items (text + image + resource) **Returns**: Multiple content items (text + image + resource)
```typescript ```json
{ {
content: [ "content": [
{ type: 'text', text: 'Multiple content types test:' },
{ type: 'image', data: '<base64>', mimeType: 'image/png' },
{ {
type: 'resource', "type": "text",
resource: { "text": "Multiple content types test:"
uri: 'test://mixed-content-resource', },
mimeType: 'application/json', {
text: '{"test":"data","value":123}' "type": "image",
"data": "<base64>",
"mimeType": "image/png"
},
{
"type": "resource",
"resource": {
"uri": "test://mixed-content-resource",
"mimeType": "application/json",
"text": "{\"test\":\"data\",\"value\":123}"
} }
} }
]; ]
} }
``` ```
@ -263,13 +275,13 @@ If no progress token provided, just execute with delays.
**Progress Notification Format**: **Progress Notification Format**:
```typescript ```json
{ {
method: "notifications/progress", "method": "notifications/progress",
params: { "params": {
progressToken: <from request._meta.progressToken>, "progressToken": "<from request._meta.progressToken>",
progress: 50, "progress": 50,
total: 100 "total": 100
} }
} }
``` ```
@ -280,14 +292,17 @@ If no progress token provided, just execute with delays.
**Behavior**: Always throw an error **Behavior**: Always throw an error
**Returns**: JSON-RPC error **Returns**: JSON-RPC response with `isError: true`
```json ```json
{ {
"error": { "isError": true,
"code": -32000, "content": [
"message": "This tool intentionally returns an error for testing" {
} "type": "text",
"text": "This tool intentionally returns an error for testing"
}
]
} }
``` ```
@ -301,14 +316,17 @@ If no progress token provided, just execute with delays.
**Sampling Request**: **Sampling Request**:
```typescript ```json
{ {
"method": "sampling/createMessage", "method": "sampling/createMessage",
"params": { "params": {
"messages": [ "messages": [
{ {
"role": "user", "role": "user",
"content": { "type": "text", "text": "<prompt from arguments>" } "content": {
"type": "text",
"text": "<prompt from arguments>"
}
} }
], ],
"maxTokens": 100 "maxTokens": 100
@ -318,7 +336,7 @@ If no progress token provided, just execute with delays.
**Returns**: Text content with the LLM's response **Returns**: Text content with the LLM's response
```typescript ```json
{ {
"content": [ "content": [
{ {
@ -341,7 +359,7 @@ If no progress token provided, just execute with delays.
**Elicitation Request**: **Elicitation Request**:
```typescript ```json
{ {
"method": "elicitation/create", "method": "elicitation/create",
"params": { "params": {
@ -349,12 +367,16 @@ If no progress token provided, just execute with delays.
"requestedSchema": { "requestedSchema": {
"type": "object", "type": "object",
"properties": { "properties": {
"response": { "username": {
"type": "string", "type": "string",
"description": "User's response" "description": "User's response"
},
"email": {
"type": "string",
"description": "User's email address"
} }
}, },
"required": ["response"] "required": ["username", "email"]
} }
} }
} }
@ -362,7 +384,7 @@ If no progress token provided, just execute with delays.
**Returns**: Text content with the user's response **Returns**: Text content with the user's response
```typescript ```json
{ {
"content": [ "content": [
{ {
@ -430,26 +452,26 @@ Implement these resources with exact URIs:
**Metadata** (for `resources/list`): **Metadata** (for `resources/list`):
```typescript ```json
{ {
uri: "test://static-text", "uri": "test://static-text",
name: "Static Text Resource", "name": "Static Text Resource",
description: "A static text resource for testing", "description": "A static text resource for testing",
mimeType: "text/plain" "mimeType": "text/plain"
} }
``` ```
**Content** (for `resources/read`): **Content** (for `resources/read`):
```typescript ```json
{ {
contents: [ "contents": [
{ {
uri: 'test://static-text', "uri": "test://static-text",
mimeType: 'text/plain', "mimeType": "text/plain",
text: 'This is the content of the static text resource.' "text": "This is the content of the static text resource."
} }
]; ]
} }
``` ```
@ -459,26 +481,26 @@ Implement these resources with exact URIs:
**Metadata**: **Metadata**:
```typescript ```json
{ {
uri: "test://static-binary", "uri": "test://static-binary",
name: "Static Binary Resource", "name": "Static Binary Resource",
description: "A static binary resource (image) for testing", "description": "A static binary resource (image) for testing",
mimeType: "image/png" "mimeType": "image/png"
} }
``` ```
**Content**: **Content**:
```typescript ```json
{ {
contents: [ "contents": [
{ {
uri: 'test://static-binary', "uri": "test://static-binary",
mimeType: 'image/png', "mimeType": "image/png",
blob: '<base64-encoded-png>' "blob": "<base64-encoded-png>"
} }
]; ]
} }
``` ```
@ -488,12 +510,12 @@ Implement these resources with exact URIs:
**Metadata** (for `resources/list`): **Metadata** (for `resources/list`):
```typescript ```json
{ {
uriTemplate: "test://template/{id}/data", "uriTemplate": "test://template/{id}/data",
name: "Resource Template", "name": "Resource Template",
description: "A resource template with parameter substitution", "description": "A resource template with parameter substitution",
mimeType: "application/json" "mimeType": "application/json"
} }
``` ```
@ -501,15 +523,15 @@ Implement these resources with exact URIs:
**Content** (for `resources/read` with `uri: "test://template/123/data"`): **Content** (for `resources/read` with `uri: "test://template/123/data"`):
```typescript ```json
{ {
contents: [ "contents": [
{ {
uri: 'test://template/123/data', "uri": "test://template/123/data",
mimeType: 'application/json', "mimeType": "application/json",
text: '{"id":"123","templateTest":true,"data":"Data for ID: 123"}' "text": "{\"id\":\"123\",\"templateTest\":true,\"data\":\"Data for ID: 123\"}"
} }
]; ]
} }
``` ```
@ -521,26 +543,26 @@ Implement these resources with exact URIs:
**Metadata**: **Metadata**:
```typescript ```json
{ {
uri: "test://watched-resource", "uri": "test://watched-resource",
name: "Watched Resource", "name": "Watched Resource",
description: "A resource that can be subscribed to", "description": "A resource that can be subscribed to",
mimeType: "text/plain" "mimeType": "text/plain"
} }
``` ```
**Content**: **Content**:
```typescript ```json
{ {
contents: [ "contents": [
{ {
uri: 'test://watched-resource', "uri": "test://watched-resource",
mimeType: 'text/plain', "mimeType": "text/plain",
text: 'Watched resource content' "text": "Watched resource content"
} }
]; ]
} }
``` ```
@ -612,17 +634,17 @@ Implement these prompts with exact names:
**Returns**: **Returns**:
```typescript ```json
{ {
messages: [ "messages": [
{ {
role: 'user', "role": "user",
content: { "content": {
type: 'text', "type": "text",
text: 'This is a simple prompt for testing.' "text": "This is a simple prompt for testing."
} }
} }
]; ]
} }
``` ```
@ -635,30 +657,38 @@ Implement these prompts with exact names:
**Metadata** (for `prompts/list`): **Metadata** (for `prompts/list`):
```typescript ```json
{ {
name: "test_prompt_with_arguments", "name": "test_prompt_with_arguments",
description: "A prompt with required arguments", "description": "A prompt with required arguments",
arguments: [ "arguments": [
{ name: "arg1", description: "First test argument", required: true }, {
{ name: "arg2", description: "Second test argument", required: true } "name": "arg1",
"description": "First test argument",
"required": true
},
{
"name": "arg2",
"description": "Second test argument",
"required": true
}
] ]
} }
``` ```
**Returns** (with args `{arg1: "hello", arg2: "world"}`): **Returns** (with args `{arg1: "hello", arg2: "world"}`):
```typescript ```json
{ {
messages: [ "messages": [
{ {
role: 'user', "role": "user",
content: { "content": {
type: 'text', "type": "text",
text: "Prompt with arguments: arg1='hello', arg2='world'" "text": "Prompt with arguments: arg1='hello', arg2='world'"
} }
} }
]; ]
} }
``` ```
@ -670,28 +700,28 @@ Implement these prompts with exact names:
**Returns**: **Returns**:
```typescript ```json
{ {
messages: [ "messages": [
{ {
role: 'user', "role": "user",
content: { "content": {
type: 'resource', "type": "resource",
resource: { "resource": {
uri: '<resourceUri from arguments>', "uri": "<resourceUri from arguments>",
mimeType: 'text/plain', "mimeType": "text/plain",
text: 'Embedded resource content for testing.' "text": "Embedded resource content for testing."
} }
} }
}, },
{ {
role: 'user', "role": "user",
content: { "content": {
type: 'text', "type": "text",
text: 'Please process the embedded resource above.' "text": "Please process the embedded resource above."
} }
} }
]; ]
} }
``` ```
@ -701,25 +731,25 @@ Implement these prompts with exact names:
**Returns**: **Returns**:
```typescript ```json
{ {
messages: [ "messages": [
{ {
role: 'user', "role": "user",
content: { "content": {
type: 'image', "type": "image",
data: '<base64-encoded-png>', "data": "<base64-encoded-png>",
mimeType: 'image/png' "mimeType": "image/png"
} }
}, },
{ {
role: 'user', "role": "user",
content: { "content": {
type: 'text', "type": "text",
text: 'Please analyze the image above.' "text": "Please analyze the image above."
} }
} }
]; ]
} }
``` ```
@ -762,13 +792,13 @@ Implement these prompts with exact names:
**Example**: **Example**:
```typescript ```json
{ {
method: "notifications/message", "method": "notifications/message",
params: { "params": {
level: "info", "level": "info",
logger: "conformance-test-server", "logger": "conformance-test-server",
data: "Tool execution started" "data": "Tool execution started"
} }
} }
``` ```
@ -805,21 +835,21 @@ mcpServer.server
**Request Format**: **Request Format**:
```typescript ```json
{ {
"method": "tools/list", // or resources/list, prompts/list, etc. "method": "tools/list",
"params": { "params": {
"cursor": "optional-opaque-token" // Optional: for subsequent pages "cursor": "optional-opaque-token"
} }
} }
``` ```
**Response Format**: **Response Format**:
```typescript ```json
{ {
"tools": [ /* array of tools */ ], // or resources, prompts, etc. "tools": [],
"nextCursor": "optional-opaque-token" // Optional: indicates more results available "nextCursor": "optional-opaque-token"
} }
``` ```
@ -833,7 +863,7 @@ mcpServer.server
**Example**: **Example**:
```typescript ```ts
// First request (no cursor) // First request (no cursor)
Request: { "method": "tools/list" } Request: { "method": "tools/list" }
Response: { Response: {
@ -872,17 +902,17 @@ Response: {
**Request Format**: **Request Format**:
```typescript ```json
{ {
"method": "completion/complete", "method": "completion/complete",
"params": { "params": {
"ref": { "ref": {
"type": "ref/prompt", // or "ref/resource" "type": "ref/prompt",
"name": "test_prompt_with_arguments" // or uri for resources "name": "test_prompt_with_arguments"
}, },
"argument": { "argument": {
"name": "arg1", "name": "arg1",
"value": "par" // partial value to complete "value": "par"
} }
} }
} }
@ -890,12 +920,12 @@ Response: {
**Response Format**: **Response Format**:
```typescript ```json
{ {
"completion": { "completion": {
"values": ["paris", "park", "party"], // Up to 100 items "values": ["paris", "park", "party"],
"total": 150, // Optional: total available matches "total": 150,
"hasMore": true // Optional: indicates more results exist "hasMore": true
} }
} }
``` ```