debug-mcp 0.3.0 → 0.4.0
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 +21 -0
- data/README.ja.md +6 -0
- data/README.md +6 -0
- data/lib/debug_mcp/server.rb +11 -15
- data/lib/debug_mcp/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e02b5e90614a86cdefb3a1829405c60c3c11d4bb03dde266c23769fc264e2ac
|
|
4
|
+
data.tar.gz: 6a61f417f4720077d4cede1874719da07865c9b7a4b370e3726aecd9a74596ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec411a062c8c2cee35f569c9e73bff9450fdfc99f001c75334b3798019bb8b4d32487a83223f81592af05af1fc9466fe3c4390581f5ff3f80bfd290868bd3b0f
|
|
7
|
+
data.tar.gz: 7bfe97bf4102f970463dfffd183d02d1d80b3c400170434b3472c68ac57526ce52f66a0a6b9081116e3985ec5a8629b35908d3c409d51222f4403c75ce7aeac8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0 — 2026-10-18
|
|
4
|
+
|
|
5
|
+
### Dependencies
|
|
6
|
+
|
|
7
|
+
- **Upgrade the `mcp` gem from `~> 0.7` to `~> 1.8`.** The JSON Schema validator
|
|
8
|
+
dependency changes from `json-schema` to `json_schemer`; debug-mcp does not use
|
|
9
|
+
either directly.
|
|
10
|
+
- **The HTTP transport now needs the `rack` gem installed separately.** `mcp` 1.x no
|
|
11
|
+
longer depends on `rack`, but its `StreamableHTTPTransport` still requires it.
|
|
12
|
+
debug-mcp keeps `rack` optional so STDIO users (the default) don't install it;
|
|
13
|
+
`--transport http` without `rack` exits with an install hint
|
|
14
|
+
(`gem install rack`).
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **Fix the HTTP transport under `mcp` 1.x** — The WEBrick bridge now passes a
|
|
19
|
+
`Rack::Request` (with `CONTENT_LENGTH` set) instead of a minimal hand-written
|
|
20
|
+
adapter, which lacked `content_length` and made every request return
|
|
21
|
+
`Internal server error`. `stringio` is now required explicitly instead of relying
|
|
22
|
+
on another gem to load it.
|
|
23
|
+
|
|
3
24
|
## 0.3.0 — 2026-06-18
|
|
4
25
|
|
|
5
26
|
### Features
|
data/README.ja.md
CHANGED
|
@@ -147,6 +147,12 @@ debug-mcp
|
|
|
147
147
|
|
|
148
148
|
ブラウザベースのクライアントやHTTP対応MCPクライアント向け。
|
|
149
149
|
|
|
150
|
+
HTTPトランスポートには `rack` gem が必要です。STDIOでは使わないため、debug-mcp と一緒にはインストールされません:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
gem install rack
|
|
154
|
+
```
|
|
155
|
+
|
|
150
156
|
```bash
|
|
151
157
|
debug-mcp --transport http --port 8080
|
|
152
158
|
```
|
data/README.md
CHANGED
|
@@ -148,6 +148,12 @@ debug-mcp
|
|
|
148
148
|
|
|
149
149
|
For browser-based clients or other HTTP-compatible MCP clients.
|
|
150
150
|
|
|
151
|
+
The HTTP transport requires the `rack` gem, which is not installed with debug-mcp (STDIO users don't need it):
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
gem install rack
|
|
155
|
+
```
|
|
156
|
+
|
|
151
157
|
```bash
|
|
152
158
|
debug-mcp --transport http --port 8080
|
|
153
159
|
```
|
data/lib/debug_mcp/server.rb
CHANGED
|
@@ -263,6 +263,13 @@ module DebugMcp
|
|
|
263
263
|
end
|
|
264
264
|
|
|
265
265
|
def start_http(server)
|
|
266
|
+
begin
|
|
267
|
+
require "rack"
|
|
268
|
+
rescue LoadError
|
|
269
|
+
abort "debug-mcp: the HTTP transport requires the 'rack' gem. " \
|
|
270
|
+
"Install it with `gem install rack` (or add `gem \"rack\"` to your Gemfile)."
|
|
271
|
+
end
|
|
272
|
+
require "stringio"
|
|
266
273
|
require "webrick"
|
|
267
274
|
|
|
268
275
|
transport = MCP::Server::Transports::StreamableHTTPTransport.new(server)
|
|
@@ -276,7 +283,7 @@ module DebugMcp
|
|
|
276
283
|
|
|
277
284
|
webrick.mount_proc("/mcp") do |req, res|
|
|
278
285
|
env = build_rack_env(req)
|
|
279
|
-
rack_request =
|
|
286
|
+
rack_request = Rack::Request.new(env)
|
|
280
287
|
status, headers, body = transport.handle_request(rack_request)
|
|
281
288
|
|
|
282
289
|
res.status = status
|
|
@@ -312,27 +319,16 @@ module DebugMcp
|
|
|
312
319
|
transport&.close
|
|
313
320
|
end
|
|
314
321
|
|
|
315
|
-
# Minimal Rack::Request-compatible adapter for WEBrick
|
|
316
|
-
class RackRequestAdapter
|
|
317
|
-
attr_reader :env
|
|
318
|
-
|
|
319
|
-
def initialize(env)
|
|
320
|
-
@env = env
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
def body
|
|
324
|
-
@env["rack.input"]
|
|
325
|
-
end
|
|
326
|
-
end
|
|
327
|
-
|
|
328
322
|
def build_rack_env(req)
|
|
323
|
+
body = req.body || ""
|
|
329
324
|
env = {
|
|
330
325
|
"REQUEST_METHOD" => req.request_method,
|
|
331
326
|
"PATH_INFO" => req.path,
|
|
332
327
|
"QUERY_STRING" => req.query_string || "",
|
|
333
328
|
"SERVER_NAME" => @http_host,
|
|
334
329
|
"SERVER_PORT" => @http_port.to_s,
|
|
335
|
-
"
|
|
330
|
+
"CONTENT_LENGTH" => body.bytesize.to_s,
|
|
331
|
+
"rack.input" => StringIO.new(body),
|
|
336
332
|
}
|
|
337
333
|
|
|
338
334
|
# Map HTTP headers to Rack convention
|
data/lib/debug_mcp/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: debug-mcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- rira100000000
|
|
@@ -43,14 +43,14 @@ dependencies:
|
|
|
43
43
|
requirements:
|
|
44
44
|
- - "~>"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
46
|
+
version: '1.8'
|
|
47
47
|
type: :runtime
|
|
48
48
|
prerelease: false
|
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
53
|
+
version: '1.8'
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
55
|
name: webrick
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,6 +85,20 @@ dependencies:
|
|
|
85
85
|
- - "<"
|
|
86
86
|
- !ruby/object:Gem::Version
|
|
87
87
|
version: '9.0'
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
name: rack
|
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - ">="
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '2.2'
|
|
95
|
+
type: :development
|
|
96
|
+
prerelease: false
|
|
97
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - ">="
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '2.2'
|
|
88
102
|
- !ruby/object:Gem::Dependency
|
|
89
103
|
name: rake
|
|
90
104
|
requirement: !ruby/object:Gem::Requirement
|