mcp_on_ruby 1.0.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -3
  3. data/README.md +359 -163
  4. data/config/routes.rb +5 -0
  5. data/lib/generators/mcp_on_ruby/expose/expose_generator.rb +108 -0
  6. data/lib/generators/mcp_on_ruby/install/install_generator.rb +37 -0
  7. data/lib/generators/mcp_on_ruby/install/templates/initializer.rb +22 -0
  8. data/lib/mcp_on_ruby/call_context.rb +29 -0
  9. data/lib/mcp_on_ruby/configuration.rb +63 -59
  10. data/lib/mcp_on_ruby/controller.rb +60 -0
  11. data/lib/mcp_on_ruby/declaration.rb +24 -0
  12. data/lib/mcp_on_ruby/dispatcher.rb +97 -0
  13. data/lib/mcp_on_ruby/doctor.rb +67 -0
  14. data/lib/mcp_on_ruby/endpoint.rb +43 -0
  15. data/lib/mcp_on_ruby/engine.rb +29 -0
  16. data/lib/mcp_on_ruby/registry.rb +146 -0
  17. data/lib/mcp_on_ruby/result.rb +83 -0
  18. data/lib/mcp_on_ruby/rspec.rb +8 -0
  19. data/lib/mcp_on_ruby/schema.rb +149 -0
  20. data/lib/mcp_on_ruby/server_factory.rb +66 -0
  21. data/lib/mcp_on_ruby/stdio.rb +42 -0
  22. data/lib/mcp_on_ruby/test_helper.rb +86 -0
  23. data/lib/mcp_on_ruby/tool_spec.rb +87 -0
  24. data/lib/mcp_on_ruby/tool_table.rb +31 -0
  25. data/lib/mcp_on_ruby/version.rb +2 -3
  26. data/lib/mcp_on_ruby/warden_hook.rb +21 -0
  27. data/lib/mcp_on_ruby.rb +44 -122
  28. data/lib/tasks/mcp_on_ruby.rake +20 -0
  29. metadata +65 -136
  30. data/CODE_OF_CONDUCT.md +0 -56
  31. data/CONTRIBUTING.md +0 -86
  32. data/bin/console +0 -11
  33. data/bin/setup +0 -6
  34. data/docs/advanced-usage.md +0 -132
  35. data/docs/api-reference.md +0 -35
  36. data/docs/testing.md +0 -55
  37. data/examples/claude/README.md +0 -171
  38. data/examples/claude/claude-bridge.js +0 -122
  39. data/lib/mcp_on_ruby/errors.rb +0 -137
  40. data/lib/mcp_on_ruby/generators/install_generator.rb +0 -46
  41. data/lib/mcp_on_ruby/generators/resource_generator.rb +0 -63
  42. data/lib/mcp_on_ruby/generators/templates/README +0 -31
  43. data/lib/mcp_on_ruby/generators/templates/application_resource.rb +0 -20
  44. data/lib/mcp_on_ruby/generators/templates/application_tool.rb +0 -18
  45. data/lib/mcp_on_ruby/generators/templates/initializer.rb +0 -41
  46. data/lib/mcp_on_ruby/generators/templates/resource.rb +0 -50
  47. data/lib/mcp_on_ruby/generators/templates/resource_spec.rb +0 -67
  48. data/lib/mcp_on_ruby/generators/templates/sample_resource.rb +0 -57
  49. data/lib/mcp_on_ruby/generators/templates/sample_tool.rb +0 -59
  50. data/lib/mcp_on_ruby/generators/templates/tool.rb +0 -38
  51. data/lib/mcp_on_ruby/generators/templates/tool_spec.rb +0 -55
  52. data/lib/mcp_on_ruby/generators/tool_generator.rb +0 -51
  53. data/lib/mcp_on_ruby/railtie.rb +0 -108
  54. data/lib/mcp_on_ruby/resource.rb +0 -161
  55. data/lib/mcp_on_ruby/server.rb +0 -378
  56. data/lib/mcp_on_ruby/tool.rb +0 -134
  57. data/lib/mcp_on_ruby/transport.rb +0 -330
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module McpOnRuby
4
- VERSION = "1.0.0"
5
- PROTOCOL_VERSION = "2024-11-05"
6
- end
4
+ VERSION = "2.0.0"
5
+ end
@@ -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 CHANGED
@@ -1,142 +1,64 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'logger'
4
- require 'json'
5
- require 'json-schema'
6
- require 'rack'
7
- require 'webrick'
3
+ require "mcp"
4
+ require "active_support"
5
+ require "active_support/core_ext"
6
+ require "mcp_on_ruby/version"
8
7
 
9
- require_relative 'mcp_on_ruby/version'
10
- require_relative 'mcp_on_ruby/errors'
11
- require_relative 'mcp_on_ruby/configuration'
12
- require_relative 'mcp_on_ruby/server'
13
- require_relative 'mcp_on_ruby/tool'
14
- require_relative 'mcp_on_ruby/resource'
15
- require_relative 'mcp_on_ruby/transport'
16
-
17
- # Rails integration if available
18
- if defined?(Rails)
19
- require_relative 'mcp_on_ruby/railtie'
20
- end
21
-
22
- # Production-ready Model Context Protocol implementation for Rails
8
+ # MCP on Ruby exposes Rails controller actions as Model Context Protocol tools.
23
9
  module McpOnRuby
24
- class << self
25
- attr_writer :logger
26
- attr_accessor :configuration
10
+ class Error < StandardError; end
27
11
 
28
- # Configure the library
29
- # @yield [Configuration] The configuration object
30
- # @return [Configuration] The configuration object
31
- def configure
32
- self.configuration ||= Configuration.new
33
- yield(configuration) if block_given?
34
- configuration
35
- end
12
+ # Raised when tool declarations cannot be served, for example a typo in an action name.
13
+ class ConfigurationError < Error; end
36
14
 
37
- # Get the logger
38
- # @return [Logger] The logger
39
- def logger
40
- @logger ||= Logger.new($stdout).tap do |log|
41
- log.progname = 'McpOnRuby'
42
- log.level = configuration&.log_level || Logger::INFO
43
- end
44
- end
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"
45
17
 
46
- # Create a new MCP server
47
- # @param options [Hash] Server configuration options
48
- # @yield [Server] The server instance for configuration
49
- # @return [Server] The configured server
50
- def server(options = {}, &block)
51
- Server.new(options, &block)
52
- end
18
+ # Rack env key holding the user a local (stdio) session acts as.
19
+ USER_ENV_KEY = "mcp_on_ruby.user"
53
20
 
54
- # Create a tool with DSL
55
- # @param name [String] Tool name
56
- # @param description [String] Tool description
57
- # @param input_schema [Hash] JSON Schema for validation
58
- # @param options [Hash] Additional options (metadata, tags)
59
- # @param block [Proc] Tool implementation
60
- # @return [Tool] The created tool
61
- def tool(name, description = '', input_schema = {}, **options, &block)
62
- raise ArgumentError, 'Tool implementation block is required' unless block_given?
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"
63
37
 
64
- Class.new(Tool) do
65
- define_method :execute do |arguments, context|
66
- case block.arity
67
- when 0
68
- instance_exec(&block)
69
- when 1
70
- instance_exec(arguments, &block)
71
- else
72
- instance_exec(arguments, context, &block)
73
- end
74
- end
75
- end.new(
76
- name: name,
77
- description: description,
78
- input_schema: input_schema,
79
- metadata: options[:metadata] || {},
80
- tags: options[:tags] || []
81
- )
38
+ class << self
39
+ def configuration
40
+ @configuration ||= Configuration.new
82
41
  end
83
42
 
84
- # Create a resource with DSL
85
- # @param uri [String] Resource URI
86
- # @param options [Hash] Resource options (name, description, etc.)
87
- # @param block [Proc] Resource implementation
88
- # @return [Resource] The created resource
89
- def resource(uri, **options, &block)
90
- raise ArgumentError, 'Resource implementation block is required' unless block_given?
43
+ # The tools exposed by the running application.
44
+ def registry
45
+ @registry ||= Registry.new
46
+ end
91
47
 
