foobara-mcp-connector-generator 0.0.4 → 0.0.5

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: 629c9fe7769061b89317afd70520324a568c476186c7bb8bbacd5f6a0e8e6e9f
4
- data.tar.gz: 446e4df029d02a5c1097a74fa1b333e3d6d84487dc1ddc4b52161fcc2ce4bae1
3
+ metadata.gz: 5604ce6d8c8ecdbcfd86bf738b720bde76a18a59eb7cf53ce84efd4a508da737
4
+ data.tar.gz: 798cd79bb3144a4bb58c6932226b28055de127df30a8d2ead5a3b848d106e150
5
5
  SHA512:
6
- metadata.gz: 0e8d4061ceb68f140e1f5a003086cd838b8caab7a77e16ac682436356d4200af0a1a9c4c655bf7fbfbf8c6480dc682d809d4c5f2fa58f84bab3f23f9a27e65f8
7
- data.tar.gz: dc73ccf0e0e21fcdadc8de7acbd842745924a10805adebb26ada2e5e7d60021ef716d5bb2b9424aebe4f4d29e878baec421f7ac148dda7823edc23c2a59e6c39
6
+ metadata.gz: 2342fd9b62b0cfd45bd3459ed62c49db46d3079ed3b38064caa1a441a9ea9fc57cf369eb15a753a4ce4ac5ab878c83ff25a29d430fc2c901a6ba37342c6c386f
7
+ data.tar.gz: 7f9f16463c29d97b9847407623c8cb8c225b89f2875909cf37cfe9cdc398e781e9fddd0f2fa868dbe0d8d19511196f257f4193f524d09948e60d69aa49d7ef57
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.0.5] - 2025-04-14
2
+
3
+ - Don't bother running bundle or rubocop if they are not configured
4
+ - Make sure server can be run even if it's not in PATH
5
+ - Add an example command to the generated mcp-server file for demo purposes
6
+
1
7
  ## [0.0.4] - 2025-04-14
2
8
 
3
9
  - Fix bug generating .mcp.json with wrong file extension
@@ -66,10 +66,22 @@ module Foobara
66
66
  end
67
67
 
68
68
  def program_path
69
- mcp_connector_config.program_path
69
+ return @program_path if @program_path
70
+
71
+ @program_path = mcp_connector_config.program_path
72
+
73
+ if program_path =~ /^\w/
74
+ @program_path = "./#{@program_path}"
75
+ end
76
+
77
+ @program_path
70
78
  end
71
79
 
72
80
  def bundle_install
81
+ unless File.exist?("Gemfile")
82
+ return
83
+ end
84
+
73
85
  puts "bundling..."
74
86
  cmd = "bundle install"
75
87
 
@@ -87,6 +99,10 @@ module Foobara
87
99
  end
88
100
 
89
101
  def rubocop_autocorrect
102
+ unless File.exist?(".rubocop.yml")
103
+ return
104
+ end
105
+
90
106
  puts "linting..."
91
107
  cmd = "bundle exec rubocop --no-server -A"
92
108
 
@@ -9,6 +9,25 @@ end
9
9
 
10
10
  require "foobara/mcp_connector"
11
11
 
12
+ # Just a sample command. Delete this.
13
+ class BuildSuperDuperSecret < Foobara::Command
14
+ inputs do
15
+ seed :integer, :required
16
+ end
17
+ result :integer
18
+
19
+ def execute
20
+ build_secret
21
+ secret
22
+ end
23
+
24
+ attr_accessor :secret
25
+
26
+ def build_secret
27
+ self.secret = seed * seed * seed
28
+ end
29
+ end
30
+
12
31
  mcp_connector = Foobara::McpConnector.new
13
- mcp_connector.connect(SomeCommand)
32
+ mcp_connector.connect(BuildSuperDuperSecret)
14
33
  mcp_connector.run_stdio_server
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-mcp-connector-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi