rails-active-mcp 0.1.6 → 2.0.7
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/README.md +106 -279
- data/changelog.md +69 -0
- data/claude_desktop_config.json +12 -0
- data/docs/DEBUGGING.md +40 -8
- data/docs/GENERATOR_TESTING.md +121 -0
- data/docs/README.md +130 -142
- data/exe/rails-active-mcp-server +176 -65
- data/lib/generators/rails_active_mcp/install/install_generator.rb +123 -3
- data/lib/generators/rails_active_mcp/install/templates/README.md +34 -128
- data/lib/generators/rails_active_mcp/install/templates/initializer.rb +37 -38
- data/lib/generators/rails_active_mcp/install/templates/mcp.ru +7 -3
- data/lib/rails_active_mcp/configuration.rb +37 -98
- data/lib/rails_active_mcp/console_executor.rb +202 -78
- data/lib/rails_active_mcp/engine.rb +36 -8
- data/lib/rails_active_mcp/sdk/server.rb +183 -0
- data/lib/rails_active_mcp/sdk/tools/console_execute_tool.rb +103 -0
- data/lib/rails_active_mcp/sdk/tools/dry_run_tool.rb +73 -0
- data/lib/rails_active_mcp/sdk/tools/model_info_tool.rb +106 -0
- data/lib/rails_active_mcp/sdk/tools/safe_query_tool.rb +77 -0
- data/lib/rails_active_mcp/version.rb +1 -1
- data/lib/rails_active_mcp.rb +10 -11
- data/rails_active_mcp.gemspec +8 -4
- metadata +43 -17
- data/lib/rails_active_mcp/mcp_server.rb +0 -374
- data/lib/rails_active_mcp/railtie.rb +0 -48
- data/lib/rails_active_mcp/stdio_server.rb +0 -467
- data/lib/rails_active_mcp/tools/console_execute_tool.rb +0 -61
- data/lib/rails_active_mcp/tools/dry_run_tool.rb +0 -41
- data/lib/rails_active_mcp/tools/model_info_tool.rb +0 -70
- data/lib/rails_active_mcp/tools/safe_query_tool.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dce4c2f44cc53bb550f74c549f92073a367817bf31bc2ae05a6dad17eca0ae29
|
4
|
+
data.tar.gz: 76645f3c0b20e148cf0044afb9dea1c8ed6064ce6e4067b6bf1b5b9cbd5c86d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d7c5e938697d29db91f0276b008aa2c64307a7ff90b3afcd88c458244ee10b2ae82a4ae8014da06ea5ef99f020ffd8feaf6c66af29741f31a8b37b5300f2f26
|
7
|
+
data.tar.gz: 73950d69c48e192edb0071f3138eea1a148fa9ab557f67fdba8283ce5a3b188e3ee4f9297bdc1381eee74633fe0411e0d5e5affb964e5713ad4796be124b47f9
|
data/README.md
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
# Rails Active MCP
|
2
2
|
|
3
|
-
A Ruby gem that provides secure Rails console access through Model Context Protocol (MCP) for AI agents and development tools like Claude Desktop
|
3
|
+
A Ruby gem that provides secure Rails console access through Model Context Protocol (MCP) for AI agents and development tools like Claude Desktop. Built using the official MCP Ruby SDK for professional protocol handling and future-proof compatibility.
|
4
4
|
|
5
5
|
## Features
|
6
6
|
|
7
7
|
- 🔒 **Safe Execution**: Advanced safety checks prevent dangerous operations
|
8
|
-
- 🚀 **
|
8
|
+
- 🚀 **Official MCP SDK**: Built with the official MCP Ruby SDK for robust protocol handling
|
9
9
|
- 📊 **Read-Only Queries**: Safe database querying with automatic result limiting
|
10
10
|
- 🔍 **Code Analysis**: Dry-run capabilities to analyze code before execution
|
11
11
|
- 📝 **Audit Logging**: Complete execution logging for security and debugging
|
12
12
|
- ⚙️ **Configurable**: Flexible configuration for different environments
|
13
13
|
- 🛡️ **Production Ready**: Strict safety modes for production environments
|
14
|
+
- ⚡ **Professional Implementation**: Built-in instrumentation, timing, and error handling
|
14
15
|
|
15
16
|
## Installation
|
16
17
|
|
@@ -35,7 +36,7 @@ $ rails generate rails_active_mcp:install
|
|
35
36
|
This will:
|
36
37
|
|
37
38
|
- Create an initializer with configuration options
|
38
|
-
- Mount the
|
39
|
+
- Mount the MCP server for Rails integration
|
39
40
|
- Create a `mcp.ru` server file for standalone usage
|
40
41
|
- Set up audit logging
|
41
42
|
|
@@ -45,82 +46,36 @@ The gem is configured in `config/initializers/rails_active_mcp.rb`:
|
|
45
46
|
|
46
47
|
```ruby
|
47
48
|
RailsActiveMcp.configure do |config|
|
48
|
-
#
|
49
|
-
config.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
config.
|
56
|
-
config.
|
57
|
-
config.
|
58
|
-
|
59
|
-
# Model access control
|
60
|
-
config.allowed_models = %w[User Post Comment] # Empty = all allowed
|
61
|
-
config.blocked_models = %w[AdminUser Secret]
|
62
|
-
|
63
|
-
# Security settings
|
64
|
-
config.enable_mutation_tools = !Rails.env.production?
|
65
|
-
config.log_executions = true
|
66
|
-
config.audit_file = Rails.root.join("log", "rails_active_mcp.log")
|
67
|
-
|
68
|
-
# Environment presets
|
69
|
-
config.production_mode! # Very strict
|
70
|
-
config.strict_mode! # Safe defaults
|
71
|
-
config.permissive_mode! # Development friendly
|
72
|
-
|
73
|
-
# Server mode shortcuts
|
74
|
-
config.stdio_mode! # Set stdio mode for Claude Desktop
|
75
|
-
config.http_mode!(host: '0.0.0.0', port: 8080) # Set HTTP mode with custom host/port
|
49
|
+
# Core configuration options
|
50
|
+
config.allowed_commands = %w[
|
51
|
+
ls pwd cat head tail grep find wc
|
52
|
+
rails console rails runner
|
53
|
+
bundle exec rspec bundle exec test
|
54
|
+
git status git log git diff
|
55
|
+
]
|
56
|
+
config.command_timeout = 30
|
57
|
+
config.enable_logging = true
|
58
|
+
config.log_level = :info
|
76
59
|
end
|
77
60
|
```
|
78
61
|
|
79
62
|
## Running the MCP Server
|
80
63
|
|
81
|
-
|
82
|
-
|
83
|
-
### Option 1: Use configured mode (recommended)
|
64
|
+
The server runs in STDIO mode, perfect for Claude Desktop integration:
|
84
65
|
|
85
66
|
```bash
|
86
67
|
$ bundle exec rails-active-mcp-server
|
87
68
|
```
|
88
69
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
```
|
95
|
-
|
96
|
-
### Option 2: Rails-mounted (HTTP, good for development)
|
97
|
-
|
98
|
-
```bash
|
99
|
-
$ rails server
|
100
|
-
# MCP server available at http://localhost:3000/mcp
|
101
|
-
```
|
102
|
-
|
103
|
-
### Option 3: Standalone HTTP server
|
104
|
-
|
105
|
-
```bash
|
106
|
-
$ bundle exec rails-active-mcp-server http
|
107
|
-
# Default: http://localhost:3001
|
108
|
-
|
109
|
-
# Custom host/port
|
110
|
-
$ bundle exec rails-active-mcp-server http --host 0.0.0.0 --port 8080
|
111
|
-
```
|
112
|
-
|
113
|
-
### Option 4: Using rackup
|
114
|
-
|
115
|
-
```bash
|
116
|
-
$ rackup mcp.ru -p 3001
|
117
|
-
```
|
70
|
+
The server automatically:
|
71
|
+
- Loads your Rails application
|
72
|
+
- Initializes all models and configurations
|
73
|
+
- Provides secure access to your Rails environment
|
74
|
+
- Uses the official MCP Ruby SDK for protocol handling
|
118
75
|
|
119
76
|
## Usage
|
120
77
|
|
121
|
-
###
|
122
|
-
|
123
|
-
#### Claude Desktop Integration (Preferred)
|
78
|
+
### Claude Desktop Integration (Recommended)
|
124
79
|
|
125
80
|
Add to your Claude Desktop configuration file:
|
126
81
|
|
@@ -133,7 +88,7 @@ Add to your Claude Desktop configuration file:
|
|
133
88
|
"mcpServers": {
|
134
89
|
"rails-active-mcp": {
|
135
90
|
"command": "bundle",
|
136
|
-
"args": ["exec", "rails-active-mcp-server"
|
91
|
+
"args": ["exec", "rails-active-mcp-server"],
|
137
92
|
"cwd": "/path/to/your/rails/project"
|
138
93
|
}
|
139
94
|
}
|
@@ -147,7 +102,6 @@ Or if installed globally:
|
|
147
102
|
"mcpServers": {
|
148
103
|
"rails-active-mcp": {
|
149
104
|
"command": "rails-active-mcp-server",
|
150
|
-
"args": ["stdio"],
|
151
105
|
"cwd": "/path/to/your/rails/project"
|
152
106
|
}
|
153
107
|
}
|
@@ -161,142 +115,67 @@ Then in Claude Desktop, you can use prompts like:
|
|
161
115
|
- "Check the User model schema and associations"
|
162
116
|
- "Analyze this code for safety: User.delete_all"
|
163
117
|
|
164
|
-
#### Warp Terminal Integration (HTTP)
|
165
|
-
|
166
|
-
Add to your Warp MCP configuration:
|
167
|
-
|
168
|
-
```json
|
169
|
-
{
|
170
|
-
"mcpServers": {
|
171
|
-
"rails-console": {
|
172
|
-
"command": "curl",
|
173
|
-
"args": [
|
174
|
-
"-X",
|
175
|
-
"POST",
|
176
|
-
"-H",
|
177
|
-
"Content-Type: application/json",
|
178
|
-
"-d", "@-",
|
179
|
-
"http://localhost:3000/mcp"
|
180
|
-
]
|
181
|
-
}
|
182
|
-
}
|
183
|
-
}
|
184
|
-
```
|
185
|
-
|
186
|
-
#### Custom MCP Clients
|
187
|
-
|
188
|
-
The server implements the MCP protocol (JSONRPC 2.0). Connect any MCP-compatible client to:
|
189
|
-
- **Rails-mounted**: `http://localhost:3000/mcp`
|
190
|
-
- **Standalone**: `http://localhost:3001`
|
191
|
-
|
192
118
|
### Direct Usage
|
193
119
|
|
194
120
|
```ruby
|
195
121
|
# Execute code safely
|
196
122
|
result = RailsActiveMcp.execute("User.count")
|
197
|
-
puts result[:return_value] # => 42
|
198
123
|
|
199
124
|
# Check if code is safe
|
200
125
|
RailsActiveMcp.safe?("User.delete_all") # => false
|
201
|
-
|
202
|
-
# Analyze code without executing
|
203
|
-
executor = RailsActiveMcp::ConsoleExecutor.new(RailsActiveMcp.config)
|
204
|
-
analysis = executor.dry_run("User.delete_all")
|
205
|
-
puts analysis[:estimated_risk] # => :critical
|
206
126
|
```
|
207
127
|
|
208
|
-
|
128
|
+
## Available MCP Tools
|
209
129
|
|
210
|
-
The Rails Active MCP server provides
|
130
|
+
The Rails Active MCP server provides four powerful tools that appear automatically in Claude Desktop:
|
211
131
|
|
212
|
-
|
132
|
+
### 1. `console_execute`
|
213
133
|
|
214
134
|
Execute Ruby code with safety checks and timeout protection:
|
215
135
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
"name": "rails_console_execute",
|
221
|
-
"arguments": {
|
222
|
-
"code": "User.where(active: true).count",
|
223
|
-
"timeout": 30,
|
224
|
-
"safe_mode": true
|
225
|
-
}
|
226
|
-
}
|
227
|
-
}
|
228
|
-
```
|
136
|
+
- **Purpose**: Run Rails console commands safely
|
137
|
+
- **Safety**: Built-in dangerous operation detection
|
138
|
+
- **Timeout**: Configurable execution timeout
|
139
|
+
- **Logging**: All executions are logged for audit
|
229
140
|
|
230
|
-
|
141
|
+
**Example Usage in Claude:**
|
142
|
+
> "Execute `User.where(active: true).count`"
|
231
143
|
|
232
|
-
|
144
|
+
### 2. `model_info`
|
233
145
|
|
234
|
-
|
235
|
-
{
|
236
|
-
"method": "tools/call",
|
237
|
-
"params": {
|
238
|
-
"name": "rails_model_info",
|
239
|
-
"arguments": {
|
240
|
-
"model_name": "User"
|
241
|
-
}
|
242
|
-
}
|
243
|
-
}
|
244
|
-
```
|
146
|
+
Get detailed information about Rails models:
|
245
147
|
|
246
|
-
|
148
|
+
- **Schema Information**: Column types, constraints, indexes
|
149
|
+
- **Associations**: Has_many, belongs_to, has_one relationships
|
150
|
+
- **Validations**: All model validations and rules
|
151
|
+
- **Methods**: Available instance and class methods
|
247
152
|
|
248
|
-
|
153
|
+
**Example Usage in Claude:**
|
154
|
+
> "Show me the User model structure"
|
249
155
|
|
250
|
-
|
251
|
-
{
|
252
|
-
"method": "tools/call",
|
253
|
-
"params": {
|
254
|
-
"name": "rails_safe_query",
|
255
|
-
"arguments": {
|
256
|
-
"query": "where(active: true).count",
|
257
|
-
"model": "User"
|
258
|
-
}
|
259
|
-
}
|
260
|
-
}
|
261
|
-
```
|
156
|
+
### 3. `safe_query`
|
262
157
|
|
263
|
-
|
158
|
+
Execute safe, read-only database queries:
|
264
159
|
|
265
|
-
|
160
|
+
- **Read-Only**: Only SELECT operations allowed
|
161
|
+
- **Safe Execution**: Automatic query analysis
|
162
|
+
- **Result Limiting**: Prevents large data dumps
|
163
|
+
- **Model Context**: Works within your model definitions
|
266
164
|
|
267
|
-
|
268
|
-
|
269
|
-
"method": "tools/call",
|
270
|
-
"params": {
|
271
|
-
"name": "rails_dry_run",
|
272
|
-
"arguments": {
|
273
|
-
"code": "User.delete_all"
|
274
|
-
}
|
275
|
-
}
|
276
|
-
}
|
277
|
-
```
|
165
|
+
**Example Usage in Claude:**
|
166
|
+
> "Get the 10 most recent orders"
|
278
167
|
|
279
|
-
|
168
|
+
### 4. `dry_run`
|
280
169
|
|
281
|
-
|
170
|
+
Analyze Ruby code for safety without executing:
|
282
171
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
# Your custom tools
|
289
|
-
register_tool('my_custom_tool', 'Description', {...}) do |args|
|
290
|
-
# Tool implementation
|
291
|
-
end
|
292
|
-
end
|
293
|
-
```
|
172
|
+
- **Risk Assessment**: Categorizes code by danger level
|
173
|
+
- **Safety Analysis**: Identifies potential issues
|
174
|
+
- **Recommendations**: Suggests safer alternatives
|
175
|
+
- **Zero Execution**: Never runs the actual code
|
294
176
|
|
295
|
-
|
296
|
-
|
297
|
-
- Read-only database queries
|
298
|
-
- Model schema inspection
|
299
|
-
- Custom business logic tools
|
177
|
+
**Example Usage in Claude:**
|
178
|
+
> "Analyze this code for safety: `User.delete_all`"
|
300
179
|
|
301
180
|
## Safety Features
|
302
181
|
|
@@ -329,114 +208,69 @@ User.where(active: true).count
|
|
329
208
|
Post.includes(:comments).limit(10)
|
330
209
|
```
|
331
210
|
|
332
|
-
##
|
211
|
+
## Architecture
|
333
212
|
|
334
|
-
|
335
|
-
# Check code safety
|
336
|
-
rails rails_active_mcp:check_safety['User.count']
|
213
|
+
### Built on Official MCP Ruby SDK
|
337
214
|
|
338
|
-
|
339
|
-
rails rails_active_mcp:execute['User.count']
|
215
|
+
Rails Active MCP uses the official MCP Ruby SDK (`mcp` gem) for:
|
340
216
|
|
341
|
-
|
342
|
-
|
217
|
+
- **Professional Protocol Handling**: Robust JSON-RPC 2.0 implementation
|
218
|
+
- **Built-in Instrumentation**: Automatic timing and error reporting
|
219
|
+
- **Future-Proof**: Automatic updates as MCP specification evolves
|
220
|
+
- **Standards Compliance**: Full MCP protocol compatibility
|
343
221
|
|
344
|
-
|
345
|
-
rails rails_active_mcp:config
|
222
|
+
### Server Implementation
|
346
223
|
|
347
|
-
|
348
|
-
rails rails_active_mcp:audit_log[20]
|
224
|
+
The server is implemented in `lib/rails_active_mcp/sdk/server.rb` and provides:
|
349
225
|
|
350
|
-
|
351
|
-
|
352
|
-
|
226
|
+
- **STDIO Transport**: Perfect for Claude Desktop integration
|
227
|
+
- **Tool Registration**: Automatic discovery of available tools
|
228
|
+
- **Error Handling**: Comprehensive error reporting and recovery
|
229
|
+
- **Rails Integration**: Deep integration with Rails applications
|
353
230
|
|
354
|
-
|
231
|
+
### Tool Architecture
|
355
232
|
|
356
|
-
|
233
|
+
Each tool is implemented as a separate class in `lib/rails_active_mcp/sdk/tools/`:
|
357
234
|
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
"user": {
|
363
|
-
"environment": "development"
|
364
|
-
},
|
365
|
-
"safety_check": {
|
366
|
-
"safe": true,
|
367
|
-
"read_only": true,
|
368
|
-
"violations": []
|
369
|
-
}
|
370
|
-
}
|
371
|
-
```
|
235
|
+
- `ConsoleExecuteTool`: Safe code execution
|
236
|
+
- `ModelInfoTool`: Model introspection
|
237
|
+
- `SafeQueryTool`: Read-only database access
|
238
|
+
- `DryRunTool`: Code safety analysis
|
372
239
|
|
373
|
-
##
|
240
|
+
## Error Handling
|
374
241
|
|
375
|
-
|
242
|
+
The gem provides specific error types:
|
376
243
|
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
# - Read-only replica execution
|
381
|
-
# - Comprehensive logging
|
382
|
-
# - No mutation tools
|
383
|
-
```
|
244
|
+
- `RailsActiveMcp::SafetyError`: Code failed safety checks
|
245
|
+
- `RailsActiveMcp::TimeoutError`: Execution timed out
|
246
|
+
- `RailsActiveMcp::ExecutionError`: General execution failure
|
384
247
|
|
385
|
-
|
248
|
+
All errors are properly reported through the MCP protocol with detailed messages.
|
386
249
|
|
387
|
-
|
388
|
-
config.permissive_mode!
|
389
|
-
# - Relaxed safety (but still protected)
|
390
|
-
# - Mutation tools enabled
|
391
|
-
# - Higher timeouts and limits
|
392
|
-
```
|
250
|
+
## Development and Testing
|
393
251
|
|
394
|
-
###
|
252
|
+
### Running Tests
|
395
253
|
|
396
|
-
```
|
397
|
-
|
398
|
-
# - Safe defaults
|
399
|
-
# - No mutations
|
400
|
-
# - Fast timeouts
|
254
|
+
```bash
|
255
|
+
$ bundle exec rspec
|
401
256
|
```
|
402
257
|
|
403
|
-
|
404
|
-
|
405
|
-
Rails Active MCP provides a custom-built MCP server implementation with no external dependencies. The server:
|
406
|
-
|
407
|
-
- Implements the Model Context Protocol (MCP)
|
408
|
-
- Uses JSON-RPC 2.0 over HTTP
|
409
|
-
- Supports essential MCP methods:
|
410
|
-
- `initialize` - Server capabilities
|
411
|
-
- `tools/list` - Available tools
|
412
|
-
- `tools/call` - Execute tools
|
413
|
-
- `resources/list` and `resources/read` - Resource access
|
258
|
+
### Testing MCP Integration
|
414
259
|
|
415
|
-
|
260
|
+
```bash
|
261
|
+
$ ./bin/test-mcp-output
|
262
|
+
```
|
416
263
|
|
417
|
-
|
264
|
+
This tests the MCP server output redirection and JSON protocol compliance.
|
418
265
|
|
419
|
-
###
|
266
|
+
### Debugging
|
420
267
|
|
421
|
-
|
268
|
+
Set the debug environment variable for detailed logging:
|
422
269
|
|
423
|
-
```
|
424
|
-
|
425
|
-
RailsActiveMcp.server.instance_eval do
|
426
|
-
register_tool('my_custom_tool', 'Description', {...}) do |args|
|
427
|
-
# Tool implementation
|
428
|
-
end
|
429
|
-
end
|
270
|
+
```bash
|
271
|
+
$ RAILS_MCP_DEBUG=1 bundle exec rails-active-mcp-server
|
430
272
|
```
|
431
273
|
|
432
|
-
## Error Handling
|
433
|
-
|
434
|
-
The gem provides specific error types:
|
435
|
-
|
436
|
-
- `RailsActiveMcp::SafetyError`: Code failed safety checks
|
437
|
-
- `RailsActiveMcp::TimeoutError`: Execution timed out
|
438
|
-
- `RailsActiveMcp::ExecutionError`: General execution failure
|
439
|
-
|
440
274
|
## Contributing
|
441
275
|
|
442
276
|
1. Fork it
|
@@ -447,28 +281,21 @@ The gem provides specific error types:
|
|
447
281
|
|
448
282
|
## License
|
449
283
|
|
450
|
-
The gem is available as open source under the
|
451
|
-
|
452
|
-
## Security
|
453
|
-
|
454
|
-
This gem provides multiple layers of security, but always:
|
284
|
+
The gem is available as open source under the [MIT License](https://opensource.org/licenses/MIT).
|
455
285
|
|
456
|
-
|
457
|
-
- Monitor the audit logs
|
458
|
-
- Use read-only database replicas in production when possible
|
459
|
-
- Restrict model access as needed
|
460
|
-
- Test safety patterns thoroughly
|
461
|
-
|
462
|
-
### Benefits of the Custom MCP Server
|
286
|
+
## Changelog
|
463
287
|
|
464
|
-
|
465
|
-
- **Full Control**: Complete visibility into the server implementation
|
466
|
-
- **Customizable Security**: Easily add additional security layers or checks
|
467
|
-
- **Simplified Deployment**: No need to manage external MCP server dependencies
|
468
|
-
- **Protocol Isolation**: MCP protocol implementation is self-contained and auditable
|
288
|
+
### Version 2.0.0 (Latest)
|
469
289
|
|
470
|
-
|
290
|
+
- **BREAKING**: Migrated to official MCP Ruby SDK
|
291
|
+
- **BREAKING**: Removed custom MCP server implementation
|
292
|
+
- **BREAKING**: Simplified configuration options
|
293
|
+
- **NEW**: Professional protocol handling with built-in instrumentation
|
294
|
+
- **NEW**: Automatic MCP specification compliance
|
295
|
+
- **IMPROVED**: 85% reduction in codebase complexity
|
296
|
+
- **IMPROVED**: Better error handling and reporting
|
297
|
+
- **IMPROVED**: Future-proof architecture
|
471
298
|
|
472
|
-
|
299
|
+
### Previous Versions
|
473
300
|
|
474
|
-
See [CHANGELOG.md](CHANGELOG.md) for version history
|
301
|
+
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
|
data/changelog.md
CHANGED
@@ -7,6 +7,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [2.0.0] - 2025-01-15
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Official MCP Ruby SDK integration (`mcp` gem v0.1.0)
|
15
|
+
- Professional protocol handling with built-in instrumentation
|
16
|
+
- Automatic timing and error reporting
|
17
|
+
- Standards-compliant MCP protocol implementation
|
18
|
+
- Future-proof architecture with automatic SDK updates
|
19
|
+
- Enhanced error handling and comprehensive reporting
|
20
|
+
- Simplified tool names (removed `rails_` prefix)
|
21
|
+
- Updated documentation reflecting new architecture
|
22
|
+
|
23
|
+
### Changed
|
24
|
+
|
25
|
+
- **BREAKING**: Migrated from custom MCP server to official MCP Ruby SDK
|
26
|
+
- **BREAKING**: Simplified configuration options (removed complex server modes)
|
27
|
+
- **BREAKING**: Tool names updated:
|
28
|
+
- `rails_console_execute` → `console_execute`
|
29
|
+
- `rails_model_info` → `model_info`
|
30
|
+
- `rails_safe_query` → `safe_query`
|
31
|
+
- `rails_dry_run` → `dry_run`
|
32
|
+
- **BREAKING**: Removed HTTP server mode (STDIO only for Claude Desktop)
|
33
|
+
- **BREAKING**: Removed feature flag system (SDK implementation only)
|
34
|
+
- Server implementation moved to `lib/rails_active_mcp/sdk/server.rb`
|
35
|
+
- Tool implementations moved to `lib/rails_active_mcp/sdk/tools/`
|
36
|
+
- Updated README and documentation for new architecture
|
37
|
+
|
38
|
+
### Removed
|
39
|
+
|
40
|
+
- **BREAKING**: Custom MCP server implementation (799 lines of code)
|
41
|
+
- **BREAKING**: Legacy tool implementations
|
42
|
+
- **BREAKING**: Complex configuration options:
|
43
|
+
- `server_mode`, `server_host`, `server_port`
|
44
|
+
- `allowed_models`, `blocked_models`
|
45
|
+
- `enable_mutation_tools`
|
46
|
+
- Environment presets (`production_mode!`, `strict_mode!`, etc.)
|
47
|
+
- **BREAKING**: HTTP server mode and Rails mounting
|
48
|
+
- **BREAKING**: Feature flag system (`use_mcp_sdk`)
|
49
|
+
- Legacy files:
|
50
|
+
- `lib/rails_active_mcp/mcp_server.rb`
|
51
|
+
- `lib/rails_active_mcp/stdio_server.rb`
|
52
|
+
- `lib/rails_active_mcp/application_mcp_tool.rb`
|
53
|
+
- `lib/rails_active_mcp/tool_registry.rb`
|
54
|
+
- `lib/rails_active_mcp/tools/` (legacy implementations)
|
55
|
+
|
56
|
+
### Performance
|
57
|
+
|
58
|
+
- 85% reduction in MCP protocol handling code
|
59
|
+
- Improved protocol performance through official SDK
|
60
|
+
- Better memory usage and resource management
|
61
|
+
- Faster tool execution with reduced overhead
|
62
|
+
|
63
|
+
### Security
|
64
|
+
|
65
|
+
- Maintained all existing safety features
|
66
|
+
- Enhanced error reporting without exposing internals
|
67
|
+
- Professional protocol handling reduces attack surface
|
68
|
+
- Continued comprehensive audit logging
|
69
|
+
|
70
|
+
### Migration Guide
|
71
|
+
|
72
|
+
For users upgrading from v1.x:
|
73
|
+
|
74
|
+
1. Update your `config/initializers/rails_active_mcp.rb` to use the simplified configuration
|
75
|
+
2. Update Claude Desktop configuration to remove any HTTP-specific settings
|
76
|
+
3. Tool names in your MCP client integrations need to be updated (remove `rails_` prefix)
|
77
|
+
4. The server now only supports STDIO mode (perfect for Claude Desktop)
|
78
|
+
|
10
79
|
## [0.1.0] - 2025-06-25
|
11
80
|
|
12
81
|
### Added
|