mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2026-03-02 22:57:05 -05:00
[FEAT]: display image received from mcp in chat #3163
Labels
No labels
Desktop
Docker
Integration Request
Integration Request
OS: Linux
OS: Mobile
OS: Windows
UI/UX
blocked
bug
bug
core-team-only
documentation
duplicate
embed-widget
enhancement
feature request
github_actions
good first issue
investigating
needs info / can't replicate
possible bug
question
stage: specifications
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/anything-llm#3163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @PiotrRedzinski on GitHub (Feb 11, 2026).
Originally assigned to: @angelplusultra on GitHub.
What would you like to see?
I was trying to display grafana rendered image received via MCP in anythingLLM chat. I see in anythingLLM logs base64 PNG format recived, but what I get in chat is text description of picture or broken picture icon. I coudn't find in docs or internet clear information if it is possible to display picture or not.
@timothycarambat commented on GitHub (Feb 11, 2026):
We do not have a callback or render process for images since it can be non-standard. Do you have an MCP you are using right now we can test this against?
@PiotrRedzinski commented on GitHub (Feb 12, 2026):
I'm sharing repository https://github.com/PiotrRedzinski/basic_grafana_mcp with test scenario description. I could adapt mcp to requirements if specified.
anythingllm log when picture passed as base64 but not displayed (picture is 1x1 pixels, to be sure I did not miss so small picture I tested as well 100x100 with the same result):
ESC[36m[backend]ESC[0m ESC[32minfoESC[39m: ESC[36m[AgentHandler]ESC[0m Executing MCP server: grafana:generate_pictest with args: {}
ESC[36m[backend]ESC[0m ESC[32minfoESC[39m: ESC[36m[MCPHypervisor]ESC[0m grafana - Transport message: {"jsonrpc":"2.0","id":12,"result":{"content":[{"type":"text","text":"Test image (1x1 red pixel) - if you see a small red dot, AnythingLLM displays MCP images correctly."},{"type":"image","data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==","mimeType":"image/png"}],"structuredContent":{"test":"pictest","size":"1x1","format":"png"}}}
ESC[36m[backend]ESC[0m ESC[32minfoESC[39m: ESC[36m[AgentHandler]ESC[0m MCP server: grafana:generate_pictest completed successfully {"content":[{"type":"text","text":"Test image (1x1 red pixel) - if you see a small red dot, AnythingLLM displays MCP images correctly."},{"type":"image","data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==","mimeType":"image/png"}],"structuredContent":{"test":"pictest","size":"1x1","format":"png"}}
log for broken picture icon:
ESC[36m[backend]ESC[0m ESC[32minfoESC[39m: ESC[36m[AgentHandler]ESC[0m MCP server: grafana:render-panel completed successfully {"content":[{"type":"text","text":"Panel 1 rendered. Gr
afana URL: https://10.10.10.10/render/d-solo/xxxxxxxxxxxxx/yyyyyy?width=1000&height=500&theme=dark&panelId=1"},{"type":"text","text":"Base64 image length: 148416 characters"}],"
structuredContent":{"grafanaUrl":"https://10.10.10.10/render/d-solo/xxxxxxxxxxxxx/yyyyyy??width=1000&height=500&theme=dark&panelId=1","panelId":1,"width":1000,"height":500,"image
Length":148416}}
@Swatsicle commented on GitHub (Feb 18, 2026):
Hi!
I am also looking for this functionality, as we are using Tableau MCP. The "get-view-image" function returns this:
...RU5ErkJggg==","mimeType":"image/png"}],"isError":false}Currently, it gets rendered as just text, instead of as an image.
If it's helpful, I can put together a Tableau Cloud-based demo + tableau-mcp config that would let you test this. I can also provide any inputs/outputs from my AnythingLLM instance and logs.
@timothycarambat commented on GitHub (Feb 18, 2026):
@Swatsicle That might be helpful, what is odd is that the response object for both example MCPs in this thread return two dramatically different types of responses (base64 string, URL for other)
This issue worries me from the infinite maintence we will have to endure as every MCP decides to pass back responses:
Is there no standard for MCP responses and their fields? I thought there was.
@PiotrRedzinski commented on GitHub (Feb 18, 2026):
There two options specified in
https://modelcontextprotocol.io/specification/2025-03-26/server/prompts#image-content
{
"type": "image",
"data": "base64-encoded-image-data",
"mimeType": "image/png"
}
or Embedded Resourse ( which can be text/image/audio and has minimal impact on context window)
{
"type": "resource",
"resource": {
"uri": "resource://example",
"mimeType": "text/plain",
"text": "Resource content"
}
}