rails-pg-extras-mcp 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72d363ce5cf74c8c22e8a636c3b908f27be10cc5a21691acd480b791ab9e8c33
4
- data.tar.gz: 36f3cb7fd5c1784c727def8ea7ad4c6f572f21c301ce99440440e4d5843f1e62
3
+ metadata.gz: c325326b879c8e447cb8865244a6dba60d3acfe611720bc838c0d71b2d77be91
4
+ data.tar.gz: a35cca49706ea0e8ecc7143bdbebe64664ddcdab223221b37bae97c228558ed5
5
5
  SHA512:
6
- metadata.gz: 5565add5c44d77aa22c20f238c5f87d1f6e537f03f2b1d40fee5a5bbde03ed46690d11ecfecdecf791d65c0d748a26eaae5940d8808163e2c335fc4bad3c29ef
7
- data.tar.gz: 8f7235f0b1e8ec213379c2f98895522ca54eed4c3c4912d7c5773a377fb9e0207a638ace52f235b7a6012161ed3f543afa565ecb5281e1f5fc3a7f09039f04b5
6
+ metadata.gz: 6b9af0e9a1c41158e7b231060cc56f8ea97f7eba97674f05446fac42b8299c6ab17ef72b1260a69dc9d1d6ff4cefb364490bf0b6bc65020286676935b786479a
7
+ data.tar.gz: 5d55fc2ec81088a21749e56b55c07e50cdd19ce187faceeecfde4933beaf3cd89065a7a8196df997d7de4e073f3f48834ddabf8f2bc1e3b0b771dd7b062f48d6
data/README.md CHANGED
@@ -67,7 +67,7 @@ You can enable them by setting the following `ENV` variables:
67
67
  `ENV['PG_EXTRAS_MCP_EXPLAIN_ENABLED'] = 'true'`
68
68
  `ENV['PG_EXTRAS_MCP_EXPLAIN_ANALYZE_ENABLED'] = 'true'`
69
69
 
70
- Enabling these features means that an LLM, can run arbitrary queries in your database. The execution context is wrapped in a transaction and rolled back, so, in theory, any data modification should not be possible. But it's advised to configure a read-only permission if you want to use these features. By specifying `ENV['RAILS_PG_EXTRAS_DATABASE_URL']` you can overwrite the default Rails ActiveRecord database connection to restrict an access scope.
70
+ Enabling these features means that an LLM, can run arbitrary queries in your database. The execution context is wrapped in a transaction and rolled back, so, in theory, any data modification should not be possible. But it's advised to configure a read-only permission if you want to use these features. By specifying `ENV['RAILS_PG_EXTRAS_MCP_DATABASE_URL']` you can overwrite the default Rails ActiveRecord database connection to restrict an access scope:
71
71
 
72
72
  ## Status
73
73
 
@@ -222,6 +222,10 @@ module RailsPgExtrasMcp
222
222
  server.register_tools(ExplainAnalyzeTool) if ENV["PG_EXTRAS_MCP_EXPLAIN_ANALYZE_ENABLED"] == "true"
223
223
 
224
224
  server.register_resource(ReadmeResource)
225
+
226
+ if !ENV["RAILS_PG_EXTRAS_MCP_DATABASE_URL"].to_s.empty?
227
+ RailsPgExtras.database_url = ENV["RAILS_PG_EXTRAS_MCP_DATABASE_URL"]
228
+ end
225
229
  end
226
230
  end
227
231
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPgExtrasMcp
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.4"
5
5
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.test_files = s.files.grep(%r{^(spec)/})
16
16
  s.require_paths = ["lib"]
17
17
  s.license = "MIT"
18
- s.add_dependency "rails-pg-extras", "~> 5.6"
18
+ s.add_dependency "rails-pg-extras", "~> 5.6.12"
19
19
  s.add_dependency "rails"
20
20
  s.add_dependency "fast-mcp"
21
21
  s.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-pg-extras-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-12 00:00:00.000000000 Z
11
+ date: 2025-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-pg-extras
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.6'
19
+ version: 5.6.12
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.6'
26
+ version: 5.6.12
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement