foobara-mcp-connector-generator 0.0.3 → 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 +4 -4
- data/CHANGELOG.md +10 -0
- data/src/generators/new_mcp_json_generator.rb +1 -5
- data/src/write_mcp_connector_to_disk.rb +17 -1
- data/templates/bin/mcp-server.erb +20 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5604ce6d8c8ecdbcfd86bf738b720bde76a18a59eb7cf53ce84efd4a508da737
|
4
|
+
data.tar.gz: 798cd79bb3144a4bb58c6932226b28055de127df30a8d2ead5a3b848d106e150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2342fd9b62b0cfd45bd3459ed62c49db46d3079ed3b38064caa1a441a9ea9fc57cf369eb15a753a4ce4ac5ab878c83ff25a29d430fc2c901a6ba37342c6c386f
|
7
|
+
data.tar.gz: 7f9f16463c29d97b9847407623c8cb8c225b89f2875909cf37cfe9cdc398e781e9fddd0f2fa868dbe0d8d19511196f257f4193f524d09948e60d69aa49d7ef57
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
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
|
+
|
7
|
+
## [0.0.4] - 2025-04-14
|
8
|
+
|
9
|
+
- Fix bug generating .mcp.json with wrong file extension
|
10
|
+
|
1
11
|
## [0.0.3] - 2025-04-14
|
2
12
|
|
3
13
|
- Do not require a Gemfile to be present to generate the other files
|
@@ -66,10 +66,22 @@ module Foobara
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def program_path
|
69
|
-
|
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(
|
32
|
+
mcp_connector.connect(BuildSuperDuperSecret)
|
14
33
|
mcp_connector.run_stdio_server
|