Trouble Using MCP Image Injection in Cursor

I have builts a remote mcp server using FastMCP and SSE to deliver images. I have checked that the 64 bit string can be rendered as a jpeg, and that the mimetype is correct. But I cannot get the images to render within the cursor agent, instead I just see the text below. It seems like image injection is a relatively new feature, but I’m hoping that someone here has some experience with this. Thanks!

{
“content”: [
{
“type”: “text”,
“text”: " image generated successfully."
},
{
“type”: “image”,
“data”: “<64 bit image data>”,
“mimeType”: “image/jpeg”
}
]
}

Resolved - the issue here is that FastMCP wraps responses in text by default, so you need to wrap using fastmcp.Image.

import FastMCP, Image

return Image(data=img_bytes, format=“png”)