You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP: Make request_file_upload URLs reachable through proxies #1133
request_file_upload (added in #1131 for #1047) builds the upload URL from the server host and port in uploadURLBase (pkg/core/init/default/file_parameter_upload.go). It replaces "", 0.0.0.0 and :: with 127.0.0.1. When MCP clients reach KHI through a reverse proxy or a different host name, this URL is not reachable from the client.
Options
Add a flag for the public base URL of KHI, for example --public-url=https://khi.example.com/khi, and use it for upload URLs when set.
Reliable, but adds one setting.
Build the base URL from the MCP request (Host, X-Forwarded-Host, X-Forwarded-Proto, X-Forwarded-Prefix).
No setting, but it needs access to the HTTP headers from the MCP tool handler. It is not confirmed yet whether the go-sdk CallToolRequest exposes them. Trusting forwarded headers also needs care.
Option 1 can be combined with option 2 as an override.
Affected files
pkg/core/init/default/file_parameter_upload.go (uploadURLBase) and its test
Server parameters or flags if option 1 is chosen
pkg/server/mcp/inspection_upload.go if option 2 is chosen
Acceptance criteria
When KHI is accessed through a proxy, request_file_upload returns a URL that the MCP client can reach.
Local use without a proxy keeps returning the current 127.0.0.1 URL.
Sorry, but I'd like you to choose something else.We want this feature because we have a specific use case for it within the company,It seems difficult for someone who doesn't know the specifics to imagine what is ideal.
Or is this feature something you specifically want right now?
Activity
Ackberry commentedon Nov 19, 2026
Hi @kyasbal , I'd like to take this issue next!
kyasbal commentedon Nov 19, 2026
Sorry, but I'd like you to choose something else.We want this feature because we have a specific use case for it within the company,It seems difficult for someone who doesn't know the specifics to imagine what is ideal.
Or is this feature something you specifically want right now?
Ackberry commentedon Nov 19, 2026
no problem! i just contribute becuase i love go and open source, and im not actively using this project. I will take #1045 instead then if that works.