mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #22202] feat: implement MCP Annotations for MCP results to bypass LLM and context #35187
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bluepuma77 on GitHub (Mar 3, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22202
Check Existing Issues
Verify Feature Scope
Problem Description
I would like to be able to implement a MCP that can return data that would not be processed by the LLM and will not waste context, but just be displayed to the user. Also not be included in future request to LLM.
Use case: create a MCP to interact with a financial database. Query in, data table and chart out. The chart is HTML/JS with interactive ChartJS, which is totally irrelevant to the LLM and would just waste context.
So far I found no solution to have MCP return data that bypasses the LLM and context.
Desired Solution you'd like
MCP "Annotations" can already indicate that the content is only intended for the user, not the assistant:
It would be great if a MCP message with the user-only annotation is simply stored as an embed.
Alternatives Considered
The other option I found for a MCP to bypass LLM context would be to use the open-webui API and create a chat message with embed directly. But LLM calling MCP calling open-webui API seems like a sub-optimal work-around.
I also check the files component. Not sure about the changes after the XSS vulnerability changes and how to upload a file with admin role, that a regular user can download. But a MCP response with
<file type="html" id="FILE_ID" />would probably be shown as plain text tag, not show the file in the frontend.Additional Context
Would also solve https://github.com/open-webui/open-webui/issues/14708
Test implementation:
I tested it locally with a custom MCP server. Can provide a pull request.