92
- Class.new(Resource) do
93
- define_method :fetch_content do |params, context|
94
- case block.arity
95
- when 0
96
- instance_exec(&block)
97
- when 1
98
- instance_exec(params, &block)
99
- else
100
- instance_exec(params, context, &block)
101
- end
102
- end
103
- end.new(
104
- uri: uri,
105
- name: options[:name],
106
- description: options[:description] || '',
107
- mime_type: options[:mime_type] || 'application/json',
108
- metadata: options[:metadata] || {},
109
- tags: options[:tags] || []
110
- )
48
+ # Builds MCP servers for HTTP requests and stdio sessions.
49
+ def server_factory
50
+ @server_factory ||= ServerFactory.new
111
51
  end
112
52
 
113
- # Broadcast resource update to connected SSE clients
114
- # @param uri [String] Resource URI that was updated
115
- # @param event_type [String] Type of event
116
- def broadcast_resource_update(uri, event_type = 'resource_updated')
117
- # This would be implemented when SSE is fully integrated
118
- logger.info("Resource update broadcasted: #{uri} (#{event_type})")
53
+ def configure
54
+ yield configuration
119
55
  end
120
56
 
121
- # Mount MCP server in Rails application
122
- # @param app [Rails::Application] The Rails application
123
- # @param options [Hash] Mounting options
124
- # @yield [Server] The server instance for configuration
125
- # @return [Server] The mounted server
126
- def mount_in_rails(app, **options, &block)
127
- server = self.server(options, &block)
128
-
129
- # Mount the transport middleware
130
- app.config.middleware.use(
131
- Transport::RackMiddleware,
132
- server: server,
133
- **options
134
- )
135
-
136
- server
57
+ # Restores the default configuration. Intended for tests.
58
+ def reset_configuration!
59
+ @configuration = Configuration.new
137
60
  end
138
61
  end
139
62
  end
140
63
 
141
- # Alias for convenience
142
- MCP = McpOnRuby
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,193 +1,122 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcp_on_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nagendra Dhanakeerthi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-28 00:00:00.000000000 Z
11
+ date: 2026-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: json-schema
14
+ name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '3.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
17
+ - - ">="
25
18
  - !ruby/object:Gem::Version
26
- version: '3.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rack
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
19
+ version: '7.1'
20
+ - - "<"
32
21
  - !ruby/object:Gem::Version
33
- version: '2.2'
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: '2.2'
41
- - !ruby/object:Gem::Dependency
42
- name: webrick
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
29
+ version: '7.1'
30
+ - - "<"
46
31
  - !ruby/object:Gem::Version
47
- version: '1.7'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.7'
32
+ version: '9'
55
33
  - !ruby/object:Gem::Dependency
56
- name: rake
34
+ name: mcp
57
35
  requirement: !ruby/object:Gem::Requirement
58
36
  requirements:
59
37
  - - "~>"
60
38
  - !ruby/object:Gem::Version
61
- version: '13.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '13.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
39
+ version: '1.8'
40
+ - - ">="
74
41
  - !ruby/object:Gem::Version
75
- version: '3.12'
76
- type: :development
42
+ version: 1.8.2
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: '3.12'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.50'
90
- type: :development
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: '1.50'
52
+ version: 1.8.2
97
53
  - !ruby/object:Gem::Dependency
98
- name: simplecov
54
+ name: railties
99
55
  requirement: !ruby/object:Gem::Requirement
100
56
  requirements:
101
- - - "~>"
57
+ - - ">="
102
58
  - !ruby/object:Gem::Version
103
- version: '0.22'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
59
+ version: '7.1'
60
+ - - "<"
109
61
  - !ruby/object:Gem::Version
110
- version: '0.22'
111
- - !ruby/object:Gem::Dependency
112
- name: webmock
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '3.18'
118
- type: :development
62
+ version: '9'
63
+ type: :runtime
119
64
  prerelease: false
120
65
  version_requirements: !ruby/object:Gem::Requirement
121
66
  requirements:
122
- - - "~>"
67
+ - - ">="
123
68
  - !ruby/object:Gem::Version
124
- version: '3.18'
125
- - !ruby/object:Gem::Dependency
126
- name: rack-test
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '2.1'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
69
+ version: '7.1'
70
+ - - "<"
137
71
  - !ruby/object:Gem::Version
