feat: add MCP support
close #11415 close #18974 close https://github.com/langgenius/dify/issues/18974 close https://github.com/langgenius/dify/issues/18358
Summary
Added official MCP support
- Invoke SSE/Streamable Http MCP tools in Agent nodes and Agent applications
- Added SSE/Streamable Http MCP tool types in workflow tool nodes
- Applications can be exported as Streamable Http MCP Server
Screenshots
| Before | After |
|---|---|
| ... | ... |
Checklist
- [ ] This change requires a documentation update, included: Dify Document
- [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) andcd web && npx lint-staged(frontend) to appease the lint gods
#18974
When will the next version be released ? Will it add support for MCP Server ?
When will the next version be released ? Will it add support for MCP Server ?
Will support Streamable HTTP and SSE Server, and will also support exporting apps as MCP Server. Expected to be released in two weeks.
Great, bro. I want to know if the Resource and Prompt modules are included in this implementation?
Great, bro. I want to know if the Resource and Prompt modules are included in this implementation?
Because I am a database developer, for example, I use the MCP tool to obtain performance operation files such as Profile. If I insert the context directly through the Tools tool, it often causes the context to explode or consume a large number of tokens. So I want to generate a Profile file through Tools, and then let Resource obtain the resource address and load it into LLM, similar to the attachment upload and parsing function. I look forward to your answer. Thank you.
CV: pU1BGgpsFEmJ7m4X.0.0 … ---------- Forwarded message --------- From: Yijia Su @.> Date: Thu, Jun 12, 2025 at 6:30 AM Subject: Re: [langgenius/dify] feat: add MCP support (PR #20716) To: langgenius/dify @.> CC: Subscribed @.> FreeOnePlus left a comment (langgenius/dify#20716) <#20716 (comment)> Great, bro. I want to know if the Resource and Prompt modules are included in this implementation? — Reply to this email directly, view it on GitHub <#20716 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDSVBZPLJYWO7IRMA6UZ5A33DEF7BAVCNFSM6AAAAAB6W6OD7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNRVGE3DOMZXGU . You are receiving this because you are subscribed to this thread.Message ID: @.>
Sorry, I don't understand what this mysterious code means?
Great, bro. I want to know if the Resource and Prompt modules are included in this implementation?
Because I am a database developer, for example, I use the MCP tool to obtain performance operation files such as Profile. If I insert the context directly through the Tools tool, it often causes the context to explode or consume a large number of tokens. So I want to generate a Profile file through Tools, and then let Resource obtain the resource address and load it into LLM, similar to the attachment upload and parsing function. I look forward to your answer. Thank you.
Prompt and resource are not supported for now. I roughly understand what you mean, and we will iterate based on everyone's feedback in the future.
Great, bro. I want to know if the Resource and Prompt modules are included in this implementation?
Because I am a database developer, for example, I use the MCP tool to obtain performance operation files such as Profile. If I insert the context directly through the Tools tool, it often causes the context to explode or consume a large number of tokens. So I want to generate a Profile file through Tools, and then let Resource obtain the resource address and load it into LLM, similar to the attachment upload and parsing function. I look forward to your answer. Thank you.
Prompt and resource are not supported for now. I roughly understand what you mean, and we will iterate based on everyone's feedback in the future.
OK, looking forward to your iteration.
Does v1.5.0 support MCP Server?
Does v1.5.0 support MCP Server?
Will be supported in v1.6.0
wow~ great
I assume there's an MCP spec reason for why you strip requests parameters when adding an MCP tool? There's an MCP Server that I would like to integrate with which requires authorization via a token provided in a request param - but I assume they've done it wrong.