mcp 0.3.0 → 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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/ci.yml +22 -7
- data/.github/workflows/release.yml +34 -2
- data/.rubocop.yml +3 -0
- data/AGENTS.md +107 -0
- data/CHANGELOG.md +58 -0
- data/Gemfile +6 -4
- data/README.md +135 -39
- data/RELEASE.md +12 -0
- data/bin/generate-gh-pages.sh +119 -0
- data/dev.yml +1 -2
- data/docs/_config.yml +6 -0
- data/docs/index.md +7 -0
- data/docs/latest/index.html +19 -0
- data/examples/http_server.rb +0 -2
- data/examples/stdio_server.rb +0 -1
- data/examples/streamable_http_server.rb +0 -2
- data/lib/json_rpc_handler.rb +151 -0
- data/lib/mcp/client/http.rb +23 -7
- data/lib/mcp/client.rb +62 -5
- data/lib/mcp/configuration.rb +38 -14
- data/lib/mcp/content.rb +2 -3
- data/lib/mcp/icon.rb +22 -0
- data/lib/mcp/instrumentation.rb +1 -1
- data/lib/mcp/methods.rb +3 -0
- data/lib/mcp/prompt/argument.rb +9 -5
- data/lib/mcp/prompt/message.rb +1 -2
- data/lib/mcp/prompt/result.rb +1 -2
- data/lib/mcp/prompt.rb +32 -4
- data/lib/mcp/resource/contents.rb +1 -2
- data/lib/mcp/resource/embedded.rb +1 -2
- data/lib/mcp/resource.rb +4 -3
- data/lib/mcp/resource_template.rb +4 -3
- data/lib/mcp/server/transports/streamable_http_transport.rb +96 -18
- data/lib/mcp/server.rb +92 -26
- data/lib/mcp/string_utils.rb +3 -4
- data/lib/mcp/tool/annotations.rb +1 -1
- data/lib/mcp/tool/input_schema.rb +6 -52
- data/lib/mcp/tool/output_schema.rb +3 -51
- data/lib/mcp/tool/response.rb +5 -4
- data/lib/mcp/tool/schema.rb +65 -0
- data/lib/mcp/tool.rb +47 -8
- data/lib/mcp/version.rb +1 -1
- data/lib/mcp.rb +2 -0
- data/mcp.gemspec +5 -2
- metadata +16 -18
- data/.cursor/rules/release-changelogs.mdc +0 -17
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Model Context Protocol
|
|
@@ -9,20 +9,6 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
-
name: json_rpc_handler
|
|
14
|
-
requirement: !ruby/object:Gem::Requirement
|
|
15
|
-
requirements:
|
|
16
|
-
- - "~>"
|
|
17
|
-
- !ruby/object:Gem::Version
|
|
18
|
-
version: '0.1'
|
|
19
|
-
type: :runtime
|
|
20
|
-
prerelease: false
|
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
-
requirements:
|
|
23
|
-
- - "~>"
|
|
24
|
-
- !ruby/object:Gem::Version
|
|
25
|
-
version: '0.1'
|
|
26
12
|
- !ruby/object:Gem::Dependency
|
|
27
13
|
name: json-schema
|
|
28
14
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -44,34 +30,42 @@ executables: []
|
|
|
44
30
|
extensions: []
|
|
45
31
|
extra_rdoc_files: []
|
|
46
32
|
files:
|
|
47
|
-
- ".cursor/rules/release-changelogs.mdc"
|
|
48
33
|
- ".gitattributes"
|
|
34
|
+
- ".github/dependabot.yml"
|
|
49
35
|
- ".github/workflows/ci.yml"
|
|
50
36
|
- ".github/workflows/release.yml"
|
|
51
37
|
- ".gitignore"
|
|
52
38
|
- ".rubocop.yml"
|
|
39
|
+
- AGENTS.md
|
|
53
40
|
- CHANGELOG.md
|
|
54
41
|
- CODE_OF_CONDUCT.md
|
|
55
42
|
- Gemfile
|
|
56
43
|
- LICENSE.txt
|
|
57
44
|
- README.md
|
|
45
|
+
- RELEASE.md
|
|
58
46
|
- Rakefile
|
|
59
47
|
- bin/console
|
|
48
|
+
- bin/generate-gh-pages.sh
|
|
60
49
|
- bin/rake
|
|
61
50
|
- bin/setup
|
|
62
51
|
- dev.yml
|
|
52
|
+
- docs/_config.yml
|
|
53
|
+
- docs/index.md
|
|
54
|
+
- docs/latest/index.html
|
|
63
55
|
- examples/README.md
|
|
64
56
|
- examples/http_client.rb
|
|
65
57
|
- examples/http_server.rb
|
|
66
58
|
- examples/stdio_server.rb
|
|
67
59
|
- examples/streamable_http_client.rb
|
|
68
60
|
- examples/streamable_http_server.rb
|
|
61
|
+
- lib/json_rpc_handler.rb
|
|
69
62
|
- lib/mcp.rb
|
|
70
63
|
- lib/mcp/client.rb
|
|
71
64
|
- lib/mcp/client/http.rb
|
|
72
65
|
- lib/mcp/client/tool.rb
|
|
73
66
|
- lib/mcp/configuration.rb
|
|
74
67
|
- lib/mcp/content.rb
|
|
68
|
+
- lib/mcp/icon.rb
|
|
75
69
|
- lib/mcp/instrumentation.rb
|
|
76
70
|
- lib/mcp/methods.rb
|
|
77
71
|
- lib/mcp/prompt.rb
|
|
@@ -92,6 +86,7 @@ files:
|
|
|
92
86
|
- lib/mcp/tool/input_schema.rb
|
|
93
87
|
- lib/mcp/tool/output_schema.rb
|
|
94
88
|
- lib/mcp/tool/response.rb
|
|
89
|
+
- lib/mcp/tool/schema.rb
|
|
95
90
|
- lib/mcp/transport.rb
|
|
96
91
|
- lib/mcp/transports/stdio.rb
|
|
97
92
|
- lib/mcp/version.rb
|
|
@@ -101,8 +96,11 @@ licenses:
|
|
|
101
96
|
- MIT
|
|
102
97
|
metadata:
|
|
103
98
|
allowed_push_host: https://rubygems.org
|
|
99
|
+
changelog_uri: https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.5.0
|
|
104
100
|
homepage_uri: https://github.com/modelcontextprotocol/ruby-sdk
|
|
105
101
|
source_code_uri: https://github.com/modelcontextprotocol/ruby-sdk
|
|
102
|
+
bug_tracker_uri: https://github.com/modelcontextprotocol/ruby-sdk/issues
|
|
103
|
+
documentation_uri: https://rubydoc.info/gems/mcp
|
|
106
104
|
rdoc_options: []
|
|
107
105
|
require_paths:
|
|
108
106
|
- lib
|
|
@@ -110,14 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
110
108
|
requirements:
|
|
111
109
|
- - ">="
|
|
112
110
|
- !ruby/object:Gem::Version
|
|
113
|
-
version:
|
|
111
|
+
version: 2.7.0
|
|
114
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
113
|
requirements:
|
|
116
114
|
- - ">="
|
|
117
115
|
- !ruby/object:Gem::Version
|
|
118
116
|
version: '0'
|
|
119
117
|
requirements: []
|
|
120
|
-
rubygems_version:
|
|
118
|
+
rubygems_version: 4.0.3
|
|
121
119
|
specification_version: 4
|
|
122
120
|
summary: The official Ruby SDK for Model Context Protocol servers and clients
|
|
123
121
|
test_files: []
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Updating CHANGELOG.md before cutting a new release of the gem
|
|
3
|
-
globs: CHANGELOG.md
|
|
4
|
-
alwaysApply: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
- start by refreshing your knowledge on the Keep a Changelog convention by reading the format spec referenced at the top of CHANGELOG.md
|
|
8
|
-
- stick to Keep a Changelog
|
|
9
|
-
- entries should be terse and in a top-level flat list: do not nest
|
|
10
|
-
- follow this format for entries:
|
|
11
|
-
- Terse description of the change (#nnn)
|
|
12
|
-
- git tags are used to mark the commit that cut a new release of the gem
|
|
13
|
-
- the gem version is located in [version.rb](mdc:lib/mcp/version.rb)
|
|
14
|
-
- use the git history, especially merge commits from PRs to construct the changelog
|
|
15
|
-
- when necessary, look at the diff of files changed to determine the true nature of the change
|
|
16
|
-
- maintenance PRs that don't concern end users of the gem should not be listed in the changelog
|
|
17
|
-
- when checking PRs, see if there's an upstream remote, and if so, fetch PRs from upstream instead of origin
|