[PR #27016] Feat/add mcp proxy #31635

Open
opened 2026-02-21 20:49:50 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/27016

State: open
Merged: No


Summary

We have deployed a set of Dify on our internal network. To access the internet from the office intranet, we need to go through an HTTP proxy. Currently, the MCP client of Dify does not support proxy configuration, which prevents us from using the MCP server on the internet with Dify on our internal network.

Close #26989

  1. Frontend: Add proxy configuration items on the MCP configuration page, including proxy host, account, and password.
  2. Backend: Modify the API to add and get proxy configuration, and save the app-level proxy configuration encrypted in the database; include the proxy information when sending requests from the MCP client.
  3. Database: Modify the MCP table structure to add a proxy field.
  4. Configuration File: Add an MCP proxy switch to allow users who do not need this feature to disable it globally during deployment.

Screenshots

Before After
image image

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/27016 **State:** open **Merged:** No --- ## Summary We have deployed a set of Dify on our internal network. To access the internet from the office intranet, we need to go through an HTTP proxy. Currently, the MCP client of Dify does not support proxy configuration, which prevents us from using the MCP server on the internet with Dify on our internal network. Close #26989 1. Frontend: Add proxy configuration items on the MCP configuration page, including proxy host, account, and password. 2. Backend: Modify the API to add and get proxy configuration, and save the app-level proxy configuration encrypted in the database; include the proxy information when sending requests from the MCP client. 3. Database: Modify the MCP table structure to add a proxy field. 4. Configuration File: Add an MCP proxy switch to allow users who do not need this feature to disable it globally during deployment. ## Screenshots | Before | After | |--------|-------| | <img width="516" height="697" alt="image" src="https://github.com/user-attachments/assets/d986523d-0e13-4644-a036-d6bcd0633f94" /> | <img width="515" height="894" alt="image" src="https://github.com/user-attachments/assets/b99566e3-2edd-437f-9905-47537d410020" /> | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:49:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31635