mcp_on_ruby 0.3.0 → 2.0.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/CHANGELOG.md +90 -26
- data/LICENSE.txt +2 -2
- data/README.md +308 -462
- data/config/routes.rb +5 -0
- data/lib/generators/mcp_on_ruby/expose/expose_generator.rb +108 -0
- data/lib/generators/mcp_on_ruby/install/install_generator.rb +37 -0
- data/lib/generators/mcp_on_ruby/install/templates/initializer.rb +22 -0
- data/lib/mcp_on_ruby/call_context.rb +29 -0
- data/lib/mcp_on_ruby/configuration.rb +78 -0
- data/lib/mcp_on_ruby/controller.rb +60 -0
- data/lib/mcp_on_ruby/declaration.rb +24 -0
- data/lib/mcp_on_ruby/dispatcher.rb +97 -0
- data/lib/mcp_on_ruby/doctor.rb +67 -0
- data/lib/mcp_on_ruby/endpoint.rb +43 -0
- data/lib/mcp_on_ruby/engine.rb +29 -0
- data/lib/mcp_on_ruby/registry.rb +146 -0
- data/lib/mcp_on_ruby/result.rb +83 -0
- data/lib/mcp_on_ruby/rspec.rb +8 -0
- data/lib/mcp_on_ruby/schema.rb +149 -0
- data/lib/mcp_on_ruby/server_factory.rb +66 -0
- data/lib/mcp_on_ruby/stdio.rb +42 -0
- data/lib/mcp_on_ruby/test_helper.rb +86 -0
- data/lib/mcp_on_ruby/tool_spec.rb +87 -0
- data/lib/mcp_on_ruby/tool_table.rb +31 -0
- data/lib/mcp_on_ruby/version.rb +5 -0
- data/lib/mcp_on_ruby/warden_hook.rb +21 -0
- data/lib/mcp_on_ruby.rb +64 -0
- data/lib/tasks/mcp_on_ruby.rake +20 -0
- metadata +63 -245
- data/CODE_OF_CONDUCT.md +0 -84
- data/CONTRIBUTING.md +0 -92
- data/lib/ruby_mcp/client.rb +0 -43
- data/lib/ruby_mcp/configuration.rb +0 -90
- data/lib/ruby_mcp/errors.rb +0 -17
- data/lib/ruby_mcp/models/context.rb +0 -52
- data/lib/ruby_mcp/models/engine.rb +0 -31
- data/lib/ruby_mcp/models/message.rb +0 -60
- data/lib/ruby_mcp/providers/anthropic.rb +0 -269
- data/lib/ruby_mcp/providers/base.rb +0 -57
- data/lib/ruby_mcp/providers/openai.rb +0 -265
- data/lib/ruby_mcp/schemas.rb +0 -56
- data/lib/ruby_mcp/server/app.rb +0 -84
- data/lib/ruby_mcp/server/base_controller.rb +0 -49
- data/lib/ruby_mcp/server/content_controller.rb +0 -68
- data/lib/ruby_mcp/server/contexts_controller.rb +0 -67
- data/lib/ruby_mcp/server/controller.rb +0 -29
- data/lib/ruby_mcp/server/engines_controller.rb +0 -34
- data/lib/ruby_mcp/server/generate_controller.rb +0 -140
- data/lib/ruby_mcp/server/messages_controller.rb +0 -30
- data/lib/ruby_mcp/server/router.rb +0 -84
- data/lib/ruby_mcp/storage/active_record.rb +0 -414
- data/lib/ruby_mcp/storage/base.rb +0 -43
- data/lib/ruby_mcp/storage/error.rb +0 -8
- data/lib/ruby_mcp/storage/memory.rb +0 -69
- data/lib/ruby_mcp/storage/redis.rb +0 -197
- data/lib/ruby_mcp/storage_factory.rb +0 -43
- data/lib/ruby_mcp/validator.rb +0 -45
- data/lib/ruby_mcp/version.rb +0 -6
- data/lib/ruby_mcp.rb +0 -71
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module McpOnRuby
|
|
4
|
+
# Signs in the stdio user for Warden and Devise apps, for the duration of one dispatched request.
|
|
5
|
+
#
|
|
6
|
+
# The user is read from the request env, never from a header, so HTTP clients cannot set it.
|
|
7
|
+
# Nothing is written to the session.
|
|
8
|
+
module WardenHook
|
|
9
|
+
module_function
|
|
10
|
+
|
|
11
|
+
def install!
|
|
12
|
+
return if @installed || !defined?(::Warden::Manager)
|
|
13
|
+
|
|
14
|
+
::Warden::Manager.on_request do |proxy|
|
|
15
|
+
user = proxy.env[McpOnRuby::USER_ENV_KEY]
|
|
16
|
+
proxy.set_user(user, scope: McpOnRuby.configuration.warden_scope, store: false, run_callbacks: false) if user
|
|
17
|
+
end
|
|
18
|
+
@installed = true
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/mcp_on_ruby.rb
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "mcp"
|
|
4
|
+
require "active_support"
|
|
5
|
+
require "active_support/core_ext"
|
|
6
|
+
require "mcp_on_ruby/version"
|
|
7
|
+
|
|
8
|
+
# MCP on Ruby exposes Rails controller actions as Model Context Protocol tools.
|
|
9
|
+
module McpOnRuby
|
|
10
|
+
class Error < StandardError; end
|
|
11
|
+
|
|
12
|
+
# Raised when tool declarations cannot be served, for example a typo in an action name.
|
|
13
|
+
class ConfigurationError < Error; end
|
|
14
|
+
|
|
15
|
+
# Rack env key set on requests dispatched by an MCP tool call; holds the tool name.
|
|
16
|
+
TOOL_ENV_KEY = "mcp_on_ruby.tool"
|
|
17
|
+
|
|
18
|
+
# Rack env key holding the user a local (stdio) session acts as.
|
|
19
|
+
USER_ENV_KEY = "mcp_on_ruby.user"
|
|
20
|
+
|
|
21
|
+
autoload :CallContext, "mcp_on_ruby/call_context"
|
|
22
|
+
autoload :Configuration, "mcp_on_ruby/configuration"
|
|
23
|
+
autoload :Controller, "mcp_on_ruby/controller"
|
|
24
|
+
autoload :Declaration, "mcp_on_ruby/declaration"
|
|
25
|
+
autoload :Dispatcher, "mcp_on_ruby/dispatcher"
|
|
26
|
+
autoload :Doctor, "mcp_on_ruby/doctor"
|
|
27
|
+
autoload :Endpoint, "mcp_on_ruby/endpoint"
|
|
28
|
+
autoload :Registry, "mcp_on_ruby/registry"
|
|
29
|
+
autoload :Result, "mcp_on_ruby/result"
|
|
30
|
+
autoload :Schema, "mcp_on_ruby/schema"
|
|
31
|
+
autoload :ServerFactory, "mcp_on_ruby/server_factory"
|
|
32
|
+
autoload :Stdio, "mcp_on_ruby/stdio"
|
|
33
|
+
autoload :ToolTable, "mcp_on_ruby/tool_table"
|
|
34
|
+
autoload :TestHelper, "mcp_on_ruby/test_helper"
|
|
35
|
+
autoload :ToolSpec, "mcp_on_ruby/tool_spec"
|
|
36
|
+
autoload :WardenHook, "mcp_on_ruby/warden_hook"
|
|
37
|
+
|
|
38
|
+
class << self
|
|
39
|
+
def configuration
|
|
40
|
+
@configuration ||= Configuration.new
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# The tools exposed by the running application.
|
|
44
|
+
def registry
|
|
45
|
+
@registry ||= Registry.new
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Builds MCP servers for HTTP requests and stdio sessions.
|
|
49
|
+
def server_factory
|
|
50
|
+
@server_factory ||= ServerFactory.new
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def configure
|
|
54
|
+
yield configuration
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Restores the default configuration. Intended for tests.
|
|
58
|
+
def reset_configuration!
|
|
59
|
+
@configuration = Configuration.new
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
require "mcp_on_ruby/engine" if defined?(Rails::Engine)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
namespace :mcp do
|
|
4
|
+
desc "Serve this app's MCP tools over stdio for local agents"
|
|
5
|
+
task stdio: :environment do
|
|
6
|
+
McpOnRuby::Stdio.run
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
desc "List the controller actions exposed as MCP tools"
|
|
10
|
+
task tools: :environment do
|
|
11
|
+
print McpOnRuby::ToolTable.render(McpOnRuby.registry.tools)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
desc "Check the MCP on Ruby setup"
|
|
15
|
+
task doctor: :environment do
|
|
16
|
+
doctor = McpOnRuby::Doctor.new.run
|
|
17
|
+
print doctor.report
|
|
18
|
+
exit(1) unless doctor.ok?
|
|
19
|
+
end
|
|
20
|
+
end
|
metadata
CHANGED
|
@@ -1,256 +1,79 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mcp_on_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nagendra Dhanakeerthi
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-10-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: actionpack
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1
|
|
20
|
-
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.2'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: dry-schema
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - "~>"
|
|
19
|
+
version: '7.1'
|
|
20
|
+
- - "<"
|
|
32
21
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
22
|
+
version: '9'
|
|
34
23
|
type: :runtime
|
|
35
24
|
prerelease: false
|
|
36
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
26
|
requirements:
|
|
38
|
-
- - "
|
|
27
|
+
- - ">="
|
|
39
28
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '1
|
|
41
|
-
-
|
|
42
|
-
name: faraday
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '2.7'
|
|
48
|
-
type: :runtime
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
29
|
+
version: '7.1'
|
|
30
|
+
- - "<"
|
|
53
31
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
32
|
+
version: '9'
|
|
55
33
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
34
|
+
name: mcp
|
|
57
35
|
requirement: !ruby/object:Gem::Requirement
|
|
58
36
|
requirements:
|
|
59
37
|
- - "~>"
|
|
60
38
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
62
|
-
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '3.0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: jwt
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - "~>"
|
|
39
|
+
version: '1.8'
|
|
40
|
+
- - ">="
|
|
74
41
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
42
|
+
version: 1.8.2
|
|
76
43
|
type: :runtime
|
|
77
44
|
prerelease: false
|
|
78
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
46
|
requirements:
|
|
80
47
|
- - "~>"
|
|
81
48
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
83
|
-
-
|
|
84
|
-
name: rack
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - "~>"
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '2.2'
|
|
90
|
-
type: :runtime
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - "~>"
|
|
49
|
+
version: '1.8'
|
|
50
|
+
- - ">="
|
|
95
51
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
52
|
+
version: 1.8.2
|
|
97
53
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
54
|
+
name: railties
|
|
99
55
|
requirement: !ruby/object:Gem::Requirement
|
|
100
56
|
requirements:
|
|
101
|
-
- - "
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1.1'
|
|
104
|
-
type: :runtime
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
57
|
+
- - ">="
|
|
109
58
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
111
|
-
-
|
|
112
|
-
name: webrick
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - "~>"
|
|
59
|
+
version: '7.1'
|
|
60
|
+
- - "<"
|
|
116
61
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
62
|
+
version: '9'
|
|
118
63
|
type: :runtime
|
|
119
64
|
prerelease: false
|
|
120
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
66
|
requirements:
|
|
122
|
-
- - "
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '1.7'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: redis
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - "~>"
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: '5.0'
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - "~>"
|
|
67
|
+
- - ">="
|
|
137
68
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
139
|
-
-
|
|
140
|
-
name: activerecord
|
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
|
142
|
-
requirements:
|
|
143
|
-
- - "~>"
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: '6.1'
|
|
146
|
-
type: :development
|
|
147
|
-
prerelease: false
|
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
-
requirements:
|
|
150
|
-
- - "~>"
|
|
151
|
-
- !ruby/object:Gem::Version
|
|
152
|
-
version: '6.1'
|
|
153
|
-
- !ruby/object:Gem::Dependency
|
|
154
|
-
name: sqlite3
|
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
|
156
|
-
requirements:
|
|
157
|
-
- - "~>"
|
|
158
|
-
- !ruby/object:Gem::Version
|
|
159
|
-
version: '1.4'
|
|
160
|
-
type: :development
|
|
161
|
-
prerelease: false
|
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
-
requirements:
|
|
164
|
-
- - "~>"
|
|
165
|
-
- !ruby/object:Gem::Version
|
|
166
|
-
version: '1.4'
|
|
167
|
-
- !ruby/object:Gem::Dependency
|
|
168
|
-
name: codecov
|
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
|
170
|
-
requirements:
|
|
171
|
-
- - "~>"
|
|
172
|
-
- !ruby/object:Gem::Version
|
|
173
|
-
version: 0.6.0
|
|
174
|
-
type: :development
|
|
175
|
-
prerelease: false
|
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
-
requirements:
|
|
178
|
-
- - "~>"
|
|
179
|
-
- !ruby/object:Gem::Version
|
|
180
|
-
version: 0.6.0
|
|
181
|
-
- !ruby/object:Gem::Dependency
|
|
182
|
-
name: rack-test
|
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
|
184
|
-
requirements:
|
|
185
|
-
- - "~>"
|
|
186
|
-
- !ruby/object:Gem::Version
|
|
187
|
-
version: '2.1'
|
|
188
|
-
type: :development
|
|
189
|
-
prerelease: false
|
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
-
requirements:
|
|
192
|
-
- - "~>"
|
|
193
|
-
- !ruby/object:Gem::Version
|
|
194
|
-
version: '2.1'
|
|
195
|
-
- !ruby/object:Gem::Dependency
|
|
196
|
-
name: simplecov
|
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
|
198
|
-
requirements:
|
|
199
|
-
- - "~>"
|
|
200
|
-
- !ruby/object:Gem::Version
|
|
201
|
-
version: 0.21.2
|
|
202
|
-
type: :development
|
|
203
|
-
prerelease: false
|
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
205
|
-
requirements:
|
|
206
|
-
- - "~>"
|
|
207
|
-
- !ruby/object:Gem::Version
|
|
208
|
-
version: 0.21.2
|
|
209
|
-
- !ruby/object:Gem::Dependency
|
|
210
|
-
name: simplecov-cobertura
|
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
|
212
|
-
requirements:
|
|
213
|
-
- - "~>"
|
|
214
|
-
- !ruby/object:Gem::Version
|
|
215
|
-
version: '2.1'
|
|
216
|
-
type: :development
|
|
217
|
-
prerelease: false
|
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
219
|
-
requirements:
|
|
220
|
-
- - "~>"
|
|
221
|
-
- !ruby/object:Gem::Version
|
|
222
|
-
version: '2.1'
|
|
223
|
-
- !ruby/object:Gem::Dependency
|
|
224
|
-
name: vcr
|
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
|
226
|
-
requirements:
|
|
227
|
-
- - "~>"
|
|
228
|
-
- !ruby/object:Gem::Version
|
|
229
|
-
version: '6.1'
|
|
230
|
-
type: :development
|
|
231
|
-
prerelease: false
|
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
233
|
-
requirements:
|
|
234
|
-
- - "~>"
|
|
235
|
-
- !ruby/object:Gem::Version
|
|
236
|
-
version: '6.1'
|
|
237
|
-
- !ruby/object:Gem::Dependency
|
|
238
|
-
name: webmock
|
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
|
240
|
-
requirements:
|
|
241
|
-
- - "~>"
|
|
242
|
-
- !ruby/object:Gem::Version
|
|
243
|
-
version: '3.18'
|
|
244
|
-
type: :development
|
|
245
|
-
prerelease: false
|
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
247
|
-
requirements:
|
|
248
|
-
- - "~>"
|
|
69
|
+
version: '7.1'
|
|
70
|
+
- - "<"
|
|
249
71
|
- !ruby/object:Gem::Version
|
|
250
|
-
version: '
|
|
251
|
-
description:
|
|
252
|
-
|
|
253
|
-
|
|
72
|
+
version: '9'
|
|
73
|
+
description: MCP on Ruby exposes existing Rails controller actions as Model Context
|
|
74
|
+
Protocol (MCP) tools. Agents call your app through the same routes, authentication,
|
|
75
|
+
policies, params, and JSON responses your users already rely on. Built on the official
|
|
76
|
+
mcp gem; serves Streamable HTTP and stdio.
|
|
254
77
|
email:
|
|
255
78
|
- nagendra.dhanakeerthi@gmail.com
|
|
256
79
|
executables: []
|
|
@@ -258,46 +81,41 @@ extensions: []
|
|
|
258
81
|
extra_rdoc_files: []
|
|
259
82
|
files:
|
|
260
83
|
- CHANGELOG.md
|
|
261
|
-
- CODE_OF_CONDUCT.md
|
|
262
|
-
- CONTRIBUTING.md
|
|
263
84
|
- LICENSE.txt
|
|
264
85
|
- README.md
|
|
265
|
-
-
|
|
266
|
-
- lib/
|
|
267
|
-
- lib/
|
|
268
|
-
- lib/
|
|
269
|
-
- lib/
|
|
270
|
-
- lib/
|
|
271
|
-
- lib/
|
|
272
|
-
- lib/
|
|
273
|
-
- lib/
|
|
274
|
-
- lib/
|
|
275
|
-
- lib/
|
|
276
|
-
- lib/
|
|
277
|
-
- lib/
|
|
278
|
-
- lib/
|
|
279
|
-
- lib/
|
|
280
|
-
- lib/
|
|
281
|
-
- lib/
|
|
282
|
-
- lib/
|
|
283
|
-
- lib/
|
|
284
|
-
- lib/
|
|
285
|
-
- lib/
|
|
286
|
-
- lib/
|
|
287
|
-
- lib/
|
|
288
|
-
- lib/
|
|
289
|
-
- lib/
|
|
290
|
-
- lib/ruby_mcp/storage_factory.rb
|
|
291
|
-
- lib/ruby_mcp/validator.rb
|
|
292
|
-
- lib/ruby_mcp/version.rb
|
|
86
|
+
- config/routes.rb
|
|
87
|
+
- lib/generators/mcp_on_ruby/expose/expose_generator.rb
|
|
88
|
+
- lib/generators/mcp_on_ruby/install/install_generator.rb
|
|
89
|
+
- lib/generators/mcp_on_ruby/install/templates/initializer.rb
|
|
90
|
+
- lib/mcp_on_ruby.rb
|
|
91
|
+
- lib/mcp_on_ruby/call_context.rb
|
|
92
|
+
- lib/mcp_on_ruby/configuration.rb
|
|
93
|
+
- lib/mcp_on_ruby/controller.rb
|
|
94
|
+
- lib/mcp_on_ruby/declaration.rb
|
|
95
|
+
- lib/mcp_on_ruby/dispatcher.rb
|
|
96
|
+
- lib/mcp_on_ruby/doctor.rb
|
|
97
|
+
- lib/mcp_on_ruby/endpoint.rb
|
|
98
|
+
- lib/mcp_on_ruby/engine.rb
|
|
99
|
+
- lib/mcp_on_ruby/registry.rb
|
|
100
|
+
- lib/mcp_on_ruby/result.rb
|
|
101
|
+
- lib/mcp_on_ruby/rspec.rb
|
|
102
|
+
- lib/mcp_on_ruby/schema.rb
|
|
103
|
+
- lib/mcp_on_ruby/server_factory.rb
|
|
104
|
+
- lib/mcp_on_ruby/stdio.rb
|
|
105
|
+
- lib/mcp_on_ruby/test_helper.rb
|
|
106
|
+
- lib/mcp_on_ruby/tool_spec.rb
|
|
107
|
+
- lib/mcp_on_ruby/tool_table.rb
|
|
108
|
+
- lib/mcp_on_ruby/version.rb
|
|
109
|
+
- lib/mcp_on_ruby/warden_hook.rb
|
|
110
|
+
- lib/tasks/mcp_on_ruby.rake
|
|
293
111
|
homepage: https://github.com/nagstler/mcp_on_ruby
|
|
294
112
|
licenses:
|
|
295
113
|
- MIT
|
|
296
114
|
metadata:
|
|
297
|
-
|
|
298
|
-
homepage_uri: https://github.com/nagstler/mcp_on_ruby
|
|
299
|
-
source_code_uri: https://github.com/nagstler/mcp_on_ruby
|
|
115
|
+
source_code_uri: https://github.com/nagstler/mcp_on_ruby/tree/main
|
|
300
116
|
changelog_uri: https://github.com/nagstler/mcp_on_ruby/blob/main/CHANGELOG.md
|
|
117
|
+
bug_tracker_uri: https://github.com/nagstler/mcp_on_ruby/issues
|
|
118
|
+
documentation_uri: https://github.com/nagstler/mcp_on_ruby#readme
|
|
301
119
|
rubygems_mfa_required: 'true'
|
|
302
120
|
post_install_message:
|
|
303
121
|
rdoc_options: []
|
|
@@ -307,15 +125,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
307
125
|
requirements:
|
|
308
126
|
- - ">="
|
|
309
127
|
- !ruby/object:Gem::Version
|
|
310
|
-
version: 2
|
|
128
|
+
version: '3.2'
|
|
311
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
130
|
requirements:
|
|
313
131
|
- - ">="
|
|
314
132
|
- !ruby/object:Gem::Version
|
|
315
133
|
version: '0'
|
|
316
134
|
requirements: []
|
|
317
|
-
rubygems_version: 3.5.
|
|
135
|
+
rubygems_version: 3.5.22
|
|
318
136
|
signing_key:
|
|
319
137
|
specification_version: 4
|
|
320
|
-
summary:
|
|
138
|
+
summary: Make your Rails app usable by AI agents.
|
|
321
139
|
test_files: []
|
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
-
|
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
-
|
|
9
|
-
## Our Standards
|
|
10
|
-
|
|
11
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
-
|
|
13
|
-
* Demonstrating empathy and kindness toward other people
|
|
14
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
-
* Giving and gracefully accepting constructive feedback
|
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
-
|
|
19
|
-
Examples of unacceptable behavior include:
|
|
20
|
-
|
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
22
|
-
advances of any kind
|
|
23
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
24
|
-
* Public or private harassment
|
|
25
|
-
* Publishing others' private information, such as a physical or email
|
|
26
|
-
address, without their explicit permission
|
|
27
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
28
|
-
professional setting
|
|
29
|
-
|
|
30
|
-
## Enforcement Responsibilities
|
|
31
|
-
|
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
33
|
-
|
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
35
|
-
|
|
36
|
-
## Scope
|
|
37
|
-
|
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
39
|
-
|
|
40
|
-
## Enforcement
|
|
41
|
-
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at nagendra.dhanakeerthi@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
|
43
|
-
|
|
44
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
45
|
-
|
|
46
|
-
## Enforcement Guidelines
|
|
47
|
-
|
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
49
|
-
|
|
50
|
-
### 1. Correction
|
|
51
|
-
|
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
53
|
-
|
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
55
|
-
|
|
56
|
-
### 2. Warning
|
|
57
|
-
|
|
58
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
|
59
|
-
|
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
61
|
-
|
|
62
|
-
### 3. Temporary Ban
|
|
63
|
-
|
|
64
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
65
|
-
|
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
67
|
-
|
|
68
|
-
### 4. Permanent Ban
|
|
69
|
-
|
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
71
|
-
|
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
73
|
-
|
|
74
|
-
## Attribution
|
|
75
|
-
|
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
|
77
|
-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
78
|
-
|
|
79
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
80
|
-
|
|
81
|
-
[homepage]: https://www.contributor-covenant.org
|
|
82
|
-
|
|
83
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/CONTRIBUTING.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Contributing to RubyMCP
|
|
2
|
-
|
|
3
|
-
Thank you for considering contributing to RubyMCP! This document outlines the process for contributing to the project.
|
|
4
|
-
|
|
5
|
-
## Code of Conduct
|
|
6
|
-
|
|
7
|
-
This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
|
|
8
|
-
|
|
9
|
-
## How Can I Contribute?
|
|
10
|
-
|
|
11
|
-
### Reporting Bugs
|
|
12
|
-
|
|
13
|
-
This section guides you through submitting a bug report for RubyMCP.
|
|
14
|
-
|
|
15
|
-
Before creating bug reports, please check [the issue list](https://github.com/nagstler/mcp_on_ruby/issues) to avoid duplicating an existing report. When you create a bug report, include as many details as possible:
|
|
16
|
-
|
|
17
|
-
* **Use a clear and descriptive title**
|
|
18
|
-
* **Describe the exact steps to reproduce the bug**
|
|
19
|
-
* **Provide specific examples**
|
|
20
|
-
* **Describe the behavior you observed**
|
|
21
|
-
* **Explain the behavior you expected**
|
|
22
|
-
* **Include screenshots or animated GIFs** if possible
|
|
23
|
-
* **Include details about your configuration and environment**
|
|
24
|
-
|
|
25
|
-
### Suggesting Enhancements
|
|
26
|
-
|
|
27
|
-
This section guides you through submitting an enhancement suggestion for RubyMCP.
|
|
28
|
-
|
|
29
|
-
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
|
|
30
|
-
|
|
31
|
-
* **Use a clear and descriptive title**
|
|
32
|
-
* **Provide a detailed description of the suggested enhancement**
|
|
33
|
-
* **Explain why this enhancement would be useful**
|
|
34
|
-
* **Specify which version you're using**
|
|
35
|
-
* **Specify the name and version of the OS you're using**
|
|
36
|
-
|
|
37
|
-
### Pull Requests
|
|
38
|
-
|
|
39
|
-
* Fill in the required template
|
|
40
|
-
* Follow the Ruby style guide
|
|
41
|
-
* Include tests for new features
|
|
42
|
-
* Document new code based on the rest of the codebase
|
|
43
|
-
* End all files with a newline
|
|
44
|
-
|
|
45
|
-
## Development Process
|
|
46
|
-
|
|
47
|
-
### Setting Up Development Environment
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# Fork and clone the repository
|
|
51
|
-
git clone https://github.com/yourusername/ruby_mcp.git
|
|
52
|
-
cd ruby_mcp
|
|
53
|
-
|
|
54
|
-
# Install dependencies
|
|
55
|
-
bundle install
|
|
56
|
-
|
|
57
|
-
# Run tests
|
|
58
|
-
bundle exec rspec
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Testing
|
|
62
|
-
|
|
63
|
-
Write tests for all new features
|
|
64
|
-
Ensure all tests pass before submitting a pull request
|
|
65
|
-
Run the full test suite locally before submission
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
bundle exec rspec
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Style Guidelines
|
|
72
|
-
|
|
73
|
-
Code should follow the Ruby style guide
|
|
74
|
-
Run RuboCop to check your code style
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
bundle exec rubocop
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Release Process
|
|
81
|
-
|
|
82
|
-
RubyMCP follows Semantic Versioning.
|
|
83
|
-
|
|
84
|
-
- MAJOR version for incompatible API changes
|
|
85
|
-
- MINOR version for backward-compatible functionality additions
|
|
86
|
-
- PATCH version for backward-compatible bug fixes
|
|
87
|
-
|
|
88
|
-
### First-time Contributors
|
|
89
|
-
If you're new to the project, look for issues labeled with good first issue which are ideal starting points for newcomers.
|
|
90
|
-
|
|
91
|
-
### License
|
|
92
|
-
By contributing to RubyMCP, you agree that your contributions will be licensed under the project's MIT License.
|