Unable to Add Local MCP Service While VPN Is Active #18901

Closed
opened 2026-02-21 19:53:17 -05:00 by yindo · 0 comments
Owner

Originally created by @xujun19860904 on GitHub (Oct 8, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

# Help: Unable to connect to local MCP service when VPN is enabled on MacOS

Hi everyone,

I’m running **macOS** and have deployed a workflow created with **Dify** as an **MCP server** at:  
`http://localhost/mcp/server/xxx`

When the local VPN is **not** active, I can successfully add the MCP service by changing the URL to:  
`http://host.docker.internal/mcp/server/xxx`  
and it works fine.

However, once I **enable the VPN**, I can no longer add the MCP service — and any previously added services throw an error. The error message looks like this:

Failed to connect to MCP server: code=500 message="Server error '500 Internal Server Error' for url 'http://host.docker.internal/mcp/server/TC0jyklz7Fhu9npe/mcp'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500" data=None


Since I must keep the VPN on, how can I connect to or add a local MCP service under this condition?

This is my first time posting here — apologies if I missed any formatting or posting conventions.  
Any help would be greatly appreciated!

Thanks in advance.

✔️ Expected Behavior

successfully add the MCP service

Actual Behavior

No response

Originally created by @xujun19860904 on GitHub (Oct 8, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.9.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ```markdown # Help: Unable to connect to local MCP service when VPN is enabled on MacOS Hi everyone, I’m running **macOS** and have deployed a workflow created with **Dify** as an **MCP server** at: `http://localhost/mcp/server/xxx` When the local VPN is **not** active, I can successfully add the MCP service by changing the URL to: `http://host.docker.internal/mcp/server/xxx` and it works fine. However, once I **enable the VPN**, I can no longer add the MCP service — and any previously added services throw an error. The error message looks like this: ``` Failed to connect to MCP server: code=500 message="Server error '500 Internal Server Error' for url '[http://host.docker.internal/mcp/server/TC0jyklz7Fhu9npe/mcp](http://host.docker.internal/mcp/server/TC0jyklz7Fhu9npe/mcp)' For more information check: [https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500)" data=None ``` Since I must keep the VPN on, how can I connect to or add a local MCP service under this condition? This is my first time posting here — apologies if I missed any formatting or posting conventions. Any help would be greatly appreciated! Thanks in advance. ``` ### ✔️ Expected Behavior successfully add the MCP service ### ❌ Actual Behavior _No response_
yindo added the 🌊 feat:workflow label 2026-02-21 19:53:17 -05:00
yindo closed this issue 2026-02-21 19:53:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#18901