Describe the bug
When using the Mermaid Chart MCP server (https://mcp.mermaidchart.com/mcp) with Claude Code, the validate_and_render_mermaid_diagram tool returns an image with an unsupported media type, causing the Anthropic API to reject the response with a 400 error.
Error message:
API Error: 400 messages.124.content.1.tool_result.content.2.image.source.base64.media_type: Input
should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp'
Expected behavior
The MCP server should return images in a format supported by the Anthropic API:
image/png
image/jpeg
image/gif
image/webp
Actual behavior
The server returns images with an unsupported media type. Based on the error, we hypothesize it might be image/svg+xml, but we don't have visibility into the actual media type being returned.
Configuration:
{
"servers": {
"mermaid-mcp": {
"url": "https://mcp.mermaidchart.com/mcp",
"type": "http"
}
}
}
Environment:
- Client: Claude Code
- MCP endpoint:
https://mcp.mermaidchart.com/mcp
- Tool used:
validate_and_render_mermaid_diagram
Please let us know if you need any additional details to investigate this issue.