mui / mui/material-ui

@mui/mcp Does Not Support HTTP_PROXY and HTTPS_PROXY Environment Variables

Open
#46,723 1 comment 2 reactions 1 assignee View on GitHub

@hasdfa is already working on this.

Since Nov 11, 2025.

scope: all components status: waiting for maintainer support: question
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

  1. Set the HTTP_PROXY and/or HTTPS_PROXY environment variables to a valid proxy server (e.g., export HTTP_PROXY=http://proxy.example.com:8080).
  2. Run mui-mcp in an environment where a proxy is required for network access.
  3. Observe the TypeError: fetch failed error with the ENOTFOUND cause for chat-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_PROXY and HTTPS_PROXY environment variables in the network request logic, likely within the undici fetch implementation used by mui-mcp.
  • Ensure that the fetch function or related network calls in @mui/mcp/dist/stdio.cjs.js properly handle proxy configurations.
  • Consider using a library like global-agent or https-proxy-agent to 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

  1. Set the HTTP_PROXY and/or HTTPS_PROXY environment variables to a valid proxy server (e.g., export HTTP_PROXY=http://proxy.example.com:8080).
  2. Run mui-mcp in an environment where a proxy is required for network access.
  3. Observe the TypeError: fetch failed error with the ENOTFOUND cause for chat-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_PROXY and HTTPS_PROXY environment variables in the network request logic, likely within the undici fetch implementation used by mui-mcp.
  • Ensure that the fetch function or related network calls in @mui/mcp/dist/stdio.cjs.js properly handle proxy configurations.
  • Consider using a library like global-agent or https-proxy-agent to 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.