mcp_on_ruby 1.0.0 → 2.0.1
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 +42 -4
- data/LICENSE.txt +1 -1
- data/README.md +350 -163
- 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 +63 -59
- 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 +34 -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 +70 -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 +2 -3
- data/lib/mcp_on_ruby/warden_hook.rb +21 -0
- data/lib/mcp_on_ruby.rb +44 -122
- data/lib/tasks/mcp_on_ruby.rake +20 -0
- metadata +65 -136
- data/CODE_OF_CONDUCT.md +0 -56
- data/CONTRIBUTING.md +0 -86
- data/bin/console +0 -11
- data/bin/setup +0 -6
- data/docs/advanced-usage.md +0 -132
- data/docs/api-reference.md +0 -35
- data/docs/testing.md +0 -55
- data/examples/claude/README.md +0 -171
- data/examples/claude/claude-bridge.js +0 -122
- data/lib/mcp_on_ruby/errors.rb +0 -137
- data/lib/mcp_on_ruby/generators/install_generator.rb +0 -46
- data/lib/mcp_on_ruby/generators/resource_generator.rb +0 -63
- data/lib/mcp_on_ruby/generators/templates/README +0 -31
- data/lib/mcp_on_ruby/generators/templates/application_resource.rb +0 -20
- data/lib/mcp_on_ruby/generators/templates/application_tool.rb +0 -18
- data/lib/mcp_on_ruby/generators/templates/initializer.rb +0 -41
- data/lib/mcp_on_ruby/generators/templates/resource.rb +0 -50
- data/lib/mcp_on_ruby/generators/templates/resource_spec.rb +0 -67
- data/lib/mcp_on_ruby/generators/templates/sample_resource.rb +0 -57
- data/lib/mcp_on_ruby/generators/templates/sample_tool.rb +0 -59
- data/lib/mcp_on_ruby/generators/templates/tool.rb +0 -38
- data/lib/mcp_on_ruby/generators/templates/tool_spec.rb +0 -55
- data/lib/mcp_on_ruby/generators/tool_generator.rb +0 -51
- data/lib/mcp_on_ruby/railtie.rb +0 -108
- data/lib/mcp_on_ruby/resource.rb +0 -161
- data/lib/mcp_on_ruby/server.rb +0 -378
- data/lib/mcp_on_ruby/tool.rb +0 -134
- data/lib/mcp_on_ruby/transport.rb +0 -330
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module McpOnRuby
|
|
4
|
+
# Renders the exposed tools as a table for `bin/rails mcp:tools`.
|
|
5
|
+
module ToolTable
|
|
6
|
+
HEADERS = %w[TOOL ACTION VERB PATH ACCESS].freeze
|
|
7
|
+
|
|
8
|
+
module_function
|
|
9
|
+
|
|
10
|
+
def render(specs, configuration: McpOnRuby.configuration)
|
|
11
|
+
return "No tools are exposed. Add `mcp_tool` declarations to your controllers.\n" if specs.empty?
|
|
12
|
+
|
|
13
|
+
rows = specs.map do |spec|
|
|
14
|
+
[spec.name, "#{spec.controller.name}##{spec.action}", spec.verb, spec.path, access(spec, configuration)]
|
|
15
|
+
end
|
|
16
|
+
widths = HEADERS.each_index.map { |index| ([HEADERS] + rows).map { |row| row[index].length }.max }
|
|
17
|
+
|
|
18
|
+
([HEADERS] + rows).map { |row| format_row(row, widths) }.join("\n") << "\n"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def access(spec, configuration)
|
|
22
|
+
return "read-only" unless spec.write?
|
|
23
|
+
|
|
24
|
+
configuration.allow_writes ? "write" : "write (disabled)"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def format_row(row, widths)
|
|
28
|
+
row.each_with_index.map { |cell, index| cell.ljust(widths[index]) }.join(" ").rstrip
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
data/lib/mcp_on_ruby/version.rb
CHANGED
|
@@ -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
|
|
4
|
-
require
|
|
5
|
-
require
|
|
6
|
-
require
|
|
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
|
-
|
|
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
|
|
25
|
-
attr_writer :logger
|
|
26
|
-
attr_accessor :configuration
|
|
10
|
+
class Error < StandardError; end
|
|
27
11
|
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
38
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
#
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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
|
-
#
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
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:
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nagendra Dhanakeerthi
|
|
8
8
|
autorequire:
|
|
9
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
|
-
- - "
|
|
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: '
|
|
27
|
-
-
|
|
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: '
|
|
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: '
|
|
41
|
-
-
|
|
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: '
|
|
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:
|
|
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: '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:
|
|
76
|
-
type: :
|
|
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: '
|
|
83
|
-
-
|
|
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:
|
|
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
|
-
- - "
|
|
57
|
+
- - ">="
|
|
102
58
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
104
|
-
|
|
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: '
|
|
111
|
-
|
|
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: '
|
|
125
|
-
-
|
|
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: '
|
|
139
|
-
description:
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
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/
|
|
165
|
-
- lib/mcp_on_ruby/
|
|
166
|
-
- lib/mcp_on_ruby/
|
|
167
|
-
- lib/mcp_on_ruby/
|
|
168
|
-
- lib/mcp_on_ruby/
|
|
169
|
-
- lib/mcp_on_ruby/
|
|
170
|
-
- lib/mcp_on_ruby/
|
|
171
|
-
- lib/mcp_on_ruby/
|
|
172
|
-
- lib/mcp_on_ruby/
|
|
173
|
-
- lib/mcp_on_ruby/
|
|
174
|
-
- lib/mcp_on_ruby/
|
|
175
|
-
- lib/mcp_on_ruby/
|
|
176
|
-
- lib/mcp_on_ruby/
|
|
177
|
-
- lib/mcp_on_ruby/
|
|
178
|
-
- lib/mcp_on_ruby/
|
|
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
|
-
|
|
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
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
|
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.
|
|
135
|
+
rubygems_version: 3.5.22
|
|
207
136
|
signing_key:
|
|
208
137
|
specification_version: 4
|
|
209
|
-
summary:
|
|
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
|