[FEAT]: display image received from mcp in chat #3163

Open
opened 2026-02-28 06:32:17 -05:00 by deekerman · 5 comments
Owner

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.

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.
Author
Owner

@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?

@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?
Author
Owner

@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:

Image

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}}

@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: <img width="517" height="177" alt="Image" src="https://github.com/user-attachments/assets/077d2af7-f525-4122-b55e-576d5bd39fb6" /> 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](https://10.10.10.10/render/d-solo/xxxxxxxxxxxxx/yyyyyy?width=1000&height=500&theme=dark&panelId=1%22},{%22type%22:%22text%22,%22text%22:%22Base64) 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}}
Author
Owner

@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.

@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.
Author
Owner

@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:

  • In various formats with non-standard keys (base64, base64String, dataURI, url)
  • in various schemas, object in array, object, etc etc.

Is there no standard for MCP responses and their fields? I thought there was.

@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: - In various formats with non-standard keys (base64, base64String, dataURI, url) - in various schemas, object in array, object, etc etc. Is there no standard for MCP responses and their fields? I thought there was.
Author
Owner

@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"
}
}

@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" } }
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anything-llm#3163
No description provided.