rails-mcp-server 1.2.1 → 1.2.2
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 +27 -3
- data/README.md +34 -3
- data/exe/rails-mcp-server +15 -4
- data/lib/rails-mcp-server/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74a6004be8b59bdcb7faf865784f2873a6d2cd4c7d7a4e2efd359c6a7f07a00a
|
4
|
+
data.tar.gz: ab9986826c087ccda8bad64e749ce3382e73b7a895e151318415951abc3f0b95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b1b210dd639c42add909b9b406de1fd5b9d82404df40cd8416320173e31f95adb41d1390a3c50f758c6c57acfc9d213200045e0d4ae3907cd217d458f54f86e
|
7
|
+
data.tar.gz: 51892b54ef22115b922d69bf71d0f34f0809fc58b949ddb2c3afaf521c87b7ae71cd5ef2575bc3347af6252d012bb3ab4a650fbe0a44d29dfd08d0b837dfd937
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,29 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## 1.2.
|
8
|
+
## [1.2.2] - 2025-07-21
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
- **Network Access Support**: New `--bind-all` flag for HTTP mode to allow access from local network
|
13
|
+
- Binds to `0.0.0.0` instead of `localhost` when enabled
|
14
|
+
- Allows connections from local network IP ranges (192.168.x.x, 10.x.x.x)
|
15
|
+
- Accepts connections from `.local` domain names (e.g., `my-computer.local`)
|
16
|
+
- Maintains security features with origin validation and IP filtering
|
17
|
+
|
18
|
+
### Improved
|
19
|
+
|
20
|
+
- **Security Configuration**: Enhanced allowed origins and IP configuration when using `--bind-all`
|
21
|
+
- Automatically configures appropriate security settings for local network access
|
22
|
+
- Preserves localhost-only mode by default for security
|
23
|
+
- Clear documentation of security implications
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
- HTTP server binding address is now configurable via `--bind-all` flag
|
28
|
+
- Updated help text to include new network access option
|
29
|
+
|
30
|
+
## [1.2.1] - 2025-06-09
|
9
31
|
|
10
32
|
### Fixed
|
11
33
|
|
@@ -170,6 +192,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
170
192
|
|
171
193
|
## Version History Summary
|
172
194
|
|
195
|
+
- **v1.2.2** (2025-07-21): Network access support with --bind-all flag
|
196
|
+
- **v1.2.1** (2025-06-09): Bug fixes for STDIO output and tool naming
|
173
197
|
- **v1.2.0** (2025-06-03): Major documentation and resource system addition
|
174
198
|
- **v1.1.4** (2025-05-02): Critical bug fixes for HTTP mode and Rails commands
|
175
199
|
- **v1.1.0** (2025-04-20): HTTP SSE support and new analysis tools with FastMCP migration
|
@@ -190,9 +214,9 @@ This project follows [Semantic Versioning](https://semver.org/):
|
|
190
214
|
1. Update version in `lib/rails-mcp-server/version.rb`
|
191
215
|
2. Update this CHANGELOG.md with new features and changes
|
192
216
|
3. Update README.md and documentation if needed
|
193
|
-
4. Create a git tag: `git tag -a v1.2.
|
217
|
+
4. Create a git tag: `git tag -a v1.2.2 -m "Release version 1.2.2"`
|
194
218
|
5. Push tags: `git push origin --tags`
|
195
|
-
6. Build and publish gem: `gem build rails-mcp-server.gemspec && gem push rails-mcp-server-1.2.
|
219
|
+
6. Build and publish gem: `gem build rails-mcp-server.gemspec && gem push rails-mcp-server-1.2.2.gem`
|
196
220
|
|
197
221
|
### Changelog Categories
|
198
222
|
|
data/README.md
CHANGED
@@ -70,6 +70,9 @@ rails-mcp-server --mode http
|
|
70
70
|
|
71
71
|
# Start in HTTP mode on a custom port
|
72
72
|
rails-mcp-server --mode http -p 8080
|
73
|
+
|
74
|
+
# Start in HTTP mode binding to all interfaces (for local network access)
|
75
|
+
rails-mcp-server --mode http --bind-all
|
73
76
|
```
|
74
77
|
|
75
78
|
When running in HTTP mode, the server provides two endpoints:
|
@@ -77,6 +80,27 @@ When running in HTTP mode, the server provides two endpoints:
|
|
77
80
|
- JSON-RPC endpoint: `http://localhost:<port>/mcp/messages`
|
78
81
|
- SSE endpoint: `http://localhost:<port>/mcp/sse`
|
79
82
|
|
83
|
+
### Network Access (HTTP Mode)
|
84
|
+
|
85
|
+
By default, the HTTP server only binds to localhost for security. If you need to access the server from other machines on your local network (e.g., for testing with multiple devices), you can use the `--bind-all` flag:
|
86
|
+
|
87
|
+
```bash
|
88
|
+
# Allow access from any machine on your local network
|
89
|
+
rails-mcp-server --mode http --bind-all
|
90
|
+
|
91
|
+
# With a custom port
|
92
|
+
rails-mcp-server --mode http --bind-all -p 8080
|
93
|
+
```
|
94
|
+
|
95
|
+
When using `--bind-all`:
|
96
|
+
|
97
|
+
- The server binds to `0.0.0.0` instead of `localhost`
|
98
|
+
- Access is allowed from local network IP ranges (192.168.x.x, 10.x.x.x)
|
99
|
+
- The server accepts connections from `.local` domain names (e.g., `my-computer.local`)
|
100
|
+
- Security features remain active to prevent unauthorized access
|
101
|
+
|
102
|
+
**Security Note**: Only use `--bind-all` on trusted networks. The server includes built-in security features to validate origins and IP addresses, but exposing any service to your network increases the attack surface.
|
103
|
+
|
80
104
|
### Logging Options
|
81
105
|
|
82
106
|
The server logs to a file in the `./log` directory by default. You can customize logging with these options:
|
@@ -137,10 +161,17 @@ After running the script, restart Claude Desktop to apply the changes.
|
|
137
161
|
|
138
162
|
Claude Desktop launches the MCP server using your system's default Ruby environment, bypassing version manager initialization (e.g., rbenv, RVM). The MCP server needs to use the same Ruby version where it was installed, as MCP server startup failures can occur when using an incompatible Ruby version.
|
139
163
|
|
140
|
-
If you are using a Ruby version manager such as rbenv, you can
|
164
|
+
If you are using a Ruby version manager such as rbenv, you can use the Ruby shim path to ensure the correct version is used:
|
141
165
|
|
142
|
-
```
|
143
|
-
|
166
|
+
```json
|
167
|
+
{
|
168
|
+
"mcpServers": {
|
169
|
+
"railsMcpServer": {
|
170
|
+
"command": "/home/your_user/.rbenv/shims/ruby",
|
171
|
+
"args": ["/full/path/to/rails-mcp-server/exe/rails-mcp-server"]
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
144
175
|
```
|
145
176
|
|
146
177
|
Replace "/home/your_user/.rbenv/shims/ruby" with your actual path for the Ruby shim.
|
data/exe/rails-mcp-server
CHANGED
@@ -28,11 +28,13 @@ if ARGV[0] == "--help" || ARGV[0] == "-h"
|
|
28
28
|
puts " --log-level LEVEL Log level: debug, info, warn, error (default: info)"
|
29
29
|
puts " --mode MODE Server mode: http or stdio (default: stdio)"
|
30
30
|
puts " -p, --port PORT Port to listen on (default: 6029)"
|
31
|
+
puts " --bind-all Bind to 0.0.0.0 instead of localhost (HTTP mode only)"
|
31
32
|
puts " version Display version information"
|
32
33
|
puts " --help, -h Display this help message"
|
33
34
|
puts ""
|
34
35
|
puts "Example:"
|
35
36
|
puts " #{File.basename($0)} --log-level debug -p 6060"
|
37
|
+
puts " #{File.basename($0)} --mode http --bind-all"
|
36
38
|
puts " #{File.basename($0)} --mode stdio"
|
37
39
|
exit 0
|
38
40
|
end
|
@@ -40,6 +42,7 @@ end
|
|
40
42
|
# Default values
|
41
43
|
port = 6029
|
42
44
|
mode = "stdio"
|
45
|
+
bind_all = false
|
43
46
|
|
44
47
|
# Parse command-line arguments
|
45
48
|
i = 0
|
@@ -58,6 +61,9 @@ while i < ARGV.length
|
|
58
61
|
exit 1
|
59
62
|
end
|
60
63
|
i += 2
|
64
|
+
when "--bind-all"
|
65
|
+
bind_all = true
|
66
|
+
i += 1
|
61
67
|
else
|
62
68
|
i += 1
|
63
69
|
end
|
@@ -81,10 +87,12 @@ end
|
|
81
87
|
|
82
88
|
case mode
|
83
89
|
when "http"
|
84
|
-
|
90
|
+
bind_address = bind_all ? "0.0.0.0" : "localhost"
|
91
|
+
|
92
|
+
puts "Starting Rack application with MCP middleware on http://#{bind_address}:#{port}"
|
85
93
|
puts "MCP endpoints:"
|
86
|
-
puts " - http
|
87
|
-
puts " - http
|
94
|
+
puts " - http://#{bind_address}:#{port}/mcp/sse (SSE endpoint)"
|
95
|
+
puts " - http://#{bind_address}:#{port}/mcp/messages (JSON-RPC endpoint)"
|
88
96
|
puts ""
|
89
97
|
puts "Version #{RailsMcpServer::VERSION}"
|
90
98
|
puts ""
|
@@ -96,12 +104,15 @@ when "http"
|
|
96
104
|
mcp_app = FastMcp.rack_middleware(
|
97
105
|
rack_app,
|
98
106
|
name: "rails-mcp-server", version: RailsMcpServer::VERSION,
|
107
|
+
allowed_origins: bind_all ? ["127.0.0.1", "localhost"] : ["127.0.0.1", "localhost", /.*\.local$/],
|
108
|
+
localhost_only: !bind_all,
|
109
|
+
allowed_ips: bind_all ? ["192.168.68.0/24", "10.0.0.0/8"] : ["127.0.0.1", "::1"],
|
99
110
|
logger: RailsMcpServer.logger
|
100
111
|
) { |server| setup_mcp_tools(server) }
|
101
112
|
|
102
113
|
app = Rack::Builder.new { run mcp_app }
|
103
114
|
config = Puma::Configuration.new do |user_config|
|
104
|
-
user_config.bind "tcp
|
115
|
+
user_config.bind "tcp://#{bind_address}:#{port}"
|
105
116
|
user_config.app app
|
106
117
|
end
|
107
118
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-mcp-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Alberto Chávez Cárdenas
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 2025-07-22 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: addressable
|
@@ -98,8 +98,8 @@ email:
|
|
98
98
|
- mario.chavez@gmail.com
|
99
99
|
executables:
|
100
100
|
- rails-mcp-server
|
101
|
-
- rails-mcp-server-download-resources
|
102
101
|
- rails-mcp-setup-claude
|
102
|
+
- rails-mcp-server-download-resources
|
103
103
|
extensions: []
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
|
-
rubygems_version: 3.6.
|
174
|
+
rubygems_version: 3.6.2
|
175
175
|
specification_version: 4
|
176
176
|
summary: MCP server for Rails projects
|
177
177
|
test_files: []
|