138
- version: '2.1'
139
- description: A comprehensive Ruby library for building Model Context Protocol (MCP)
140
- servers in Rails applications, featuring tools, resources, authentication, and real-time
141
- capabilities.
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.
142
77
  email:
143
78
  - nagendra.dhanakeerthi@gmail.com
144
- executables:
145
- - console
146
- - setup
79
+ executables: []
147
80
  extensions: []
148
81
  extra_rdoc_files: []
149
82
  files:
150
83
  - CHANGELOG.md
151
- - CODE_OF_CONDUCT.md
152
- - CONTRIBUTING.md
153
84
  - LICENSE.txt
154
85
  - README.md
155
- - bin/console
156
- - bin/setup
157
- - docs/advanced-usage.md
158
- - docs/api-reference.md
159
- - docs/testing.md
160
- - examples/claude/README.md
161
- - examples/claude/claude-bridge.js
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
162
90
  - lib/mcp_on_ruby.rb
91
+ - lib/mcp_on_ruby/call_context.rb
163
92
  - lib/mcp_on_ruby/configuration.rb
164
- - lib/mcp_on_ruby/errors.rb
165
- - lib/mcp_on_ruby/generators/install_generator.rb
166
- - lib/mcp_on_ruby/generators/resource_generator.rb
167
- - lib/mcp_on_ruby/generators/templates/README
168
- - lib/mcp_on_ruby/generators/templates/application_resource.rb
169
- - lib/mcp_on_ruby/generators/templates/application_tool.rb
170
- - lib/mcp_on_ruby/generators/templates/initializer.rb
171
- - lib/mcp_on_ruby/generators/templates/resource.rb
172
- - lib/mcp_on_ruby/generators/templates/resource_spec.rb
173
- - lib/mcp_on_ruby/generators/templates/sample_resource.rb
174
- - lib/mcp_on_ruby/generators/templates/sample_tool.rb
175
- - lib/mcp_on_ruby/generators/templates/tool.rb
176
- - lib/mcp_on_ruby/generators/templates/tool_spec.rb
177
- - lib/mcp_on_ruby/generators/tool_generator.rb
178
- - lib/mcp_on_ruby/railtie.rb
179
- - lib/mcp_on_ruby/resource.rb
180
- - lib/mcp_on_ruby/server.rb
181
- - lib/mcp_on_ruby/tool.rb
182
- - lib/mcp_on_ruby/transport.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
183
108
  - lib/mcp_on_ruby/version.rb
184
- homepage: https://github.com/rubyonai/mcp_on_ruby
109
+ - lib/mcp_on_ruby/warden_hook.rb
110
+ - lib/tasks/mcp_on_ruby.rake
111
+ homepage: https://github.com/nagstler/mcp_on_ruby
185
112
  licenses:
186
113
  - MIT
187
114
  metadata:
188
- homepage_uri: https://github.com/rubyonai/mcp_on_ruby
189
- source_code_uri: https://github.com/rubyonai/mcp_on_ruby
190
- changelog_uri: https://github.com/rubyonai/mcp_on_ruby/blob/main/CHANGELOG.md
115
+ source_code_uri: https://github.com/nagstler/mcp_on_ruby/tree/main
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
119
+ rubygems_mfa_required: 'true'
191
120
  post_install_message:
192
121
  rdoc_options: []
193
122
  require_paths:
@@ -196,15 +125,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
125
  requirements:
197
126
  - - ">="
198
127
  - !ruby/object:Gem::Version
199
- version: 2.7.0
128
+ version: '3.2'
200
129
  required_rubygems_version: !ruby/object:Gem::Requirement
201
130
  requirements:
202
131
  - - ">="
203
132
  - !ruby/object:Gem::Version
204
133
  version: '0'
205
134
  requirements: []
206
- rubygems_version: 3.4.10
135
+ rubygems_version: 3.5.22
207
136
  signing_key:
208
137
  specification_version: 4
209
- summary: Production-ready MCP server for Rails applications
138
+ summary: Make your Rails app usable by AI agents.
210
139
  test_files: []
