Skip to content
Merged
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,12 @@ Set `stateless: true` in `MCP::Server::Transports::StreamableHTTPTransport.new`
transport = MCP::Server::Transports::StreamableHTTPTransport.new(server, stateless: true)
```

### Unsupported Features ( to be implemented in future versions )
### Unsupported Features (to be implemented in future versions)

- Log Level
- Resource subscriptions
- Completions
- Elicitation

### Usage

Expand Down
3 changes: 3 additions & 0 deletions lib/mcp/methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module Methods

ROOTS_LIST = "roots/list"
SAMPLING_CREATE_MESSAGE = "sampling/createMessage"
ELICITATION_CREATE = "elicitation/create"

# Notification methods
NOTIFICATIONS_INITIALIZED = "notifications/initialized"
Expand Down Expand Up @@ -76,6 +77,8 @@ def ensure_capability!(method, capabilities)
require_capability!(method, capabilities, :roots, :listChanged)
when SAMPLING_CREATE_MESSAGE
require_capability!(method, capabilities, :sampling)
when ELICITATION_CREATE
require_capability!(method, capabilities, :elicitation)
when INITIALIZE, PING, NOTIFICATIONS_INITIALIZED, NOTIFICATIONS_PROGRESS, NOTIFICATIONS_CANCELLED
# No specific capability required for initialize, ping, progress or cancelled
end
Expand Down
1 change: 1 addition & 0 deletions lib/mcp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def initialize(
Methods::RESOURCES_UNSUBSCRIBE => ->(_) {},
Methods::COMPLETION_COMPLETE => ->(_) {},
Methods::LOGGING_SET_LEVEL => ->(_) {},
Methods::ELICITATION_CREATE => ->(_) {},
}
@transport = transport
end
Expand Down
2 changes: 2 additions & 0 deletions test/mcp/methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def ensure_capability_does_not_raise_for(method, capabilities: {})

ensure_capability_raises_error_for Methods::SAMPLING_CREATE_MESSAGE, required_capability_name: "sampling"

ensure_capability_raises_error_for Methods::ELICITATION_CREATE, required_capability_name: "elicitation"

# Methods and notifications of both server and client
ensure_capability_does_not_raise_for Methods::PING
ensure_capability_does_not_raise_for Methods::NOTIFICATIONS_PROGRESS
Expand Down