model-context-protocol-rb 0.3.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -1
  3. data/README.md +886 -196
  4. data/lib/model_context_protocol/server/cancellable.rb +54 -0
  5. data/lib/model_context_protocol/server/configuration.rb +80 -8
  6. data/lib/model_context_protocol/server/content.rb +321 -0
  7. data/lib/model_context_protocol/server/content_helpers.rb +84 -0
  8. data/lib/model_context_protocol/server/pagination.rb +71 -0
  9. data/lib/model_context_protocol/server/progressable.rb +72 -0
  10. data/lib/model_context_protocol/server/prompt.rb +108 -14
  11. data/lib/model_context_protocol/server/redis_client_proxy.rb +134 -0
  12. data/lib/model_context_protocol/server/redis_config.rb +108 -0
  13. data/lib/model_context_protocol/server/redis_pool_manager.rb +110 -0
  14. data/lib/model_context_protocol/server/registry.rb +94 -18
  15. data/lib/model_context_protocol/server/resource.rb +98 -25
  16. data/lib/model_context_protocol/server/resource_template.rb +26 -13
  17. data/lib/model_context_protocol/server/router.rb +36 -3
  18. data/lib/model_context_protocol/server/stdio_transport/request_store.rb +102 -0
  19. data/lib/model_context_protocol/server/stdio_transport.rb +31 -6
  20. data/lib/model_context_protocol/server/streamable_http_transport/event_counter.rb +35 -0
  21. data/lib/model_context_protocol/server/streamable_http_transport/message_poller.rb +101 -0
  22. data/lib/model_context_protocol/server/streamable_http_transport/notification_queue.rb +80 -0
  23. data/lib/model_context_protocol/server/streamable_http_transport/request_store.rb +224 -0
  24. data/lib/model_context_protocol/server/streamable_http_transport/session_message_queue.rb +120 -0
  25. data/lib/model_context_protocol/server/{session_store.rb → streamable_http_transport/session_store.rb} +30 -16
  26. data/lib/model_context_protocol/server/streamable_http_transport/stream_registry.rb +119 -0
  27. data/lib/model_context_protocol/server/streamable_http_transport.rb +352 -112
  28. data/lib/model_context_protocol/server/tool.rb +79 -53
  29. data/lib/model_context_protocol/server.rb +124 -21
  30. data/lib/model_context_protocol/version.rb +1 -1
  31. data/tasks/mcp.rake +28 -2
  32. data/tasks/templates/dev-http.erb +288 -0
  33. data/tasks/templates/dev.erb +7 -1
  34. metadata +61 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e004a2e471748b63aa9f5742300fd2b648aabb84d02e75949f9741f1c78aa963
4
- data.tar.gz: ecf369882f10f2cb19099d47d991ba70e6d33e0841ebda48e6917fb98780f2fb
3
+ metadata.gz: 5f97580e7f9c5723d25472b545c037bad650d82434865324c6d1dd450ac4031e
4
+ data.tar.gz: 1b73ad6036c7ded852210dc338190675e419c6f6354e027d2b7073a5e655c665
5
5
  SHA512:
6
- metadata.gz: 9fa10a6fe78390f0d8c6303efcc6135751b50a2c4dd3cc2b0ed0d07e0647e9555a3317a7b68b2794d52f9d6ac3e8e38a569bda96e20bc2e0193dadefab346dd6
7
- data.tar.gz: fda6f707e7814911a4e9175cd40fbab41f45dc775db644185e4bc2008fe71bddd83c89ed321cfeee67f93cbf7c29bc6e69b46596893e3ae2242fa757fd9f4f75
6
+ metadata.gz: 3075cfc900a60fd1cb83b973c23f6f517373f6132ab043ea64079653bbc0ecc5c5aeb8a077e2c685396f9921d80ad341f9fa271fd343fb9b9f29ce93b6abda4b
7
+ data.tar.gz: c72619fea381f8968d7dd33e60c306449973bbeda9f5a8ffd6b8d5baf95d26df8278a2106b82daeef61982a950b74b5f168a8afb680baa6e44f10d26626cac69
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.0] - 2025-09-22
4
+
5
+ - Make streamable HTTP transport thread-safe by using Redis to manage state.
6
+ - Implement Redis connection pooling with robust management and configuration.
7
+ - Automatically upgrade connection to SSE to send notifications.
8
+ - Add support for cancellations and progress notifications via `cancellable` and `progressable` blocks in prompts, resources, and tools.
9
+
10
+ ## [0.4.0] - 2025-09-07
11
+
12
+ - Implement pagination support.
13
+ - Add support for server title and instructions.
14
+ - Implement resource annotations.
15
+ - Implement content responses and helper methods for easily serializing text, image, audio, embedded resource, and resource link content blocks.
16
+ - (Breaking) Simplify the ergonomics of `respond_with`.
17
+ - (Breaking) Rename `with_metadata` to `define`; this avoids confusion with the distinct concept of metadata in MCP.
18
+ - (Breaking) Nest argument declarations within `define` (formerly `with_metadata`).
19
+ - Allow prompts, resources, and tools to declare the `title` field.
20
+ - Implement default completion functionality.
21
+ - Implement structured content support for tools (with `output_schema` declaration and validation).
22
+ - Implement a prompt builder DSL for easily building a message history for a prompt; supports use of new content block helpers.
23
+ - Implement support for protocol negotiation.
24
+ - Finalize the initial working version of the streamable HTTP transport.
25
+
3
26
  ## [0.3.4] - 2025-09-02
4
27
 
5
28
  - (Fix) Fixes broken arguments usage in prompts and tools.
@@ -51,7 +74,9 @@
51
74
 
52
75
  - Initial release
53
76
 
54
- [Unreleased]: https://github.com/dickdavis/model-context-protocol-rb/compare/v0.3.4...HEAD
77
+ [Unreleased]: https://github.com/dickdavis/model-context-protocol-rb/compare/v0.5.0...HEAD
78
+ [0.5.0]: https://github.com/dickdavis/model-context-protocol-rb/compare/v0.4.0...v0.5.0
79
+ [0.4.0]: https://github.com/dickdavis/model-context-protocol-rb/compare/v0.3.4...v0.4.0
55
80
  [0.3.4]: https://github.com/dickdavis/model-context-protocol-rb/compare/v0.3.3...v0.3.4
56
81
  [0.3.3]: https://github.com/dickdavis/model-context-protocol-rb/compare/v0.3.2...v0.3.3
57
82
  [0.3.2]: https://github.com/dickdavis/model-context-protocol-rb/compare/v0.3.1...v0.3.2