data/CODE_OF_CONDUCT.md DELETED
@@ -1,56 +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
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, religion, or sexual identity
10
- and orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to a positive environment:
15
-
16
- * Using welcoming and inclusive language
17
- * Being respectful of differing viewpoints and experiences
18
- * Gracefully accepting constructive criticism
19
- * Focusing on what is best for the community
20
- * Showing empathy towards other community members
21
-
22
- Examples of unacceptable behavior:
23
-
24
- * The use of sexualized language or imagery, and sexual attention or advances
25
- * Trolling, insulting or derogatory comments, and personal or political attacks
26
- * Public or private harassment
27
- * Publishing others' private information without explicit permission
28
- * Other conduct which could reasonably be considered inappropriate
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Project maintainers are responsible for clarifying and enforcing our standards of
33
- acceptable behavior and will take appropriate and fair corrective action in
34
- response to any behavior that they deem inappropriate, threatening, offensive,
35
- or harmful.
36
-
37
- ## Scope
38
-
39
- This Code of Conduct applies within all community spaces, and also applies when
40
- an individual is officially representing the community in public spaces.
41
-
42
- ## Enforcement
43
-
44
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
45
- reported to the community leaders responsible for enforcement at
46
- [INSERT EMAIL ADDRESS].
47
-
48
- All complaints will be reviewed and investigated promptly and fairly.
49
-
50
- ## Attribution
51
-
52
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
53
- version 2.0, available at
54
- https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
55
-
56
- [homepage]: https://www.contributor-covenant.org
data/CONTRIBUTING.md DELETED
@@ -1,86 +0,0 @@
1
- # Contributing to MCP on Ruby
2
-
3
- We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
4
-
5
- - Reporting a bug
6
- - Discussing the current state of the code
7
- - Submitting a fix
8
- - Proposing new features
9
- - Becoming a maintainer
10
-
11
- ## Development Process
12
-
13
- We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
14
-
15
- ## Pull Requests
16
-
17
- 1. Fork the repo and create your branch from `main`.
18
- 2. If you've added code that should be tested, add tests.
19
- 3. If you've changed APIs, update the documentation.
20
- 4. Ensure the test suite passes.
21
- 5. Make sure your code lints.
22
- 6. Issue that pull request!
23
-
24
- ## Development Setup
25
-
26
- ```bash
27
- # Clone your fork
28
- git clone https://github.com/nagstler/mcp_on_ruby.git
29
- cd mcp_on_ruby
30
-
31
- # Install dependencies
32
- bundle install
33
-
34
- # Run the generators to test Rails integration
35
- mkdir test_app && cd test_app
36
- rails new . --skip-git
37
- echo "gem 'mcp_on_ruby', path: '..' " >> Gemfile
38
- bundle install
39
- rails generate mcp_on_ruby:install
40
-
41
- # Test the gem
42
- cd .. && ruby -e "require './lib/mcp_on_ruby'; puts 'Gem loads successfully'"
43
- ```
44
-
45
- ## Code Style
46
-
47
- - Follow standard Ruby conventions
48
- - Use meaningful variable and method names
49
- - Add documentation for public APIs
50
- - Keep methods focused and small
51
-
52
- ## Testing
53
-
54
- Currently, we use manual testing and examples. In the future, we plan to add:
55
- - RSpec test suite
56
- - Integration tests with Rails
57
- - CI/CD pipeline
58
-
59
- ## Bug Reports
60
-
61
- We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/nagstler/mcp_on_ruby/issues).
62
-
63
- **Great Bug Reports** tend to have:
64
-
65
- - A quick summary and/or background
66
- - Steps to reproduce
67
- - Be specific!
68
- - Give sample code if you can
69
- - What you expected would happen
70
- - What actually happens
71
- - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
72
-
73
- ## Feature Requests
74
-
75
- We use GitHub issues to track feature requests. Propose a feature by [opening a new issue](https://github.com/nagstler/mcp_on_ruby/issues).
76
-
77
- **Great Feature Requests** include:
78
-
79
- - Clear use case description
80
- - Why this feature would be useful
81
- - Proposed API or implementation approach
82
- - Examples of how it would be used
83
-
84
- ## License
85
-
86
- By contributing, you agree that your contributions will be licensed under the same MIT License that covers the project.
data/bin/console DELETED
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "mcp_on_ruby"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- require "irb"
11
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install