@mui/mcp Does Not Support HTTP_PROXY and HTTPS_PROXY Environment Variables
@hasdfa is already working on this.
Since Nov 11, 2025.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Steps to reproduce
Issue: mui-mcp Does Not Support HTTP_PROXY and HTTPS_PROXY Environment Variables
Description
When running mui-mcp, the application fails to handle network requests properly when HTTP_PROXY or HTTPS_PROXY environment variables are set. This results in a TypeError: fetch failed error, specifically due to a DNS resolution failure (ENOTFOUND) for chat-backend.mui.com. The issue appears to stem from the lack of support for proxy settings, which prevents the application from correctly routing requests through the configured proxy.
Error Log
The following error was observed:
2025-08-12 17:16:21.435 [warning] [server stderr] TypeError: fetch failed
at node:internal/deps/undici/undici:13510:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.getPackagesList (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:88:3292)
at async wS (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:15:493)
at async TS (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:88:3161)
at async PS (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:88:4145) {
[cause]: Error: getaddrinfo ENOTFOUND chat-backend.mui.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'chat-backend.mui.com'
}
}
Steps to Reproduce
- Set the
HTTP_PROXYand/orHTTPS_PROXYenvironment variables to a valid proxy server (e.g.,export HTTP_PROXY=http://proxy.example.com:8080). - Run
mui-mcpin an environment where a proxy is required for network access. - Observe the
TypeError: fetch failederror with theENOTFOUNDcause forchat-backend.mui.com.
Expected Behavior
mui-mcp should respect the HTTP_PROXY and HTTPS_PROXY environment variables and route network requests through the configured proxy, successfully resolving the hostname chat-backend.mui.com.
Actual Behavior
The application fails to resolve the hostname chat-backend.mui.com, resulting in a DNS ENOTFOUND error, indicating that it does not utilize the proxy settings provided by the environment variables.
Suggested Fix
- Add support for
HTTP_PROXYandHTTPS_PROXYenvironment variables in the network request logic, likely within theundicifetch implementation used bymui-mcp. - Ensure that the
fetchfunction or related network calls in@mui/mcp/dist/stdio.cjs.jsproperly handle proxy configurations. - Consider using a library like
global-agentorhttps-proxy-agentto simplify proxy support for Node.js HTTP requests. - Verify that DNS resolution and subsequent requests respect the proxy settings.
Environment
- Node.js Version: [Specify version, e.g., v20.x.x]
- mui-mcp Version: [Specify version, e.g., latest or specific version]
- Operating System: [Specify OS, e.g., macOS, Linux, Windows]
- Proxy Configuration: HTTP_PROXY/HTTPS_PROXY set to a valid proxy server
Additional Context
This issue impacts users operating in environments with mandatory proxy configurations, such as corporate networks. Adding proxy support would improve compatibility and usability for these users.
Current behavior
No response
Expected behavior
No response
Context
No response
Your environment
Issue: mui-mcp Does Not Support HTTP_PROXY and HTTPS_PROXY Environment Variables
Description
When running mui-mcp, the application fails to handle network requests properly when HTTP_PROXY or HTTPS_PROXY environment variables are set. This results in a TypeError: fetch failed error, specifically due to a DNS resolution failure (ENOTFOUND) for chat-backend.mui.com. The issue appears to stem from the lack of support for proxy settings, which prevents the application from correctly routing requests through the configured proxy.
Error Log
The following error was observed:
2025-08-12 17:16:21.435 [warning] [server stderr] TypeError: fetch failed
at node:internal/deps/undici/undici:13510:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.getPackagesList (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:88:3292)
at async wS (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:15:493)
at async TS (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:88:3161)
at async PS (/Users/administrator/.npm/_npx/cba1893288811793/node_modules/@mui/mcp/dist/stdio.cjs.js:88:4145) {
[cause]: Error: getaddrinfo ENOTFOUND chat-backend.mui.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'chat-backend.mui.com'
}
}
Steps to Reproduce
- Set the
HTTP_PROXYand/orHTTPS_PROXYenvironment variables to a valid proxy server (e.g.,export HTTP_PROXY=http://proxy.example.com:8080). - Run
mui-mcpin an environment where a proxy is required for network access. - Observe the
TypeError: fetch failederror with theENOTFOUNDcause forchat-backend.mui.com.
Expected Behavior
mui-mcp should respect the HTTP_PROXY and HTTPS_PROXY environment variables and route network requests through the configured proxy, successfully resolving the hostname chat-backend.mui.com.
Actual Behavior
The application fails to resolve the hostname chat-backend.mui.com, resulting in a DNS ENOTFOUND error, indicating that it does not utilize the proxy settings provided by the environment variables.
Suggested Fix
- Add support for
HTTP_PROXYandHTTPS_PROXYenvironment variables in the network request logic, likely within theundicifetch implementation used bymui-mcp. - Ensure that the
fetchfunction or related network calls in@mui/mcp/dist/stdio.cjs.jsproperly handle proxy configurations. - Consider using a library like
global-agentorhttps-proxy-agentto simplify proxy support for Node.js HTTP requests. - Verify that DNS resolution and subsequent requests respect the proxy settings.
Environment
- Node.js Version: [Specify version, e.g., v20.x.x]
- mui-mcp Version: [Specify version, e.g., latest or specific version]
- Operating System: [Specify OS, e.g., macOS, Linux, Windows]
- Proxy Configuration: HTTP_PROXY/HTTPS_PROXY set to a valid proxy server
Additional Context
This issue impacts users operating in environments with mandatory proxy configurations, such as corporate networks. Adding proxy support would improve compatibility and usability for these users.
Search keywords: mcp
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.