Self Checks
Dify version
1.16.0 (self-hosted deployment)
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Steps to reproduce
- Deploy Dify 1.16.0 in a self-hosted environment.
- Create an MCP provider under Tools > MCP. In this case the provider name is
TAPD-TEST and its server identifier is tapd-server-test.
- Complete the MCP authorization successfully and add one of its tools to an Agent configuration.
- Open the Agent configuration page and inspect the network requests made by the tool authorization/credential UI.
- The UI requests:
GET /console/api/workspaces/current/tool-provider/builtin/tapd-server-test/credential/info
The MCP record exists in tool_mcp_providers, has authed = true, and has stored credentials. There is intentionally no matching row in tool_builtin_providers.
Response:
{
"message": "Internal Server Error",
"code": "unknown",
"status": 500
}
Additional context
The builtin/{provider}/credential/info route resolves the provider through ToolManager.get_builtin_provider(...). An MCP server identifier is neither a builtin provider nor a plugin provider, so the lookup fails and is surfaced as a 500.
✔️ Expected Behavior
MCP providers should not be passed to the builtin/plugin credential-info workflow.
When an Agent uses an MCP tool, the UI should use the MCP provider state and MCP routes (/workspaces/current/tool-provider/mcp/...) for its configuration and authorization. It should not request /tool-provider/builtin/{server_identifier}/credential/info, and opening the Agent configuration must not produce a 500.
❌ Actual Behavior
The Agent configuration triggers a request to the builtin credential-info endpoint with the MCP server identifier. The backend then tries to resolve the MCP server as a builtin/plugin provider and returns HTTP 500. The MCP provider itself exists, is authorized, and has stored credentials.
Self Checks
Dify version
1.16.0 (self-hosted deployment)
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Steps to reproduce
TAPD-TESTand its server identifier istapd-server-test.GET /console/api/workspaces/current/tool-provider/builtin/tapd-server-test/credential/infoThe MCP record exists in
tool_mcp_providers, hasauthed = true, and has stored credentials. There is intentionally no matching row intool_builtin_providers.Response:
{ "message": "Internal Server Error", "code": "unknown", "status": 500 }Additional context
The
builtin/{provider}/credential/inforoute resolves the provider throughToolManager.get_builtin_provider(...). An MCP server identifier is neither a builtin provider nor a plugin provider, so the lookup fails and is surfaced as a 500.✔️ Expected Behavior
MCP providers should not be passed to the builtin/plugin credential-info workflow.
When an Agent uses an MCP tool, the UI should use the MCP provider state and MCP routes (
/workspaces/current/tool-provider/mcp/...) for its configuration and authorization. It should not request/tool-provider/builtin/{server_identifier}/credential/info, and opening the Agent configuration must not produce a 500.❌ Actual Behavior
The Agent configuration triggers a request to the builtin credential-info endpoint with the MCP server identifier. The backend then tries to resolve the MCP server as a builtin/plugin provider and returns HTTP 500. The MCP provider itself exists, is authorized, and has stored credentials.