Inspector Version
0.21.2-hotfix-3 (also reproducible on current main at adfcccca on 2026-04-14)
Describe the bug
createProxyFetch() handles (url, init) correctly, but when the caller passes a real Request object it only forwards request.url and drops the request semantics. The proxied payload loses the original method, headers, and body.
That makes the wrapper behave differently from normal fetch semantics depending on how the caller constructs the request.
To Reproduce
- Configure
createProxyFetch() with any valid proxy config.
- Call it with a
Request object instead of (url, init), for example:
await fetchFn(
new Request("https://example.com/token", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"X-Test": "1",
},
body: "grant_type=authorization_code&code=abc",
}),
);
- Inspect the JSON body sent to
POST /fetch.
- The serialized payload contains the correct
url, but init is empty unless a separate init argument was also passed.
Expected behavior
If createProxyFetch() is given a Request, the forwarded proxy payload should preserve the request semantics:
Request input should behave equivalently to calling the wrapper with (url, init).
Screenshots
Not applicable.
Environment (please complete the following information):
- OS: macOS 15.4.1
- Browser: not browser-specific; reproduced with a targeted local Node 22 harness against the current source
Additional context
The current implementation in client/src/lib/proxyFetch.ts reads input.url for Request inputs but only serializes init?.method, init?.headers, and init?.body. If the caller passes a Request without a second init, those fields are dropped.
I have a minimal fix and regression test prepared locally if this issue sounds aligned with the intended behavior.
Version Consideration
Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on bug fixes and MCP spec compliance. See CONTRIBUTING.md for more details.
Inspector Version
0.21.2-hotfix-3(also reproducible on currentmainatadfccccaon 2026-04-14)Describe the bug
createProxyFetch()handles(url, init)correctly, but when the caller passes a realRequestobject it only forwardsrequest.urland drops the request semantics. The proxied payload loses the originalmethod,headers, andbody.That makes the wrapper behave differently from normal
fetchsemantics depending on how the caller constructs the request.To Reproduce
createProxyFetch()with any valid proxy config.Requestobject instead of(url, init), for example:POST /fetch.url, butinitis empty unless a separateinitargument was also passed.Expected behavior
If
createProxyFetch()is given aRequest, the forwarded proxy payload should preserve the request semantics:methodheadersbodyRequestinput should behave equivalently to calling the wrapper with(url, init).Screenshots
Not applicable.
Environment (please complete the following information):
Additional context
The current implementation in
client/src/lib/proxyFetch.tsreadsinput.urlforRequestinputs but only serializesinit?.method,init?.headers, andinit?.body. If the caller passes aRequestwithout a secondinit, those fields are dropped.I have a minimal fix and regression test prepared locally if this issue sounds aligned with the intended behavior.
Version Consideration
Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on bug fixes and MCP spec compliance. See CONTRIBUTING.md for more details.