update mcp provider error #17426

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

Originally created by @quicksandznzn on GitHub (Sep 15, 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

main

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

1.create mcp provider (included authorization header)
2.update mcp provider name

✔️ Expected Behavior

succeed

Actual Behavior

Image
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
2025-09-15 09:59:19,420 ERROR [app.py:875] 273ffacda2 Exception on /console/api/workspaces/current/tool-provider/mcp/auth [POST]
Traceback (most recent call last):
  File "/Users/quicksand/code/github/dify/api/controllers/console/workspace/tool_providers.py", line 951, in post
    with MCPClient(
         ^^^^^^^^^^
  File "/Users/quicksand/code/github/dify/api/core/mcp/mcp_client.py", line 58, in __enter__
    self._initialize()
  File "/Users/quicksand/code/github/dify/api/core/mcp/mcp_client.py", line 81, in _initialize
    self.connect_server(client_factory, method_name)
  File "/Users/quicksand/code/github/dify/api/core/mcp/mcp_client.py", line 119, in connect_server
    self._session.initialize()
  File "/Users/quicksand/code/github/dify/api/core/mcp/session/client_session.py", line 120, in initialize
    result = self.send_request(
             ^^^^^^^^^^^^^^^^^^
  File "/Users/quicksand/code/github/dify/api/core/mcp/session/base_session.py", line 263, in send_request
    raise MCPAuthError(
core.mcp.error.MCPAuthError: code=401 message="Client error '401 Unauthorized' for url 'http://localhost:8888/mcp'\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401" data=None
Originally created by @quicksandznzn on GitHub (Sep 15, 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 main ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1.create mcp provider (included authorization header) 2.update mcp provider name ### ✔️ Expected Behavior succeed ### ❌ Actual Behavior <img width="469" height="348" alt="Image" src="https://github.com/user-attachments/assets/263df6c4-ca77-44a9-b386-117a3a9c861f" /> ``` For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404 2025-09-15 09:59:19,420 ERROR [app.py:875] 273ffacda2 Exception on /console/api/workspaces/current/tool-provider/mcp/auth [POST] Traceback (most recent call last): File "/Users/quicksand/code/github/dify/api/controllers/console/workspace/tool_providers.py", line 951, in post with MCPClient( ^^^^^^^^^^ File "/Users/quicksand/code/github/dify/api/core/mcp/mcp_client.py", line 58, in __enter__ self._initialize() File "/Users/quicksand/code/github/dify/api/core/mcp/mcp_client.py", line 81, in _initialize self.connect_server(client_factory, method_name) File "/Users/quicksand/code/github/dify/api/core/mcp/mcp_client.py", line 119, in connect_server self._session.initialize() File "/Users/quicksand/code/github/dify/api/core/mcp/session/client_session.py", line 120, in initialize result = self.send_request( ^^^^^^^^^^^^^^^^^^ File "/Users/quicksand/code/github/dify/api/core/mcp/session/base_session.py", line 263, in send_request raise MCPAuthError( core.mcp.error.MCPAuthError: code=401 message="Client error '401 Unauthorized' for url 'http://localhost:8888/mcp'\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401" data=None ```
yindo closed this issue 2026-02-21 19:35:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#17426