mcp 0.2.0 → 0.4.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 +2 -2
- data/.github/workflows/release.yml +1 -1
- data/.rubocop.yml +3 -0
- data/AGENTS.md +119 -0
- data/CHANGELOG.md +56 -0
- data/Gemfile +7 -4
- data/README.md +393 -50
- data/examples/http_client.rb +13 -13
- data/examples/http_server.rb +14 -12
- data/examples/stdio_server.rb +4 -4
- data/examples/streamable_http_client.rb +10 -12
- data/examples/streamable_http_server.rb +32 -32
- data/lib/mcp/client/http.rb +88 -0
- data/lib/mcp/client/tool.rb +16 -0
- data/lib/mcp/client.rb +116 -0
- data/lib/mcp/configuration.rb +31 -4
- data/lib/mcp/content.rb +0 -1
- data/lib/mcp/prompt/argument.rb +9 -5
- data/lib/mcp/prompt/message.rb +0 -1
- data/lib/mcp/prompt/result.rb +0 -1
- data/lib/mcp/prompt.rb +30 -3
- data/lib/mcp/resource/contents.rb +0 -1
- data/lib/mcp/resource/embedded.rb +0 -1
- data/lib/mcp/resource.rb +8 -7
- data/lib/mcp/resource_template.rb +8 -7
- data/lib/mcp/server/transports/streamable_http_transport.rb +21 -1
- data/lib/mcp/server.rb +43 -14
- data/lib/mcp/string_utils.rb +0 -1
- data/lib/mcp/tool/annotations.rb +4 -4
- data/lib/mcp/tool/input_schema.rb +10 -2
- data/lib/mcp/tool/output_schema.rb +69 -0
- data/lib/mcp/tool/response.rb +17 -5
- data/lib/mcp/tool.rb +47 -6
- data/lib/mcp/version.rb +1 -1
- data/lib/mcp.rb +4 -0
- metadata +8 -3
- 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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Model Context Protocol
|
@@ -44,12 +44,13 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
-
- ".cursor/rules/release-changelogs.mdc"
|
48
47
|
- ".gitattributes"
|
48
|
+
- ".github/dependabot.yml"
|
49
49
|
- ".github/workflows/ci.yml"
|
50
50
|
- ".github/workflows/release.yml"
|
51
51
|
- ".gitignore"
|
52
52
|
- ".rubocop.yml"
|
53
|
+
- AGENTS.md
|
53
54
|
- CHANGELOG.md
|
54
55
|
- CODE_OF_CONDUCT.md
|
55
56
|
- Gemfile
|
@@ -67,6 +68,9 @@ files:
|
|
67
68
|
- examples/streamable_http_client.rb
|
68
69
|
- examples/streamable_http_server.rb
|
69
70
|
- lib/mcp.rb
|
71
|
+
- lib/mcp/client.rb
|
72
|
+
- lib/mcp/client/http.rb
|
73
|
+
- lib/mcp/client/tool.rb
|
70
74
|
- lib/mcp/configuration.rb
|
71
75
|
- lib/mcp/content.rb
|
72
76
|
- lib/mcp/instrumentation.rb
|
@@ -87,6 +91,7 @@ files:
|
|
87
91
|
- lib/mcp/tool.rb
|
88
92
|
- lib/mcp/tool/annotations.rb
|
89
93
|
- lib/mcp/tool/input_schema.rb
|
94
|
+
- lib/mcp/tool/output_schema.rb
|
90
95
|
- lib/mcp/tool/response.rb
|
91
96
|
- lib/mcp/transport.rb
|
92
97
|
- lib/mcp/transports/stdio.rb
|
@@ -113,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
118
|
- !ruby/object:Gem::Version
|
114
119
|
version: '0'
|
115
120
|
requirements: []
|
116
|
-
rubygems_version: 3.6.
|
121
|
+
rubygems_version: 3.6.9
|
117
122
|
specification_version: 4
|
118
123
|
summary: The official Ruby SDK for Model Context Protocol servers and clients
|
119
124
|
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
|