[BUG] Figma MCP tool calls fail with SSE JSON parse error on long responses (desktop app, Code tab)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Figma MCP tool calls fail with an SSE JSON parse error when the response payload is large, in a Code-tab session of the Claude desktop app.
Calling get_metadata or get_design_context on a Figma node whose response exceeds roughly 20KB consistently fails with:
Failed to parse SSE message: 1 validation error for union[JSONRPCRequest,JSONRPCNotification,JSONRPCResponse,JSONRPCError]
Invalid JSON: EOF while parsing a string at line 1 column XXXXX [type=json_invalid]
Observed byte offsets across multiple calls, on different nodes and different tools: 20068, 19989, 19952, 19878, 19439 — all clustering around ~20KB regardless of node size or tool used. This held both before and after updating the desktop app to the latest version.
get_screenshot on the same nodes works fine (its response is short). The same Figma file/nodes also work correctly when queried from the regular Claude chat tab (not Code), suggesting the SSE client used in Code-tab sessions fails to reassemble/parse larger multi-chunk messages while the chat-tab client does.
Reconnecting the Figma connector does not help — session_connectors_status reports it as "connected" (40 tools) both before and after the failures, so this isn't a dropped-connection issue.
What Should Happen?
Figma MCP calls with large JSON/XML responses (get_metadata, get_design_context) should complete successfully in Code-tab sessions, the same way they do in the regular chat tab.
Error Messages/Logs
Failed to parse SSE message: 1 validation error for union[JSONRPCRequest,JSONRPCNotification,JSONRPCResponse,JSONRPCError]
Invalid JSON: EOF while parsing a string at line 1 column 19439 [type=json_invalid]
For further information visit https://errors.pydantic.dev/2.12/v/json_invalid
Steps to Reproduce
- Open a Code-tab session in the Claude desktop app with the Figma MCP connector connected.
- Open any Figma design file and pick a node whose subtree is non-trivial (a few dozen layers is enough).
- Call the Figma MCP tool
get_metadata(orget_design_context) with that node's fileKey/nodeId. - The call fails immediately with the SSE parse error above instead of returning the metadata/design context.
Additional observations:
get_screenshoton the same node succeeds (its response is short, just a URL).- The exact same fileKey/nodeId works fine when queried through the regular Claude chat tab (not Code) using what appears to be the same Figma connector.
- Reconnecting the Figma connector does not help;
session_connectors_statusreports it as "connected" throughout. - Reproduced consistently across 5 separate calls, 3 different Figma nodes, and 2 different tools (get_metadata, get_design_context), both before and after updating the desktop app to the latest version.
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.284 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Claude desktop app (embedded terminal panel), not an external terminal
Additionally, the Figma connector status check (session_connectors_status) reports the Figma MCP server as "connected" with 40 tools available, both before and after the failures — ruling out a dropped/failed connection as the cause.
The same file/nodes were successfully queried via get_screenshot (short response) in the same session, confirming the connector itself is reachable and functioning; only large JSON/XML payloads (get_metadata, get_design_context) fail to parse.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