JSON Array at Root Handled Incorrectly

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When a JSON Array is returned by an MCP server tool, the model only sees the last element in the array.

Steps to Reproduce

Install mcp[cli] via uv or pip.

Create a simple mcp server:

from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Demo", json_response=True)
@mcp.tool()
def exampletool() -> list:
    return ["123", "456"]
if __name__ == "__main__":
    mcp.run(transport="streamable-http")

Run it, add the local server to Tools & MCP and query it. Observe that the model only returns “456” despite the response containing more than one element in the array.

Expected Behavior

The model sees all elements in the array.

Screenshots / Screen Recordings

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.49
VSCode Version: 1.105.1
Commit: 21a2ed198584d56a91c0b996d1a09c93f8538440
Date: 2025-12-05T07:49:06.016Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.1.0-18-amd64

For AI issues: which model did you use?

Auto, Grok Code, Gemini 3, and others

Additional Information

The behavior works as expected if you wrap the array in a JSON object like this: {"result": ["123","456"]} but this wrapping should be unnecessary.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Could you update to version 2.2? We’ve made many improvements in this update and fixed a lot of bugs.

You can download it here: Download · Cursor
Or update via Help > Check for updates

Please check if the issue persists on the new version and let me know. If the bug remains, I’ll pass it to the engineering team right away.

@deanrie
I updated to 2.2 and the issue persists.

And side note: The primary download button is still serving 2.1. I had to click one of the links below to get 2.2.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.