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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 611ceb54904a193a5ac06d7fc7d223d835067a3d2232b05fc8a46dd1b14b96ac
|
|
4
|
+
data.tar.gz: 8d368c37165bf816104cb32345f7576b95e6e36ff5a01e3b2ecf7a07e497172a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c0528601bea68540a356a143abc104267e3b3bd8972c38544f13d0a1dd49696ab2d62d571ca6f51a9bdc0b5088e8f0eac4bebd18cef307759babfeaadc1e4d0
|
|
7
|
+
data.tar.gz: 183338a617d68e0e7fd963d627439e62cfdf66045f80f621b778cd12294ab34bf015f2ccf813ca3b747ce74c7bf1ef01e193e785423f6e94e4fac2e8b7918804
|
data/CHANGELOG.md
CHANGED
|
@@ -1,41 +1,105 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [2.0.0] - 2026-10-31
|
|
11
|
+
|
|
12
|
+
MCP on Ruby is now a Rails engine that exposes existing controller actions as MCP tools,
|
|
13
|
+
built on the official [`mcp`](https://github.com/modelcontextprotocol/ruby-sdk) gem.
|
|
4
14
|
|
|
5
15
|
### Added
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
16
|
+
|
|
17
|
+
- `mcp_tool` controller macro with a compact parameter schema DSL (nested objects, arrays, unions, nullable)
|
|
18
|
+
- Route-aware registry: path params become required arguments, annotations come from the HTTP verb, and
|
|
19
|
+
misconfiguration (unrouted declarations, unflagged writes, duplicate names) raises at boot
|
|
20
|
+
- Dispatch of tool calls as in-process requests through the full middleware stack, forwarding the caller's
|
|
21
|
+
`Authorization` header and cookies
|
|
22
|
+
- Result mapping from HTTP responses to MCP tool results, including structured JSON and agent-readable errors
|
|
23
|
+
- Stateless Streamable HTTP endpoint via `mount McpOnRuby::Engine, at: "/mcp"`
|
|
24
|
+
- `bin/rails mcp:stdio` with `stdio_user` (Devise/Warden) and `stdio_headers` (token auth) identities
|
|
25
|
+
- `bin/rails mcp:tools` and `bin/rails mcp:doctor`
|
|
26
|
+
- `mcp_on_ruby:install` and `mcp_on_ruby:expose` generators
|
|
27
|
+
- `McpOnRuby::TestHelper` (`mcp_call`, `mcp_tools`) and `mcp_on_ruby/rspec`
|
|
28
|
+
- `tool_call.mcp_on_ruby` instrumentation event
|
|
29
|
+
- `allow_writes` kill switch and `allowed_origins` for browser clients
|
|
12
30
|
|
|
13
31
|
### Changed
|
|
14
|
-
- Enhanced `StorageFactory` to support ActiveRecord backend
|
|
15
|
-
- Updated configuration system with ActiveRecord options
|
|
16
|
-
- Improved documentation with ActiveRecord storage examples
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
- Requires Ruby 3.2+ and Rails 7.1+
|
|
34
|
+
- The protocol layer is provided by the official `mcp` gem
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
|
|
38
|
+
- The hand-written JSON-RPC server, Rack middleware, SSE transport, and `app/tools`/`app/resources` classes
|
|
39
|
+
|
|
40
|
+
## [1.0.0] - 2025-01-28
|
|
19
41
|
|
|
20
42
|
### Added
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
43
|
+
- Production-ready MCP server implementation for Rails applications
|
|
44
|
+
- Rails-native integration with generators, middleware, and Railtie
|
|
45
|
+
- Full JSON-RPC 2.0 protocol support over HTTP transport
|
|
46
|
+
- Rails generators for quick setup:
|
|
47
|
+
- `rails generate mcp_on_ruby:install` - Complete MCP server setup
|
|
48
|
+
- `rails generate mcp_on_ruby:tool` - Create new tools with templates
|
|
49
|
+
- `rails generate mcp_on_ruby:resource` - Create new resources with URI templates
|
|
50
|
+
- Comprehensive security features:
|
|
51
|
+
- Bearer token authentication
|
|
52
|
+
- Rate limiting (configurable per minute)
|
|
53
|
+
- CORS support with configurable origins
|
|
54
|
+
- DNS rebinding protection
|
|
55
|
+
- Localhost-only mode for development
|
|
56
|
+
- Automatic tool and resource discovery in Rails apps
|
|
57
|
+
- JSON Schema validation for tool inputs
|
|
58
|
+
- URI templating for resources
|
|
59
|
+
- Error handling with proper JSON-RPC error codes
|
|
60
|
+
- Claude Desktop integration with stdio bridge example
|
|
61
|
+
- Extensive documentation and examples
|
|
25
62
|
|
|
26
63
|
### Changed
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
64
|
+
- Complete architectural rewrite focused on Rails integration
|
|
65
|
+
- Simplified API following Rails conventions
|
|
66
|
+
- Improved error handling and logging
|
|
67
|
+
- Better security defaults
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
- Rails 8 compatibility issues with frozen arrays
|
|
71
|
+
- Middleware initialization timing issues
|
|
72
|
+
- Tool auto-registration in development mode
|
|
73
|
+
- PostgreSQL parameter binding in tool examples
|
|
74
|
+
|
|
75
|
+
### Removed
|
|
76
|
+
- Standalone client implementation (focus on server-side)
|
|
77
|
+
- STDIO transport (HTTP-only, with bridge examples for stdio clients)
|
|
78
|
+
- Prompts and roots features (not commonly used in Rails context)
|
|
30
79
|
|
|
31
|
-
## [0.
|
|
80
|
+
## [0.2.0] - 2024-07-24
|
|
32
81
|
|
|
33
|
-
|
|
82
|
+
### Added
|
|
83
|
+
- OAuth 2.1 authentication for secure remote connections
|
|
84
|
+
- Permission-based access control for MCP methods
|
|
85
|
+
- JWT token validation and management
|
|
86
|
+
- Automatic token refresh mechanism
|
|
87
|
+
- HTTP transport authentication integration
|
|
88
|
+
- Middleware architecture for server authentication
|
|
89
|
+
- Authentication examples and documentation
|
|
90
|
+
|
|
91
|
+
## [0.1.0] - 2024-06-15
|
|
34
92
|
|
|
35
93
|
### Added
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
94
|
+
- Initial implementation of core MCP protocol
|
|
95
|
+
- JSON-RPC 2.0 message format
|
|
96
|
+
- HTTP and STDIO transports
|
|
97
|
+
- Basic server and client functionality
|
|
98
|
+
- Tool definition and execution
|
|
99
|
+
- Resource management
|
|
100
|
+
- Prompt handling
|
|
101
|
+
- Root filesystem access
|
|
102
|
+
|
|
103
|
+
[Unreleased]: https://github.com/nagstler/mcp_on_ruby/compare/v2.0.0...HEAD
|
|
104
|
+
[2.0.0]: https://github.com/nagstler/mcp_on_ruby/compare/v1.0.0...v2.0.0
|
|
105
|
+
[1.0.0]: https://github.com/nagstler/mcp_on_ruby/releases/tag/v1.0.0
|
data/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
21
|
+
THE SOFTWARE.
|