rails-pg-extras-mcp 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f644d2d5e6698d7c3e2816aa56a256ac6b150114fa618c00b60d22db2f60bfd
4
- data.tar.gz: 96f81ed50933097a54261932c517161dca4fd5f55471e1c8c5d9248c5de48217
3
+ metadata.gz: 51a70e772cecedb41e510b12575566f177b9e70fd374ae62dfb8f99bc8c04f87
4
+ data.tar.gz: b26aef4c74f6bde11aa077435f174ea7325cf8642b86c354ad9b09210849abcb
5
5
  SHA512:
6
- metadata.gz: 74c540154d4a2566c84aeb1af65e1ec02b7f3b398c6564c202eb0b1db7ca2d502925415c1784430aaf099b5983d940a4b43e4e6f50ac1980409741e6062e2221
7
- data.tar.gz: 648c78c14b9d85a3c9ae6ed10187125c29bf569ff43efdb2a742cce53fa88053faa21e94b37db1211383ef08426f3f11d73da0a9a31d4a1c5443967f41db09ae
6
+ metadata.gz: bdbcd8cdd983d36e0db3eef92c2a7db89168bc581d2e98fcb6b0d131713f7dc8fbb531a23a90d3f009c089a97bb21273e61313daa6951507c8005b2078b9f83c
7
+ data.tar.gz: 6e413fbfd0edd16253d5b2196a2608a42a00e31513fa68c50c33cf9a9959aa88a455bf62a922a49c782cf2bf41058268f6af8e253bed5655110892a15ce47da4
data/README.md CHANGED
@@ -25,7 +25,12 @@ opts = { auth_token: "secret" }
25
25
  mount RailsPgExtrasMcp::App.build(opts), at: "pg_extras_mcp"
26
26
  ```
27
27
 
28
- Refer to the [fast-mcp docs](https://github.com/yjacquin/fast-mcp) for a complete list of supported options (the `opts` hash is passed directly as-is). For real-world deployments, you'll likely need to configure the `:allowed_origins` setting.
28
+ Refer to the [fast-mcp docs](https://github.com/yjacquin/fast-mcp) for a complete list of supported options (the `opts` hash is passed directly as-is). For production deployments, you'll likely need a similar config:
29
+
30
+ ```ruby
31
+ opts = { allowed_origins: [ /.*./ ], allowed_ips: [ "*" ], auth_token: "secret", localhost_only: false }
32
+ mount RailsPgExtrasMcp::App.build(opts) at: "pg_extras_mcp"
33
+ ```
29
34
 
30
35
  Next, install [mcp-remote](https://github.com/geelen/mcp-remote):
31
36
 
@@ -157,9 +157,9 @@ module RailsPgExtrasMcp
157
157
  rack_method_name = opts[:auth_token].present? ? :authenticated_rack_middleware : :rack_middleware
158
158
 
159
159
  # Create the MCP middleware
160
- mcp_app = FastMcp.public_send(rack_method_name,
161
- app,
162
- **opts) do |server|
160
+ FastMcp.public_send(rack_method_name,
161
+ app,
162
+ **opts) do |server|
163
163
  server.register_tools(DiagnoseTool)
164
164
  server.register_tools(MissingFkConstraintsTool)
165
165
  server.register_tools(MissingFkIndexesTool)
@@ -168,8 +168,6 @@ module RailsPgExtrasMcp
168
168
  server.register_tools(ExplainAnalyzeTool) if ENV["PG_EXTRAS_MCP_EXPLAIN_ANALYZE_ENABLED"] == "true"
169
169
 
170
170
  server.register_resource(ReadmeResource)
171
-
172
- Rack::Builder.new { run mcp_app }
173
171
  end
174
172
  end
175
173
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPgExtrasMcp
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-pg-extras-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb